pl.edu.agh.cast.schema.editor.model.diagram
Class SchemaDiagram

java.lang.Object
  extended by pl.edu.agh.cast.model.visual.Diagram<ISchemaDataSet,IVisualSchemaDataSet>
      extended by pl.edu.agh.cast.schema.editor.model.diagram.SchemaDiagram
All Implemented Interfaces:
IDiagram<ISchemaDataSet,IVisualSchemaDataSet>, ISchemaDiagram

public class SchemaDiagram
extends Diagram<ISchemaDataSet,IVisualSchemaDataSet>
implements ISchemaDiagram

Default schema diagram implementation.

Author:
AGH CAST Team

Field Summary
 
Fields inherited from class pl.edu.agh.cast.model.visual.Diagram
model
 
Constructor Summary
SchemaDiagram(ISchemaDataSet model)
          Schema diagram constructor.
 
Method Summary
static ILayoutAlgorithm getDefaultLayout()
          Returns a default layout algorithm for schema diagram.
 void initDiagramLayout(org.eclipse.core.runtime.IProgressMonitor monitor)
          If diagram has not been initialized before (is just created), the method performs default layout for all IVisualSchemaNode elements.
 void layoutSelectedNode(Collection<ISchemaNode> visualNodes, ILayoutAlgorithm layout, org.eclipse.core.runtime.IProgressMonitor monitor)
          Performs the specified layout on the given visual nodes.
 
Methods inherited from class pl.edu.agh.cast.model.visual.Diagram
getDataSets, getLegend, getModel, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pl.edu.agh.cast.model.visual.IDiagram
getDataSets, getLegend, getModel, getName
 

Constructor Detail

SchemaDiagram

public SchemaDiagram(ISchemaDataSet model)
Schema diagram constructor.

Parameters:
model - The schema presentation data set
Method Detail

initDiagramLayout

public void initDiagramLayout(org.eclipse.core.runtime.IProgressMonitor monitor)
If diagram has not been initialized before (is just created), the method performs default layout for all IVisualSchemaNode elements. Otherwise it keeps original positions.

Specified by:
initDiagramLayout in interface ISchemaDiagram
Parameters:
monitor - progress monitor used to set progress bar
See Also:
pl.edu.agh.cast.schema.editor.model.diagram.ISchemaDiagram#initDiagramLayout()

layoutSelectedNode

public void layoutSelectedNode(Collection<ISchemaNode> visualNodes,
                               ILayoutAlgorithm layout,
                               org.eclipse.core.runtime.IProgressMonitor monitor)
Performs the specified layout on the given visual nodes.

Specified by:
layoutSelectedNode in interface ISchemaDiagram
Parameters:
visualNodes - nodes on which the layout will be performed
layout - layout to perform
monitor - progress monitor
See Also:
ISchemaDiagram.layoutSelectedNode(java.util.Collection, pl.edu.agh.cast.schema.editor.layout.algorithm.ILayoutAlgorithm, org.eclipse.core.runtime.IProgressMonitor)

getDefaultLayout

public static ILayoutAlgorithm getDefaultLayout()
Returns a default layout algorithm for schema diagram.

Returns:
layout algorithm


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.