|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.layout.controller.LayoutController
The abstract class LayoutController is responsible for managing
a number of Layout instances and ensuring
that they are properly used. Since each Layout uses a graph drawing
algorithm to arrange an entire VisualGraph or parts of it, the
LayoutController must distinguish between a Layout
instance that deals with a VisualNode and one that deals with a
VisualEdge. For this reason, the Layout interface is
derived by the two interfaces NodeLayout
and EdgeLayout.
Every Layout is a component that can be registered at runtime.
The LayoutController ensures its full and complete integration by
encapsulating the implementation and mediating between the Layout
instance and application code.
This abstract base class holds methods common to and provides a default behavior
for all derived LayoutController classes. This design resembles the
TEMPLATE design pattern. Methods prefixed with on
are those that
need to be customized. The other methods provide the template functionality.
A VisualGraphView provides the methods
VisualGraphView.setLayoutController(LayoutController)
and VisualGraphView.getLayoutController()
to set and retrieve a LayoutController.
The VisualGraphView notifies the
LayoutController about its changes so that the layout can run
automatically if the dynamic layout is enabled. The methods
enableDynamicNodeLayout(boolean) and
enableDynamicEdgeLayout(boolean) can be used
to enable or disable the dynamic layout for nodes and edges
respectively.
The LayoutController allows clients to access a Layout
through an alias called a layout context. The context name is bound to
an object which wraps a specific Layout with a parameterized
configuration of that layout. The purpose of a layout context
is to eliminate conflicts between applications that use the same
Layout concurrently. Furthermore, this pattern permits different
groups of elements to use the same Layout objects but with
different configuration settings, saving considerable time during modeling,
since users are not forced to manually change layout attributes at runtime.
The LayoutController retains a copy of all attributes of a
Layout for each created layout context and releases them
before the layout is applied. This way it is possible to create several
layout contexts for the same Layout, each holding
a separate layout configuration.
Subgraphs are processed recursively in a post-order tree traversal. The
generic functionality for such recursive layouts is incorporated in
this base class. In order to achieve a recursive layout, the algorithm is
applied to all subgraphs before a parent graph is touched. Since the layout
of a subgraph may change its appropriate size, it often becomes necessary to
adjust the subgraphs external size to make its internal content fit. This
behavior should be performed in the method
onEndVisualSubgraphLayout(VisualSubgraph).
Each VisualSubgraph can be associated with
a node layout context and/or an edge layout context. The
methods Layoutable.setNodeLayoutContext(String)
and Layoutable.setEdgeLayoutContext(String)
can be used to define the layout context responsible for arranging
the subgraph. Whenever the apply() method is invoked
(explicitly or implicitly if dynamic layout is active), the LayoutController
traverses through all nested subgraphs and arranges them according to their specified
layout context. In this way it becomes possible to apply different
layouts on different subgraphs in a nested graph.
| Field Summary | |
static int |
ACTIVE
Layout state specifier. |
static int |
ACTIVE_EDGELAYOUT
Layout state specifier. |
static int |
ACTIVE_NODELAYOUT
Layout state specifier. |
protected boolean |
animation
Indicates the animation state. |
static java.lang.String |
ANIMATION_TIME
|
protected int |
animationDuration
Indicates the animation duration. |
static java.lang.String |
ANIMATIONDURATION
XML tag: Specifies the animation time. |
static java.lang.String |
ANIMATIONENABLED
XML tag: Indicates whether the animation is enabled. |
static java.lang.String |
ATTRIBUTENAME_EDGE_LAYOUT
|
static java.lang.String |
ATTRIBUTENAME_GLOBAL_SETTINGS
|
static java.lang.String |
ATTRIBUTENAME_LAYOUT_CONTEXT
|
static java.lang.String |
ATTRIBUTENAME_LAYOUT_SETTING
|
static java.lang.String |
ATTRIBUTENAME_NODE_LAYOUT
|
static java.lang.String |
DEFAULTEDGELAYOUTCONTEXT
XML tag: Specifies the edge layout context for the main graph. |
static java.lang.String |
DEFAULTNODELAYOUTCONTEXT
XML tag: Specifies the node layout context for the main graph. |
static java.lang.String |
DEPENDING_ON_LAYOUT_DIRECTION
|
static int |
DYNAMIC
Layout state specifier. |
static java.lang.String |
DYNAMIC_PORT_REASSIGNMENT
|
protected boolean |
dynamicEdgeLayout
Indicates whether the edges must be laid outed automatically after user interactions. |
static java.lang.String |
DYNAMICEDGELAYOUT
XML tag: Indicates whether the edges must be laid outed automatically after user interactions. |
protected boolean |
dynamicNodeLayout
Indicates whether the nodes must be laid outed automatically after user interactions. |
static java.lang.String |
DYNAMICNODELAYOUT
XML tag: Indicates whether the nodes must be laid outed automatically after user interactions. |
static java.lang.String |
EDGE_OPTIONS
|
protected java.lang.String |
edgeLayoutContext
Specifies the edge layout context for the main graph. |
static java.lang.String |
ENABLE_ANIMATION
|
static java.lang.String |
GLOBAL_CONFIGURATION
XML tag for common options. |
static java.lang.String |
IGNORE_UNCONNECTED_NODES
|
static int |
INACTIVE
Layout state specifier. |
static java.lang.String |
LAYOUT_DOMAIN
|
protected int |
layoutDomain
Indicates the current layout domain. |
static int |
LAYOUTDOMAIN_ALL
Layout domain specifier. |
static int |
LAYOUTDOMAIN_CONSIDER_SELECTED_GROUPS
Layout domain specifier. |
static java.lang.String |
LAYOUTDOMAIN_SELECTION
XML tag: Specifies the value "Selected groups" for the attribute LAYOUTDOMAIN_USED. |
static java.lang.String |
LAYOUTDOMAIN_USED
XML tag: Indicates the current layout domain. |
static java.lang.String |
LAYOUTDOMAIN_WHOLE
XML tag: Specifies the value "All" for the attribute LAYOUTDOMAIN_USED. |
static java.lang.String |
NODE_OPTIONS
|
protected java.lang.String |
nodeLayoutContext
Specifies the node layout context for the main graph. |
protected Observable |
observable
layout observer to update view during animation. |
static java.lang.String |
OTHER_OPTIONS
|
static java.lang.String |
RELAYOUT_EDGES_ON_CHANGE
|
static java.lang.String |
RELAYOUT_NODES_ON_CHANGE
|
static java.lang.String |
SELECTED_GROUPS
|
protected int |
state
Indicates the current layout state. |
protected java.lang.String |
strErrorMessage
Variable to store the error messages during the layout process |
protected VisualGraphObjectContainer |
visualGraphObjectContainer
The VisualGraphObjectContainer with which
this instance of a LayoutController associates. |
protected VisualGraphView |
visualGraphView
The VisualGraphView with which
this instance of a LayoutController associates. |
static java.lang.String |
WHOLE_GRAPH
|
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Constructor Summary | |
protected |
LayoutController()
Constructs a new LayoutController instance. |
|
LayoutController(boolean createDefaultContexts)
Constructs a new OrgChartLayoutController instance. |
protected |
LayoutController(LayoutController layoutController,
VisualGraphObjectContainer visualGraphObjectContainer)
Copy constructor for the LayoutController instance. |
| Method Summary | |
void |
addAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
Adds a listener to the attributable on set instance. |
protected void |
addErrorMessage(java.lang.String msg)
Adds a message text to the current error message. |
boolean |
addLayoutContext(java.lang.String baseLayouter,
java.lang.String layoutContext)
Creates a new layout context and adds it to the pool of layout contexts. |
void |
addObserver(Observer observer)
Adds an observer to the internally managed list of observers of this observable. |
void |
addProgressListener(ProgressListener progresslistener)
Adds a ProgressListener. |
boolean |
apply()
This method applies a layout on the visual nodes and edges of the associated VisualGraphObjectContainer which should, together with an appropriate
edge layout context and node layout context, be set in advance.
|
protected boolean |
apply(boolean doUndoRedo)
|
boolean |
apply(java.util.List objectList,
java.lang.String nodeLayoutContext,
java.lang.String edgeLayoutContext)
This method applies a layout on the nodes and edges specified in the passed List of visual graph objects.
|
protected boolean |
apply(java.util.List objectList,
java.lang.String nodeLayoutContext,
java.lang.String edgeLayoutContext,
boolean doUndoRedo)
This method is an extended function of the method apply(List, String, String).
|
boolean |
apply(java.lang.String nodeLayoutContext)
This method applies a layout algorithm on nodes and edges of the associated VisualGraphObjectContainer. |
boolean |
applyDynamic()
This method causes the LayoutController to perform
a single dynamic layout. |
boolean |
applyEdgeLayout()
Applies a layout on the edges of the associated VisualGraphObjectContainer.
|
protected boolean |
applyEdgeLayout(boolean doUndoRedo)
This method is a extended variant of the method applyEdgeLayout(). |
boolean |
areAttributableEventsEnabled()
Returns a boolean that indicates whether generating of
events is enabled or not. |
void |
considerCurrentEdgesRoute()
Call this method to keep the current edge's route. |
abstract LayoutController |
deepCopy(VisualGraphObjectContainer visualGraphObjectContainer)
Override this method with a meaningful deep-copy operation that returns a new independent layout-controller associated with the given VisualGraphObjectContainer. |
void |
deleteObserver(Observer observer)
Deletes an observer from the internally managed list of observers of this observable. |
void |
disableAttributableEvents()
Disables events for the registered listeners. |
AttributeSet |
duplicateLayoutContext(java.lang.String templateLayoutContext,
java.lang.String newLayoutContext)
Creates a copy of an existing layout context. |
void |
enableAnimation(boolean enable)
Enables or disables the layout animation mode. |
void |
enableAttributableEvents()
Enables the transmission of events to registered listeners. |
void |
enableDynamicEdgeLayout(boolean layoutpremanent)
This method enables the dynamic edge layout mode. |
void |
enableDynamicNodeLayout(boolean layoutpremanent)
This method enables the automatic layout mode. |
boolean |
error()
Returns true if an error has occurred; otherwise false.
|
int |
getAnimateDuration()
Returns the animation duration time in milliseconds. |
Attribute |
getAttribute(java.lang.String name)
Returns the attribute with the given name or null if there
is no Attribute with the given name. |
AttributeSet |
getAttributes()
Returns an AttributeSet consisting of all attributes of this
AttributableOnSet. |
AttributeSet |
getAttributesTree()
Returns an AttributeSet containing all
Attributes of this AttributableOnSet in a
treelike structure.
|
AttributeSet |
getAttributesTree(java.lang.String nodeContext,
java.lang.String edgeContext)
This method returns an AttributeSet that consist of common options,
attributes of the specified by nodeContext and edgeContext.
|
AttributeType |
getAttributeType(java.lang.String name)
Returns the AttributeType of the attribute with the given
name. |
java.lang.Object |
getAttributeValue(java.lang.String name)
Return the value of the attribute with the given name. |
boolean |
getAutomaticPortReassignment()
Returns the status of the automatic port reassignment mode. |
boolean |
getAutomaticPortReassignmentDirectionDependent()
Indicates whether the direction-dependent port reassignment is active. |
java.lang.String |
getBaseLayoutEngine(java.lang.String layoutContext)
Deprecated. Please use getBaseLayouter(String) instead.
The method is about to be removed in future releases. |
java.lang.String |
getBaseLayouter(java.lang.String layoutContext)
This method returns the base Layout of an specified
layout contexts. |
AttributeSet |
getConfiguration(java.lang.String[] listOfLayoutContexts)
This method returns an AttributeSet holding all information
about the current configuration. |
AttributeSet |
getEdgeDefaultLayoutAttributes(java.lang.String layoutContext)
This method returns the default edge attributes of the Layout which underlies the specified
layoutContext.
|
java.lang.String |
getEdgeLayoutContext()
Gets the current edge layout context. |
Constraint |
getEdgeLayoutContextConstraint()
Returns an EnumConstraint that contains all valid edge
layout contexts |
java.lang.String[] |
getEdgeLayoutContextList()
This method returns the list of all defined edge layout contexts. |
java.lang.String[] |
getEdgeLayouterList()
This method returns an array of unique names of all registered edge layout contexts. |
java.lang.String |
getErrorMessage()
Returns the error message if an error has occurred, which can be determined by invoking method error(). |
int[] |
getGraphPosition()
Returns the left/top-position of the graph after the layout process. |
boolean |
getIgnoreIsolatedNodes()
Indicates whether isolated nodes are excluded from layout process. |
java.lang.Object |
getLayoutAttribute(java.lang.String layoutContext,
java.lang.String key)
Obtains the value of a particular attribute of a specified layout context. |
AttributeSet |
getLayoutAttributeSet(java.lang.String layoutContext)
Returns the AttributeSet of the specified layout context. |
java.lang.String |
getLayoutContext()
Deprecated. use getNodeLayoutContext() and
getEdgeLayoutContext() instead. |
java.lang.String[] |
getLayoutContextList()
This method returns an array of all defined layout contexts. |
java.lang.String[] |
getLayoutContextList(java.lang.String baseLayouter)
This method returns the list of defined layout contexts that associate with a particular Layout . |
int |
getLayoutDomain()
Returns the current layout domain. |
boolean |
getLayoutEdgesContextDepended()
Indicates whether the edges are arranged context dependently or not. |
AttributeSet |
getLayoutReport(java.lang.String layoutContext)
This method provides a detailed report about the last layout process and typically contains the calculation durations of different processing steps. |
LayoutService |
getLayoutService()
Deprecated. The LayoutService class is about to be removed in future releases. All methods are available at the LayoutController class now. |
AttributeSet |
getNodeDefaultLayoutAttributes(java.lang.String layoutContext)
This method returns the default node attributes of the Layout which underlies the specified
layoutContext.
|
java.lang.String |
getNodeLayoutContext()
Gets the current node layout context. |
Constraint |
getNodeLayoutContextConstraint()
Returns an EnumConstraint that contains all valid node
layout contexts |
java.lang.String[] |
getNodeLayoutContextList()
This method returns the list of all defined node layout contexts. |
java.lang.String[] |
getNodeLayouterList()
This method returns an array of unique names of all registered node layout contexts. |
java.util.Map |
getPreviousEdgeLayoutAttributeMap()
|
java.util.Map |
getPreviousEdgeLayoutContextMap()
|
java.util.Map |
getPreviousNodeLayoutAttributeMap()
|
java.util.Map |
getPreviousNodeLayoutContextMap()
|
int |
getState()
Returns the current state of the layout process. |
java.lang.String[] |
getUsingLayoutContexts()
This method returns an array of all layout context names that are actually used in the associated VisualGraphObjectContainer. |
VisualGraphObjectContainer |
getVisualGraphObjectContainer()
Gets the associated VisualGraphObjectContainer. |
protected abstract void |
init()
This method must be overwritten by derived LayoutControllers. |
boolean |
isAnimationEnabled()
Indicates whether the animation mode is enabled. |
boolean |
isDynamicEdgeLayoutEnabled()
This method returns the dynamic edge layout mode status. |
boolean |
isDynamicLayoutSupported()
Indicates whether the dynamic node layout or the dynamic edge layout is enabled. |
boolean |
isDynamicNodeLayoutEnabled()
This method indicates whether the dynamic node layout mode is enabled. |
boolean |
isNodeLayoutContext(java.lang.String layoutContext)
Returns true if the specified layoutContext is associated with a NodeLayout, otherwise false. |
protected boolean |
isRecursive()
Deprecated. The recursive behavior of layout can be also influenced by layout domain. Please use the methods setLayoutDomain(int) and
getLayoutDomain() instead. |
boolean |
isValidLayoutContext(java.lang.String layoutContext)
Checks whether the specified layout context is valid. |
protected void |
journalStartLayout()
In case this LayoutController instance is associated to an
instance of a VisualGraphView this
method opens an undo-redo layout tag for the
current VisualGraphObjectContainer.
|
protected void |
journalStopLayout()
In case this LayoutController instance is associated to an
instance of a VisualGraphView this
method closes an undo-redo layout tag for the current
VisualGraphObjectContainer.
|
protected void |
onBeginLayout()
Override this method with code that should be performed when the layout is about to begin. |
void |
onBeginLoading()
This method should be called to indicate the layoutController that the loading process is going to start. |
protected void |
onBeginVisualSubgraphEdgeLayout(VisualSubgraph visualsubgraph)
Override this method with code that should be performed before the edge layout is applied on a VisualSubgraph. |
protected void |
onBeginVisualSubgraphLayout(VisualSubgraph visualsubgraph)
Override this method with code that should be performed before a layout on a VisualSubgraph is
about to be performed. |
protected void |
onEndLayout()
Override this method with code that should be performed when the layout has completed. |
void |
onEndLoading()
This method should be triggered to indicate the layoutController that the loading process is finished. |
protected void |
onEndVisualSubgraphEdgeLayout(VisualSubgraph visualsubgraph)
Override this method with code that should be performed when the edge layout on a VisualSubgraph has completed. |
protected void |
onEndVisualSubgraphLayout(VisualSubgraph visualsubgraph)
Override this method with code that should be performed after layout on a VisualSubgraph has
completed. |
protected void |
onLayoutEdgeSubgraph(VisualSubgraph visualsubgraph)
This method will be called by applyEdgeLayout()
for each subgraph for which an edge layout will be performed. |
protected void |
onLayoutSubgraph(VisualSubgraph visualsubgraph)
This method will be called by apply() for each
subgraph for which a layout is to be performed. |
boolean |
registerLayout(EdgeLayout edgeLayout)
This method should be used to add a new EdgeLayout object into
the edge layout pool.
|
boolean |
registerLayout(NodeLayout nodeLayout)
This method should be used to add a new NodeLayout object into
the node layout pool.
|
boolean |
registerLayoutEngine(EdgeLayout edgeLayout)
Deprecated. Please use registerLayout(EdgeLayout) instead.
The method is about to be removed in future releases. |
boolean |
registerLayoutEngine(NodeLayout layoutEngine)
Deprecated. Please use registerLayout(NodeLayout) instead.
The method is about to be removed in future releases. |
void |
removeAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
Removes a listener from the attributable on set instance. |
boolean |
removeLayoutContext(java.lang.String layoutContext)
Removes the specified layout context. |
void |
removeProgressListener(ProgressListener progresslistener)
Removes the specified Progress-listener. |
void |
setAnimateDuration(int duration)
Configures the animation duration time for the layout process. |
void |
setAttribute(Attribute attribute)
Sets the value of the attribute with the same name to the value of the given attribute. |
void |
setAttributes(AttributeSet set)
Searches within the AttributeSet given by
attributes for attributes that have the same name as the
attributes of this AttributableOnSet holds. |
void |
setAttributesTree(AttributeSet attributes)
Performs the same operation as the setAttributes(com.tensegrity.generic.attribute.AttributeSet) method with
the difference that the AttributeSet given to this method
must provide the treelike structure mentioned in the documentation of
the getAttributesTree(). |
void |
setAttributesTree(AttributeSet attributes,
VisualSubgraph subgraph)
This method use the input attributes to configure the layout contexts specified by nodeContext, edgeContext and itself. |
void |
setAttributeValue(java.lang.String name,
java.lang.Object value)
Sets the value of the attribute with the name to the given value. |
void |
setAutomaticPortReassignment(boolean reassignPorts)
Specifies whether the edges can be automatically reassigned to different ports of a node. |
void |
setAutomaticPortReassignmentDirectionDependent(boolean enable)
Enables or disables the direction-dependent port reassignment mode, which authorizes or prevents the responsible layouter from reassigning edges to an appropriate port. |
protected void |
setBorder(VisualSubgraph visualsubgraph)
This method may be used for a subgraph to ensure that the associated edge layouter keeps edges inside
subgraph area. |
void |
setChanged()
Sets the state to changed and notifies all registered observers. |
void |
setChanged(java.lang.Object arg)
Sets the state to changed and notifies all registered observers with the given arg. |
void |
setConfiguration(AttributeSet attributes)
This method uses the passed AttributeSet to configure
itself and all used layout contexts. |
void |
setEdgeLayoutContext(java.lang.String layoutContext)
This helper method can be used to set the edge layout context for a VisualGraph.
|
void |
setGraphPosition(int x,
int y)
Sets the left/top-position of the graph after the layout process. |
void |
setIgnoreIsolatedNodes(boolean ignore)
This method configures isolated nodes to be included or excluded from the layout process. |
boolean |
setLayoutAttribute(java.lang.String layoutContext,
java.lang.String key,
java.lang.Object value)
This method may be used to change the value of a particular
attribute of a layout context. |
boolean |
setLayoutAttributeSet(java.lang.String layoutContext,
AttributeSet attributeSet)
Sets the AttributeSet of the specified layout context. |
void |
setLayoutContext(java.lang.String layoutContext)
Deprecated. use setNodeLayoutContext(String) and
setEdgeLayoutContext(String) instead. |
void |
setLayoutDomain(int layoutDomain)
Sets the layout domain, which determines which part of the graph should be arranged. |
void |
setLayoutEdgesContextDepended(boolean depended)
Deprecated. After redesign of the Layout it is not necessary to use this
method anymore. |
protected void |
setLayoutService(LayoutService service)
Deprecated. The LayoutService class is about to be removed in future releases. All methods are available at the base LayoutController class now. |
void |
setNodeLayoutContext(java.lang.String layoutContext)
This helper method can be used to set the node layout context for a VisualGraph.
|
void |
setVisualGraphObjectContainer(VisualGraphObjectContainer vgoc)
Sets the VisualGraphObjectContainer that is to be associated.
|
java.lang.String |
toString()
|
void |
updateLayoutAttributeSet(java.lang.String layoutContext,
AttributeSet layoutAttribute)
This method updates the specified AttributeSet
by modifying the attributes that depend on the current layout style.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String WHOLE_GRAPH
public static final java.lang.String SELECTED_GROUPS
public static final java.lang.String ANIMATION_TIME
public static final java.lang.String ENABLE_ANIMATION
public static final java.lang.String LAYOUT_DOMAIN
public static final java.lang.String DEPENDING_ON_LAYOUT_DIRECTION
public static final java.lang.String DYNAMIC_PORT_REASSIGNMENT
public static final java.lang.String RELAYOUT_EDGES_ON_CHANGE
public static final java.lang.String RELAYOUT_NODES_ON_CHANGE
public static final java.lang.String IGNORE_UNCONNECTED_NODES
public static final java.lang.String OTHER_OPTIONS
public static final java.lang.String EDGE_OPTIONS
public static final java.lang.String NODE_OPTIONS
public static final java.lang.String ATTRIBUTENAME_GLOBAL_SETTINGS
public static final java.lang.String ATTRIBUTENAME_NODE_LAYOUT
public static final java.lang.String ATTRIBUTENAME_EDGE_LAYOUT
public static final java.lang.String ATTRIBUTENAME_LAYOUT_CONTEXT
public static final java.lang.String ATTRIBUTENAME_LAYOUT_SETTING
public static final java.lang.String LAYOUTDOMAIN_USED
public static final java.lang.String LAYOUTDOMAIN_WHOLE
LAYOUTDOMAIN_USED.
public static final java.lang.String LAYOUTDOMAIN_SELECTION
LAYOUTDOMAIN_USED.
public static final java.lang.String DYNAMICNODELAYOUT
public static final java.lang.String DYNAMICEDGELAYOUT
public static final java.lang.String ANIMATIONENABLED
public static final java.lang.String ANIMATIONDURATION
public static final java.lang.String DEFAULTNODELAYOUTCONTEXT
public static final java.lang.String DEFAULTEDGELAYOUTCONTEXT
public static final java.lang.String GLOBAL_CONFIGURATION
protected int state
getState()public static final int INACTIVE
getState(),
Constant Field Valuespublic static final int ACTIVE
getState(),
Constant Field Valuespublic static final int ACTIVE_NODELAYOUT
getState(),
Constant Field Valuespublic static final int ACTIVE_EDGELAYOUT
getState(),
Constant Field Valuespublic static final int DYNAMIC
getState(),
Constant Field Valuesprotected int layoutDomain
public static final int LAYOUTDOMAIN_ALL
public static final int LAYOUTDOMAIN_CONSIDER_SELECTED_GROUPS
protected Observable observable
protected VisualGraphView visualGraphView
VisualGraphView with which
this instance of a LayoutController associates.
protected VisualGraphObjectContainer visualGraphObjectContainer
VisualGraphObjectContainer with which
this instance of a LayoutController associates.
protected java.lang.String nodeLayoutContext
protected java.lang.String edgeLayoutContext
protected java.lang.String strErrorMessage
protected boolean dynamicNodeLayout
protected boolean dynamicEdgeLayout
protected int animationDuration
protected boolean animation
| Constructor Detail |
protected LayoutController()
LayoutController instance.
public LayoutController(boolean createDefaultContexts)
OrgChartLayoutController instance.
createDefaultContexts - determines whether the new instance of
this class should be initialized with default default
layout contexts or not
protected LayoutController(LayoutController layoutController,
VisualGraphObjectContainer visualGraphObjectContainer)
LayoutController instance.
layoutController - the instance to copy data from.visualGraphObjectContainer - the VisualGraphObjectContainer the copy
is to be associated with.| Method Detail |
public int getState()
INACTIVE, ACTIVE,
ACTIVE_NODELAYOUT, ACTIVE_EDGELAYOUT and
DYNAMIC;protected final void setLayoutService(LayoutService service)
LayoutService that should be used.
service - the LayoutService.public final LayoutService getLayoutService()
LayoutService that is used.
protected abstract void init()
Layout and
define the according layout-contexts.
public final java.lang.String getLayoutContext()
getNodeLayoutContext() and
getEdgeLayoutContext() instead.
apply()public void setLayoutContext(java.lang.String layoutContext)
setNodeLayoutContext(String) and
setEdgeLayoutContext(String) instead.
layoutContext - the layout-context to use.apply()public VisualGraphObjectContainer getVisualGraphObjectContainer()
VisualGraphObjectContainer.
VisualGraphObjectContainer.public void setVisualGraphObjectContainer(VisualGraphObjectContainer vgoc)
VisualGraphObjectContainer that is to be associated.
VisualGraphView.setLayoutController(LayoutController)
was used since the VisualGraphView calls this method internally.
vgoc - the associated VisualGraphObjectContainer.protected final boolean isRecursive()
setLayoutDomain(int) and
getLayoutDomain() instead.
public boolean apply()
VisualGraphObjectContainer which should, together with an appropriate
edge layout context and node layout context, be set in advance.
You can set the layout contexts for the main graph and nested
subgraphs by invoking methods
Layoutable.setNodeLayoutContext(String)
and Layoutable.setEdgeLayoutContext(String) or
the helper method pair setNodeLayoutContext(String)
and setEdgeLayoutContext(String).
This method processes subgraphs recursively in a post-order tree traversal.
Please note that for a recursive layout, the algorithm is applied to all
subgraphs before their parents.
The methods onBeginVisualSubgraphLayout(VisualSubgraph)
and onLayoutSubgraph(VisualSubgraph) will be
triggered for each subgraph.
The methods onBeginLayout() and onEndLayout()
will be triggered before and after the main graph is arranged respectively.
getLayoutDomain()
for more information.
true if the function was successful;
otherwise false, in which case the method getErrorMessage()
could be used to obtain details about the error.setVisualGraphObjectContainer(VisualGraphObjectContainer),
setNodeLayoutContext(String),
setEdgeLayoutContext(String),
apply(List, String, String),
apply(String),
getLayoutDomain()protected boolean apply(boolean doUndoRedo)
public boolean apply(java.util.List objectList,
java.lang.String nodeLayoutContext,
java.lang.String edgeLayoutContext)
List of visual graph objects.
The method uses the specified node layout context and edge layout context
to layout the graph.
Please note that this method does not layout recursively.
You should use method apply() if you need to layout nested graphs.
The method onBeginLayout() will be triggered before the
layout process is started and the method onEndLayout()
will be called after the layout process has been completed.
objectList - The list of VisualNode
and VisualEdge objects that should be arranged.nodeLayoutContext - The node layout context
that should be used to arrange nodes of the graph.edgeLayoutContext - The edge layout context
that should be used to arrange edges of the graph.
getErrorMessage()
could be used to obtain details about the error.apply(),
apply(String)
protected boolean apply(java.util.List objectList,
java.lang.String nodeLayoutContext,
java.lang.String edgeLayoutContext,
boolean doUndoRedo)
apply(List, String, String).
Please read apply(List, String, String) for more information.
objectList - The list of VisualNode
and VisualEdge objects that should be arranged.nodeLayoutContext - The node layout context
that should be used to arrange nodes of the graph.edgeLayoutContext - The edge layout context
that should be used to arrange edges of the graph.doUndoRedo - determines whether the layout action should be registered
by the redo/undo engine.
getErrorMessage()
could be used to obtain details about the error.apply(List, String, String),
apply(),
apply(String)public boolean apply(java.lang.String nodeLayoutContext)
VisualGraphObjectContainer. This method calls
setNodeLayoutContext(String) and
apply() internally.
For more details please see
setNodeLayoutContext(String) and
apply().
nodeLayoutContext - The node layout context that should be used to arrange nodes of the graph.
true if the layout process was successful, otherwise
false.apply(),
apply(List, String, String)public final boolean applyEdgeLayout()
VisualGraphObjectContainer.
The purpose of this method is to perfect the layout of visual edges without
moving any nodes.
The associated VisualGraphObjectContainer and
specified edge layout context for the main graph and
contained subgraphs should be set in advance.
You can set the edge layout context for the main graph and contained
subgraphs either by invoking method
Layoutable.setEdgeLayoutContext(String)
directly or by calling the helper method setNodeLayoutContext(String).
This method processes subgraphs recursively in a post-order tree traversal.
Please note that for a recursive layout, the algorithm is applied to all
subgraphs before their parents.
The method onLayoutEdgeSubgraph(VisualSubgraph) will be
invoked for each subgraph.
The method pair onBeginLayout() and
onEndLayout() will be triggered for the main graph
before and after the layout process.
apply(), apply(List, String, String)
or apply(String) are invoked since these methods
arrange not only nodes of the given graph but also its edges.
true if the function was successful, otherwise false,
in which case the method getErrorMessage() should be invoked to obtain the
error details.setVisualGraphObjectContainer(VisualGraphObjectContainer),
setEdgeLayoutContext(String),
apply()protected final boolean applyEdgeLayout(boolean doUndoRedo)
applyEdgeLayout().
doUndoRedo - determines whether the layout action should be registered
by the redo/undo engine.
true if the function was successful, otherwise false,
in which case the method getErrorMessage() should be invoked to obtain the
error details.applyEdgeLayout()protected final void addErrorMessage(java.lang.String msg)
msg - the error message that should be added.public abstract LayoutController deepCopy(VisualGraphObjectContainer visualGraphObjectContainer)
VisualGraphObjectContainer.
visualGraphObjectContainer - the VisualGraphObjectContainer
the copy is to be associated with.
protected void onBeginLayout()
protected void onEndLayout()
protected final void journalStartLayout()
LayoutController instance is associated to an
instance of a VisualGraphView this
method opens an undo-redo layout tag for the
current VisualGraphObjectContainer.
journalStopLayout()
after the layout operation has been performed!
This method has to be called before the layout of a
VisualGraphObjectContainer otherwise the a layout operation
made upon that VisualGraphObjectContainer is NOT covered
by the undo-redo mechanism.
#undo_redoStopActionprotected final void journalStopLayout()
LayoutController instance is associated to an
instance of a VisualGraphView this
method closes an undo-redo layout tag for the current
VisualGraphObjectContainer.
journalStartLayout()
before the layout operation has been performed!
This method has to be called before the layout of a
VisualGraphObjectContainer otherwise the a layout operation
made upon that VisualGraphObjectContainer is NOT covered
by the undo-redo mechanism.
public void onBeginLoading()
onEndLoading()public void onEndLoading()
onBeginLoading()protected void onBeginVisualSubgraphLayout(VisualSubgraph visualsubgraph)
VisualSubgraph is
about to be performed.
visualsubgraph - the
VisualSubgraph that was
just arranged.protected void onEndVisualSubgraphLayout(VisualSubgraph visualsubgraph)
VisualSubgraph has
completed.
visualsubgraph - the VisualSubgraph
instance that was just arranged.protected void onLayoutSubgraph(VisualSubgraph visualsubgraph)
apply() for each
subgraph for which a layout is to be performed.
visualsubgraph - The subgraph to layout.protected void onBeginVisualSubgraphEdgeLayout(VisualSubgraph visualsubgraph)
VisualSubgraph.
visualsubgraph - the VisualSubgraph which is about
to be arranged.protected void onEndVisualSubgraphEdgeLayout(VisualSubgraph visualsubgraph)
VisualSubgraph has completed.
visualsubgraph - the VisualSubgraph which is arranged
previously.protected void onLayoutEdgeSubgraph(VisualSubgraph visualsubgraph)
applyEdgeLayout()
for each subgraph for which an edge layout will be performed.
visualsubgraph - The subgraph of which the edges are to be layouted.
layout_notifypublic java.lang.String toString()
public void enableDynamicNodeLayout(boolean layoutpremanent)
LayoutController
will layout nodes and edges during user interaction and whenever it becomes
necessary.
In this mode users are not able to move nodes, because moving them
would trigger a new layout process that would place them back into their
original position.
layoutpremanent - true to enable dynamic
layout, otherwise false.enableDynamicEdgeLayout(boolean),
isDynamicNodeLayoutEnabled(),
enableDynamicEdgeLayout(boolean)public boolean isDynamicNodeLayoutEnabled()
true if the permanent node layout is enabled,
otherwise false.enableDynamicNodeLayout(boolean)public void enableDynamicEdgeLayout(boolean layoutpremanent)
LayoutController will layout
edges during user interaction.
layoutpremanent - true to enable dynamic
layout, otherwise false.isDynamicEdgeLayoutEnabled(),
enableDynamicNodeLayout(boolean)public boolean isDynamicEdgeLayoutEnabled()
true if the dynamic edge layout is enabled,
otherwise false.public boolean applyDynamic()
LayoutController to perform
a single dynamic layout. Usually this method is not invoked directly
by the client. Instead it is invoked by the framework internally
during user interaction.
true if the layout was successful,
otherwise false; in this case the method
getErrorMessage() can be used to obtain a description
of the error's reason.isDynamicLayoutSupported(),
enableDynamicNodeLayout(boolean),
enableDynamicEdgeLayout(boolean)public boolean isDynamicLayoutSupported()
applyDynamic() is
appropriate.
true it dynamic layout is supported, otherwise
falseapplyDynamic()public void setIgnoreIsolatedNodes(boolean ignore)
ignore - true if the isolated nodes are to exclude.getIgnoreIsolatedNodes()public boolean getIgnoreIsolatedNodes()
true if the isolated nodes are ignored, otherwise
false.setIgnoreIsolatedNodes(boolean)public void setAutomaticPortReassignment(boolean reassignPorts)
setAutomaticPortReassignmentDirectionDependent(boolean)
can be invoked to specify whether the port reassignment should be performed by
the responsible layouter or simply to the nearest available port.
reassignPorts - true if the ports should be reassigned.public boolean getAutomaticPortReassignment()
true if the automatic port reassigning is enable; otherwise
false.setAutomaticPortReassignment(boolean)public void setAutomaticPortReassignmentDirectionDependent(boolean enable)
setAutomaticPortReassignment(boolean) to
enable and disable this mode.
enable - Set true to reassign ports layout dependent;
or false to reconnect edges to the next ports.getAutomaticPortReassignmentDirectionDependent()public boolean getAutomaticPortReassignmentDirectionDependent()
true if enabled; otherwise false.public void setAnimateDuration(int duration)
enableAnimation(boolean).
duration - The total duration time in millisecondsenableAnimation(boolean),
getAnimateDuration()public int getAnimateDuration()
setAnimateDuration(int),
isAnimationEnabled()public void enableAnimation(boolean enable)
enable - true to enable animation or false
to disable itpublic boolean isAnimationEnabled()
true if the animation mode is enabled;
otherwise false.public void setLayoutEdgesContextDepended(boolean depended)
Layout it is not necessary to use this
method anymore.
depended - true if the edges are to be arranged by node layouter,
or false if the edges should be arranged by a global edge layout.public boolean getLayoutEdgesContextDepended()
true if context depended edge layout is active.
public void setGraphPosition(int x,
int y)
x - the target x-position of the graph.y - the target y-position of the graph.public int[] getGraphPosition()
public void setLayoutDomain(int layoutDomain)
layoutDomain - the layoutDomain to set.getLayoutDomain()public int getLayoutDomain()
setLayoutDomain(int)public java.lang.String[] getUsingLayoutContexts()
VisualGraphObjectContainer.
getConfiguration(String[])public AttributeSet getConfiguration(java.lang.String[] listOfLayoutContexts)
AttributeSet holding all information
about the current configuration. It contains the current settings of the
LayoutController as well as the settings of the specified
layout contexts passed. This method may be used to temporarily
save and restore a LayoutController instance.
listOfLayoutContexts - The list of the layout contexts of which the
attributes should be saved; or null if the configuration of all registered
layout contexts is required.
AttributeSet.getUsingLayoutContexts(),
setConfiguration(AttributeSet)public void setConfiguration(AttributeSet attributes)
AttributeSet to configure
itself and all used layout contexts.
attributes - the AttributeSet that contains the global
properties and the settings of layout contexts that should be used.getConfiguration(String[])public void addObserver(Observer observer)
observer - the observer to add to the internal list.public void deleteObserver(Observer observer)
observer - the observer to delete from the internal list.public void setChanged()
public void setChanged(java.lang.Object arg)
arg.
arg - additional argument to pass to the observers.public AttributeSet getAttributes()
AttributableOnSetAttributeSet consisting of all attributes of this
AttributableOnSet.
getAttributes in interface AttributableOnSetAttributeSet with all attributes.public void setAttributes(AttributeSet set)
AttributableOnSetAttributeSet given by
attributes for attributes that have the same name as the
attributes of this AttributableOnSet holds. The value of
every attribute that has the same name is used as the new value for the
corresponding attribute of this AttributableOnSet.
An Attribute within the given AttributeSet that
is not an attribute of the object that implements the
AttributableOnSet interface is not handled by nor added
to the specific implementor of the AttributableOnSet
interface.
setAttributes in interface AttributableOnSetset - the AttributeSet consisting of the attributes
whose values to set.public AttributeSet getAttributesTree()
AttributableOnSetAttributeSet containing all
Attributes of this AttributableOnSet in a
treelike structure.
Attributes for an Attribute of this
AttributableOnSet.
Attribute can only
have one value (in this case an object or the Attributes
for an object) the subsequent attributes are plugged into the returned
AttributeSet as a new Attribute with the same
name and the AttributableOnSet.TREE_SUBSET_POSTFIX.
getAttributesTree in interface AttributableOnSetAttributeSet with the attributes
in a treelike structure
public final AttributeSet getAttributesTree(java.lang.String nodeContext,
java.lang.String edgeContext)
AttributeSet that consist of common options,
attributes of the specified by nodeContext and edgeContext.
nodeContext - The node layout context of which the attribute is requested.edgeContext - The edge layout context of which the attribute is requested.
public Constraint getNodeLayoutContextConstraint()
EnumConstraint that contains all valid node
layout contexts
EnumConstraint that contains all valid node
layout contextspublic Constraint getEdgeLayoutContextConstraint()
EnumConstraint that contains all valid edge
layout contexts
EnumConstraint that contains all valid edge
layout contextspublic void setAttributesTree(AttributeSet attributes)
AttributableOnSetAttributableOnSet.setAttributes(com.tensegrity.generic.attribute.AttributeSet) method with
the difference that the AttributeSet given to this method
must provide the treelike structure mentioned in the documentation of
the AttributableOnSet.getAttributesTree().
setAttributesTree in interface AttributableOnSetattributes - the AttributeSet containing the attributes
whose values to set.
public void setAttributesTree(AttributeSet attributes,
VisualSubgraph subgraph)
attributes - The attributes with the necessary information.subgraph - The subgraph of which the context should be set.public void addAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
AttributableOnSet
addAttributableOnSetListener in interface AttributableOnSetattributableOnSetListener - an AttributableOnSet
listener listening for changespublic void removeAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
AttributableOnSet
removeAttributableOnSetListener in interface AttributableOnSetattributableOnSetListener - the AttributableOnSet to
be removed from the list of listeners.public void enableAttributableEvents()
AttributableOnSet
enableAttributableEvents in interface AttributableOnSetpublic void disableAttributableEvents()
AttributableOnSet
disableAttributableEvents in interface AttributableOnSetpublic boolean areAttributableEventsEnabled()
AttributableOnSetboolean that indicates whether generating of
events is enabled or not.
areAttributableEventsEnabled in interface AttributableOnSetpublic Attribute getAttribute(java.lang.String name)
Attributablenull if there
is no Attribute with the given name.
getAttribute in interface Attributablename - name of the attribute to return.
null.
public void setAttribute(Attribute attribute)
throws IllegalValueException,
ConstraintViolationException
AttributableAttributable interface doesn't support an
Attribute with the name of the Attribute given
by attribute, the given attribute is not
handled by nor added to the attributes of the Attributable.
setAttribute in interface Attributableattribute - the attribute to be set.
ConstraintViolationException - is thrown when the value of the
given Attribute violates the constraint of the
Attribute to set.
IllegalValueException - is thrown when the value of the given
Attribute is illegal (for instance when it is null).public java.lang.Object getAttributeValue(java.lang.String name)
Attributable
getAttributeValue in interface Attributablename - the name of the attribute to return the value from.
public void setAttributeValue(java.lang.String name,
java.lang.Object value)
throws IllegalValueException,
ConstraintViolationException
AttributableAttributable interface doesn't support an
Attribute with the name given by name,
the attribute given through name and value
is not handled nor created by Attributable.
setAttributeValue in interface Attributablename - the name of the attribute.value - the value to set the attributes value to.
ConstraintViolationException - is thrown when the given
value violates the constraint of the
Attribute to set.
IllegalValueException - is thrown when the given value
is illegal (for instance when it is null).public AttributeType getAttributeType(java.lang.String name)
AttributableAttributeType of the attribute with the given
name.
getAttributeType in interface Attributablename - the name of the attribute.
public boolean registerLayoutEngine(NodeLayout layoutEngine)
registerLayout(NodeLayout) instead.
The method is about to be removed in future releases.
Layout for nodes into
the node layout pool.
layoutEngine - The new Layout that should be registered.
public boolean registerLayout(NodeLayout nodeLayout)
NodeLayout object into
the node layout pool.
Layout only by an alias name, the so-called layout context.
The method addLayoutContext(String, String)
must be used to create at least one valid alias. *
nodeLayout - The new NodeLayout that should be registered.
public boolean registerLayoutEngine(EdgeLayout edgeLayout)
registerLayout(EdgeLayout) instead.
The method is about to be removed in future releases.
EdgeLayout into
the edge layout pool.
edgeLayout - The new Layout that should be registered.
public boolean registerLayout(EdgeLayout edgeLayout)
EdgeLayout object into
the edge layout pool.
Layout by an alias name, the so-called layout context..
The method addLayoutContext(String, String)
must be used to create at least one valid alias.
edgeLayout - The new EdgeLayout that should be registered.
public boolean addLayoutContext(java.lang.String baseLayouter,
java.lang.String layoutContext)
NodeLayout or an EdgeLayout.
baseLayouter - The name of base Layout .
The Layout should be registered earlier. See
registerLayout(NodeLayout) or
registerLayout(EdgeLayout).layoutContext - The name for the new layout context
Node: A new layout context must be unique. You can
use the method isValidLayoutContext(String)
to check whether the provided name already exists.
baseLayouter is not valid.registerLayout(EdgeLayout),
registerLayout(NodeLayout),
removeLayoutContext(String),
duplicateLayoutContext(String, String)
public AttributeSet duplicateLayoutContext(java.lang.String templateLayoutContext,
java.lang.String newLayoutContext)
templateLayoutContext - The layout context that should be copied.newLayoutContext - The name of the new copy.
AttributeSet of the created layout context.public boolean removeLayoutContext(java.lang.String layoutContext)
layoutContext - The layout context that should be removed.
true if the operation was successfulpublic boolean isValidLayoutContext(java.lang.String layoutContext)
layoutContext - layout context that is to verify.
true if the specified layout context is valid;
otherwise false.public java.lang.String getBaseLayoutEngine(java.lang.String layoutContext)
getBaseLayouter(String) instead.
The method is about to be removed in future releases.
Layout of an specified
layout contexts.
layoutContext - The layout context of which the base Layout is requested.
public java.lang.String getBaseLayouter(java.lang.String layoutContext)
Layout of an specified
layout contexts.
layoutContext - The layout context of which the base Layout is requested.
base layouter that the specified layout context underlies.
The return value is null if the specified layoutContext is not valid.public java.lang.String[] getLayoutContextList()
isNodeLayoutContext(String)
can be used to find out whether a specified layout context is
associated with a NodeLayout or with an EdgeLayout.
getLayoutContextList(String),
getNodeLayoutContextList(),
getEdgeLayoutContextList()public java.lang.String[] getLayoutContextList(java.lang.String baseLayouter)
Layout .
baseLayouter - The Layout of which the associated layout contexts is requested.
Layout specified by baseLayouter.public java.lang.String[] getNodeLayoutContextList()
node layout contexts.
node layout contexts.public java.lang.String[] getEdgeLayoutContextList()
edge layout contexts.
edge layout contexts.public boolean isNodeLayoutContext(java.lang.String layoutContext)
NodeLayout, otherwise false.
layoutContext - the context that should be checked.
NodeLayout otherwise false.public java.lang.String[] getNodeLayouterList()
node layout contexts.getEdgeLayouterList()public java.lang.String[] getEdgeLayouterList()
getNodeLayouterList()public final java.lang.String getNodeLayoutContext()
Layoutable.getNodeLayoutContext()
getLayoutDomain(),
getEdgeLayoutContext()public void setNodeLayoutContext(java.lang.String layoutContext)
VisualGraph.
Please note that this method changes the edge layout context
according to the current layout domain and thus can be dependent
on the current selection.
You can also set the layout context of a graph directly by
using invoking method
Layoutable.setNodeLayoutContext(String)
layoutContext - the layout-context to use.setLayoutDomain(int)public final java.util.Map getPreviousNodeLayoutAttributeMap()
public final java.util.Map getPreviousNodeLayoutContextMap()
public final java.lang.String getEdgeLayoutContext()
Layoutable.getEdgeLayoutContext()
getLayoutDomain(),
getNodeLayoutContext()public void setEdgeLayoutContext(java.lang.String layoutContext)
VisualGraph.
Please note that this method changes the edge layout context
according to the current layout domain and thus can be dependent
on the current selection.
You can also set the layout context of a graph directly by
invoking method
Layoutable.setEdgeLayoutContext(String)
layoutContext - the layout-context to use.setLayoutDomain(int)public final java.util.Map getPreviousEdgeLayoutAttributeMap()
public final java.util.Map getPreviousEdgeLayoutContextMap()
public AttributeSet getNodeDefaultLayoutAttributes(java.lang.String layoutContext)
Layout which underlies the specified
layoutContext.
setLayoutAttribute(String, String, Object)
and setLayoutAttributeSet(String, AttributeSet).
The layout attributes configure the layout as a whole. But some
Layout also accept configuration of nodes to allow different
treatment.
layoutContext - specifies the layout context.
AttributeSet which the associated
Layout provides. The return value may be
null since some Layout do not offer special
attributes for nodes.AttributeSet,
getEdgeDefaultLayoutAttributes(String)public AttributeSet getEdgeDefaultLayoutAttributes(java.lang.String layoutContext)
Layout which underlies the specified
layoutContext.
setLayoutAttribute(String, String, Object)
and setLayoutAttributeSet(String, AttributeSet).
The layout attributes configure the layout as a whole. But some
Layout also accept configuration of edges to allow different
treatment.
layoutContext - specifies the layout context.
AttributeSet which the associated
Layout provides. The return value may be
null since some Layout do not offer special
attributes for edges.AttributeSet,
getNodeDefaultLayoutAttributes(String)public AttributeSet getLayoutAttributeSet(java.lang.String layoutContext)
AttributeSet of the specified layout context.
layoutContext - The layout context of which the attribute
set is requested.
AttributeSet of specified layout context.setLayoutAttribute(String, String, Object),
AttributeSet
public boolean setLayoutAttributeSet(java.lang.String layoutContext,
AttributeSet attributeSet)
LayoutController ensures that the modified
AttributeSet will be updated by the corresponding
Layout.
A Layout may change the AttributeSet if necessary.
A TreeLayout, for example, may change the attribute
layer distance to radius if the user changes
the arrangement type from plan to radial.
However, you can update layout attributes anytime using
updateLayoutAttributeSet(String, AttributeSet)
layoutContext - layout context of which the AttributeSet
is to be set.attributeSet - The new AttributeSet
true if the setting of attributes was successful.setLayoutAttributeSet(String, AttributeSet),
AttributeSet
public boolean setLayoutAttribute(java.lang.String layoutContext,
java.lang.String key,
java.lang.Object value)
value of a particular
attribute of a layout context.
layoutContext - The layout context which attribute is to be changed.key - The name of attribute which is to be set.value - The new value for the specified attribute.
true if the setting of attributes was successful.setLayoutAttributeSet(String, AttributeSet)
public java.lang.Object getLayoutAttribute(java.lang.String layoutContext,
java.lang.String key)
layoutContext - The layout context of which the attribute is requested.key - The name of the requested attribute.
getLayoutAttributeSet(String)
public void updateLayoutAttributeSet(java.lang.String layoutContext,
AttributeSet layoutAttribute)
AttributeSet
by modifying the attributes that depend on the current layout style.
The result of invoking this method is a consistent AttributeSet
that has non-conflicting attribute values. Under normal circumstance,
this method is internally invoked and should not be called by client code.
A TreeLayout, for example, may change the attribute
layer distance to radius if the user changes
the arrangement type from plan to radial.
layoutContext - The according layout contextlayoutAttribute - The AttributeSet which should be updatedpublic boolean error()
true if an error has occurred; otherwise false.
You can use getErrorMessage() to obtain
a description text about the last occurred error.
true if an error has occurred; otherwise false.public java.lang.String getErrorMessage()
error().
public AttributeSet getLayoutReport(java.lang.String layoutContext)
layoutContext - The layout context for which the report is to
be based upon.
AttributeSetpublic void addProgressListener(ProgressListener progresslistener)
ProgressListener. The progress bar will update during
the layout process.
progresslistener - a ProgressListenerpublic void removeProgressListener(ProgressListener progresslistener)
progresslistener - the ProgressListener that is
to be removed.protected void setBorder(VisualSubgraph visualsubgraph)
edge layouter keeps edges inside
subgraph area.
visualsubgraph - the subgraph of which the area is to be considered.public void considerCurrentEdgesRoute()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||