|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.module.YModule
y.module.LayoutModule
public abstract class LayoutModule
Common base class for modules that launch layout algorithms.
| Field Summary |
|---|
| Fields inherited from class y.module.YModule |
|---|
FAILED, moduleListenerSupport, PRECONDITION_VIOLATED, SUCCESS |
| Constructor Summary | |
|---|---|
protected |
LayoutModule(String name,
String author,
String description)
Creates a new instance of LayoutModule. |
| Method Summary | |
|---|---|
protected AnimationPlayer |
createAnimationPlayer()
Factory method used by performAnimation(y.view.Graph2DView, y.layout.GraphLayout). |
protected LayoutMorpher |
createLayoutMorpher(Graph2DView view,
GraphLayout result)
Factory method used by performAnimation(y.view.Graph2DView, y.layout.GraphLayout). |
boolean |
getBufferedMode()
Returns whether or not to perform the layout process in buffered mode. |
boolean |
isAbortable()
LayoutModules are abortable. |
boolean |
isMorphingEnabled()
Getter for property morphingEnabled. |
boolean |
isPortIntersectionCalculatorEnabled()
Returns the value of property portIntersectionCalculatorEnabled. |
protected void |
launchLayouter(Layouter layouter)
Triggers the specified Layouter's
Layouter.doLayout(y.layout.LayoutGraph) method on the
Graph2D instance associated with this module. |
protected void |
launchLayouter(Layouter layouter,
boolean buffered)
Triggers the specified Layouter's
Layouter.doLayout(y.layout.LayoutGraph) method on the
Graph2D instance associated with this module after
determining and applying this module's context settings. |
protected void |
performAnimation(Graph2DView graph2DView,
GraphLayout result)
Callback to perform the actual animation / morphing. |
void |
setBufferedMode(boolean buffered)
Whether or not to perform the layout process in buffered mode. |
void |
setMorphingEnabled(boolean morphingEnabled)
Setter for property morphingEnabled. |
void |
setPortIntersectionCalculatorEnabled(boolean enabled)
Sets whether or not layout stage PortCalculator should be
automatically prepended to the layouter before it is invoked. |
protected boolean |
useEventDispatchThread()
Determines whether to use the EDT for the final assignment of the coordinates if this module is run in buffered mode. |
| Methods inherited from class y.module.YModule |
|---|
addModuleListener, createOptionHandler, createThread, dispose, exceptionHappened, fitGraph2DView, getAuthor, getDescription, getExitStatus, getGraph2D, getGraph2DView, getModuleName, getOptionHandler, getTimer, getView, init, isBackupRealizersEnabled, mainrun, removeModuleListener, run, setBackupRealizersEnabled, setExitStatus, setGraph2D, setModuleName, setOptionHandler, start, startAsThread |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected LayoutModule(String name,
String author,
String description)
LayoutModule.
name - the module's nameauthor - the module's authordescription - a short description of the module's functionality| Method Detail |
|---|
protected void launchLayouter(Layouter layouter)
Layouter's
Layouter.doLayout(y.layout.LayoutGraph) method on the
Graph2D instance associated with this module. This method
is the equivalent of launchLayouter(layouter,bufferedMode);.
layouter - the layout algorithm to be applied to this module's graphlaunchLayouter(y.layout.Layouter, boolean)
protected void launchLayouter(Layouter layouter,
boolean buffered)
Layouter's
Layouter.doLayout(y.layout.LayoutGraph) method on the
Graph2D instance associated with this module after
determining and applying this module's context settings. This includes
Graph2DViewGraph2DViews
layouter - the layout algorithm to be applied to this module's graphbuffered - specifies whether to calculate the layout for this
module's graph in buffered mode. Buffered mode means
that the actual layout calculation is done on a copy of
this module's graph and the calculated layout information
is applied to this module's graph only after the layout
algorithm has finished.
protected void performAnimation(Graph2DView graph2DView,
GraphLayout result)
isMorphingEnabled() yields true.
graph2DView - the view to apply the morphing toresult - the GraphLayout result to use for the morphingprotected AnimationPlayer createAnimationPlayer()
performAnimation(y.view.Graph2DView, y.layout.GraphLayout).
protected LayoutMorpher createLayoutMorpher(Graph2DView view,
GraphLayout result)
performAnimation(y.view.Graph2DView, y.layout.GraphLayout).
view - the view to apply the morphing toresult - the GraphLayout result to use for the morphing
protected boolean useEventDispatchThread()
!SwingUtilities.isEventDispatchThread() && getGraph2DView().isShowing();
public boolean isAbortable()
isAbortable in class YModulepublic void setBufferedMode(boolean buffered)
public boolean getBufferedMode()
public boolean isMorphingEnabled()
public void setMorphingEnabled(boolean morphingEnabled)
morphingEnabled - New value of property morphingEnabled.public boolean isPortIntersectionCalculatorEnabled()
setPortIntersectionCalculatorEnabled(boolean)public void setPortIntersectionCalculatorEnabled(boolean enabled)
PortCalculator should be
automatically prepended to the layouter before it is invoked.
If no IntersectionCalculator DataProviders are registered with the
graph, this class will use DataProviders of
type NodeRealizerIntersectionCalculator.
By default this feature is disabled.
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||