bibliothek.gui.dock.station.screen.magnet
Interface StickMagnetGraph.Node

All Known Implementing Classes:
StickMagnetGraph.DefaultNode
Enclosing class:
StickMagnetGraph

public static interface StickMagnetGraph.Node

Represents one node of the graph.

Author:
Benjamin Sigg

Method Summary
 StickMagnetGraphConstraint getConstraints()
          Gets the constraints telling how this node has to be modified.
 StickMagnetGraph.Edge[] getEdges()
          Gets a list of all edges that either start or end at this node.
 MagnetRequest.Side getNeighbor(ScreenDockWindow window)
          Tells whether window is a neighbor of this node and depends on this node, and if so tells on which side of this node window lies.
 ScreenDockWindow getWindow()
          Gest the window which is described by this node.
 boolean isMarked()
          Tells whether a flag was set by mark().
 void mark()
          Marks this node with a flag.
 void unmark()
          Unmarks this node from the flag that was set by mark().
 void visit(StickMagnetGraph.Visitor visitor)
          Visits this node and all its children.
 

Method Detail

getWindow

ScreenDockWindow getWindow()
Gest the window which is described by this node.

Returns:
the window

getNeighbor

MagnetRequest.Side getNeighbor(ScreenDockWindow window)
Tells whether window is a neighbor of this node and depends on this node, and if so tells on which side of this node window lies.

Parameters:
window - a window that might be a neighbor of this node
Returns:
the side at which window lies or null

getEdges

StickMagnetGraph.Edge[] getEdges()
Gets a list of all edges that either start or end at this node.

Returns:
the list of edges, may be empty

visit

void visit(StickMagnetGraph.Visitor visitor)
Visits this node and all its children.

Parameters:
visitor - the visitor used to traverse the node

getConstraints

StickMagnetGraphConstraint getConstraints()
Gets the constraints telling how this node has to be modified.

Returns:
the constraints, not null

mark

void mark()
Marks this node with a flag.


unmark

void unmark()
Unmarks this node from the flag that was set by mark().


isMarked

boolean isMarked()
Tells whether a flag was set by mark().