Interface GraphStructureListener
- All Known Implementing Classes:
GraphStructureListener.Stub
public interface GraphStructureListener
- Since:
- 2.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionboolean
connectionAdded
(LayoutContext context, ConnectionLayout connection) This method is called whenever a connection is added to a context.boolean
connectionRemoved
(LayoutContext context, ConnectionLayout connection) This method is called whenever a connection is removed from a context.boolean
nodeAdded
(LayoutContext context, NodeLayout node) This method is called whenever a node is added to a context.boolean
nodeRemoved
(LayoutContext context, NodeLayout node) This method is called whenever a node is removed from a context.
-
Method Details
-
nodeAdded
This method is called whenever a node is added to a context. No separate events will be fired for eventual connections adjacent to the added node. 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 added node- Returns:
- true if no further operations after this event are required
-
nodeRemoved
This method is called whenever a node is removed from a context. No separate events will be fired for eventual connections adjacent to the removed node. 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 context that fired the eventnode
- the removed node- Returns:
- true if no further operations after this event are required
-
connectionAdded
This method is called whenever a connection is added to a context. It can be assumed that both source and target nodes of the added connection already exist in the context. This method will be called only if both nodes connected by added connection lay directly in the node container owned by the notifying layout 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 context that fired the eventconnection
- the added connection- Returns:
- true if no further operations after this event are required
-
connectionRemoved
This method is called whenever a connection is removed from a context. It can be assumed that both source and target nodes of the removed connection still exist in the context and will not be removed along with it. This method will be called only if both nodes connected by removed connection lay directly in the node container owned by the notifying layout 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 context that fired the eventconnection
- the added connection- Returns:
- true if no further operations after this event are required
-