Interface LayoutListener
public interface LayoutListener
- Since:
- 2.0
- @noextend
- This interface is not intended to be extended by clients.
- @noimplement
- This interface is not intended to be implemented by clients.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
nodeMoved
(LayoutContext context, NodeLayout node) This method is called whenever location of a particular node is changed within observed context.boolean
nodeResized
(LayoutContext context, NodeLayout node) This method is called whenever size of a particular node is changed within observed context.boolean
subgraphMoved
(LayoutContext context, SubgraphLayout subgraph) This method is called whenever location of a particular subgraph is changed within observed context.boolean
subgraphResized
(LayoutContext context, SubgraphLayout subgraph) This method is called whenever size of a particular subgraph is changed within observed context.
-
Method Details
-
nodeMoved
This method is called whenever location of a particular node is changed within observed context. This usually implicates change of position (the center of the node) and the receiver should be aware of it (no additionalnodeMoved(LayoutContext, NodeLayout)
event will be fired). If true is returned, it means that the receiving listener has intercepted this event. Intercepted events will not be passed to the rest of the listeners. If the event is not intercepted by any listener,applyLayout(boolean)
will be called on the context's main algorithm.LayoutListener- Parameters:
context
- the layout context that fired the eventnode
- the node that has moved- Returns:
- true if no further operations after this event are required
-
nodeResized
This method is called whenever size of a particular node is changed within observed context. This usually implicates change of position (the center of the node) and the receiver should be aware of it (no additionalnodeMoved(LayoutContext, NodeLayout)
event will be fired). If true is returned, it means that the receiving listener has intercepted this event. Intercepted events will not be passed to the rest of the listeners. If the event is not intercepted by any listener,applyLayout(boolean)
will be called on the context's main algorithm.- Parameters:
context
- the layout context that fired the eventnode
- the node that was resized- Returns:
- true if no further operations after this event are required
-
subgraphMoved
This method is called whenever location of a particular subgraph is changed within observed context. If true is returned, it means that the receiving listener has intercepted this event. Intercepted events will not be passed to the rest of the listeners. If the event is not intercepted by any listener,applyLayout(boolean)
will be called on the context's main algorithm.- Parameters:
context
- the layout context that fired the eventsubgraph
- the subgraph that has moved- Returns:
- true if no further operations after this event are required
-
subgraphResized
This method is called whenever size of a particular subgraph is changed within observed context. This usually implicates change of position (the center of the node) and the receiver should be aware of it (no additionalnodeMoved(LayoutContext, NodeLayout)
event will be fired). If true is returned, it means that the receiving listener has intercepted this event. Intercepted events will not be passed to the rest of the listeners. If the event is not intercepted by any listener,applyLayout(boolean)
will be called on the context's main algorithm.- Parameters:
context
- the layout context that fired the eventsubgraph
- the subgraph that was resized- Returns:
- true if no further operations after this event are required
-