|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.util.AbstractDisposable | +--gumbo.util.relation.AbstractTreeNodeDelegator | +--gumbo.graphic.space.AbstractSpaceNode | +--gumbo.graphic.impl.swing.SwingSpaceNode | +--gumbo.visualize.data.impl.swing.SwingGraphView
A default graph view implemented using a JLayeredPane, which manages content shapes (vertices and edges) in layers. Shapes can be placed anywhere in the space, and can be overlapping. The client is responsible for view layout (see gumbo.visualize.data.layout). The default space tree delegate is an auto-node with a new relationship, wrapped as a root node.
In Swing, only content in the (+X, +Y) quadrant of the display space will be seen; and, the size of the display space (pane) effects the display scroll bar sensitivity. As such, the content bound is normalized during display validation so that it is in the visible quadrant and as close to the origin as possible; and, the space bound is set to the normalized content bound plus any border inset. Normalizing the content bound requires that all space tree children implement TranslationNode and AxisBound3Boundable.
Each child space node (vertex, edge) and its decorations (callouts, vertex ports), which collectively form the child shape, are contained in a separate pane layer. Within each shape layer the main shape is in the backmost position and any decorations should be in front of it. Vertex shapes, indicated as instances of SwingGraphVertex, are placed in front of all other shape types, which are assumed to be edge shapes.
The layout manager is set null since layout is intended to be performed by a view layout engine. The pane's preferred size is computed such that its contents is centered.
Field Summary | |
static java.lang.Integer |
LAYER_EDGE_BACK
Backmost layer used for edge shapes and their callouts. |
static java.lang.Integer |
LAYER_VERTEX_BACK
Backmost layer used for vertex shapes and their callouts. |
static javax.swing.border.Border |
VIEW_BORDER
Default world space border. |
static java.awt.Dimension |
VIEWPORT_SIZE
Default viewport size, in pixels. |
Constructor Summary | |
SwingGraphView(WholeView view)
|
Method Summary | |
DataView |
getDataView()
Gets the data view implemented by this graphic view. |
AxisBound3 |
getGraphicAxisBound3(AxisBound3 retVal)
Default implementation: Returns the combination of all the space tree child bounds. |
void |
implDispose()
Disposes the super, then disposes self. |
protected TreeNode |
newTreeNodeDelegate()
Default implementation: Returns a new AbstractTreeNode.Auto() subclass with a new TreeNodes.Tree relationship, and wrapped as a root node. |
void |
prepareGraphicPresence()
Informs this graphic entity that, in anticipation of realization, it should update as needed those aspects of its graphic state (geometry, appearance) and that of any dependents (siblings, descendants) that can affect its presentation. |
void |
realizeGraphicPresence()
Informs this graphic entity that external (sibling, ancestor) and internal (self, descendant) state changes that can affect its presentation are complete and assumed valid, and that it should update its presentation as needed to be consistent with its graphic state. |
Methods inherited from class gumbo.graphic.impl.swing.SwingSpaceNode |
canIntersectGraphic, getGraphic, getGraphicLocalSpace, getGraphicTransform, getGraphicTranslation, initSwingSpaceNode, intersectGraphic, isSpaceTransforming, setGraphicTranslation |
Methods inherited from class gumbo.graphic.space.AbstractSpaceNode |
getGraphicSpaceTree |
Methods inherited from class gumbo.util.relation.AbstractTreeNodeDelegator |
getTreeNodeDelegate |
Methods inherited from class gumbo.util.AbstractDisposable |
dispose, isDisposed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gumbo.graphic.Graphic |
getGraphic |
Methods inherited from interface gumbo.util.Disposable |
dispose, isDisposed |
Methods inherited from interface gumbo.graphic.space.SpaceNode |
getGraphicSpaceTree |
Field Detail |
public static final java.lang.Integer LAYER_VERTEX_BACK
public static final java.lang.Integer LAYER_EDGE_BACK
public static final java.awt.Dimension VIEWPORT_SIZE
public static final javax.swing.border.Border VIEW_BORDER
Constructor Detail |
public SwingGraphView(WholeView view)
Method Detail |
protected TreeNode newTreeNodeDelegate()
newTreeNodeDelegate
in class AbstractTreeNodeDelegator
public AxisBound3 getGraphicAxisBound3(AxisBound3 retVal)
getGraphicAxisBound3
in interface AxisBound3Boundable
getGraphicAxisBound3
in class SwingSpaceNode
retVal
- Return value object. The bound. Never null.
public void prepareGraphicPresence()
GraphicPresence
prepareGraphicPresence
in interface GraphicPresence
prepareGraphicPresence
in class SwingSpaceNode
public void realizeGraphicPresence()
GraphicPresence
realizeGraphicPresence
in interface GraphicPresence
realizeGraphicPresence
in class SwingSpaceNode
public DataView getDataView()
GraphicView
getDataView
in interface GraphicView
public void implDispose()
implDispose
in class SwingSpaceNode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |