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 Type
    Method
    Description
    boolean
    This method is called whenever location of a particular node is changed within observed context.
    boolean
    This method is called whenever size of a particular node is changed within observed context.
    boolean
    This method is called whenever location of a particular subgraph is changed within observed context.
    boolean
    This method is called whenever size of a particular subgraph is changed within observed context.
  • Method Details

    • nodeMoved

      boolean nodeMoved(LayoutContext context, NodeLayout node)
      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 additional nodeMoved(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 event
      node - the node that has moved
      Returns:
      true if no further operations after this event are required
    • nodeResized

      boolean nodeResized(LayoutContext context, NodeLayout node)
      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 additional nodeMoved(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 event
      node - the node that was resized
      Returns:
      true if no further operations after this event are required
    • subgraphMoved

      boolean subgraphMoved(LayoutContext context, SubgraphLayout subgraph)
      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 event
      subgraph - the subgraph that has moved
      Returns:
      true if no further operations after this event are required
    • subgraphResized

      boolean subgraphResized(LayoutContext context, SubgraphLayout subgraph)
      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 additional nodeMoved(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 event
      subgraph - the subgraph that was resized
      Returns:
      true if no further operations after this event are required