org.netbeans.api.visual 2.17.1

org.netbeans.api.visual.vmd
Class VMDGraphScene

java.lang.Object
  extended by org.netbeans.api.visual.widget.Widget
      extended by org.netbeans.api.visual.widget.Scene
          extended by org.netbeans.api.visual.model.ObjectScene
              extended by org.netbeans.api.visual.graph.GraphPinScene<String,String,String>
                  extended by org.netbeans.api.visual.vmd.VMDGraphScene
All Implemented Interfaces:
Accessible

public class VMDGraphScene
extends GraphPinScene<String,String,String>

This class represents a GraphPinScene for the VMD visualization style. Nodes, edges and pins are represented using String class. The visualization is done by: VMDNodeWidget for nodes, VMDPinWidget for pins, ConnectionWidget fro edges.

The scene has 4 layers: background, main, connection, upper.

The scene has following actions: zoom, panning, rectangular selection.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.api.visual.graph.GraphPinScene
GraphPinScene.StringGraph
 
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Scene
Scene.SceneListener
 
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget
Widget.Dependency
 
Field Summary
static String PIN_ID_DEFAULT_SUFFIX
           
 
Constructor Summary
VMDGraphScene()
          Creates a VMD graph scene.
VMDGraphScene(VMDColorScheme scheme)
          Creates a VMD graph scene with a specific color scheme.
 
Method Summary
protected  void attachEdgeSourceAnchor(String edge, String oldSourcePin, String sourcePin)
          Attaches an anchor of a source pin an edge.
protected  void attachEdgeTargetAnchor(String edge, String oldTargetPin, String targetPin)
          Attaches an anchor of a target pin an edge.
protected  Widget attachEdgeWidget(String edge)
          Implements attaching a widget to an edge.
protected  Widget attachNodeWidget(String node)
          Implements attaching a widget to a node.
protected  Widget attachPinWidget(String node, String pin)
          Implements attaching a widget to a pin.
 void layoutScene()
          Invokes layout of the scene.
 
Methods inherited from class org.netbeans.api.visual.graph.GraphPinScene
addEdge, addNode, addPin, detachEdgeWidget, detachNodeWidget, detachPinWidget, findEdgesBetween, findPinEdges, getEdges, getEdgeSource, getEdgeTarget, getNodePins, getNodes, getPinNode, getPins, isEdge, isNode, isPin, notifyEdgeAdded, notifyNodeAdded, notifyPinAdded, removeEdge, removeNode, removeNodeWithEdges, removePin, removePinWithEdges, setEdgeSource, setEdgeTarget
 
Methods inherited from class org.netbeans.api.visual.model.ObjectScene
addObject, addObjectSceneListener, createObjectHoverAction, createSelectAction, findObject, findStoredObject, findWidget, findWidgets, getFocusedObject, getHighlightedObjects, getHoveredObject, getIdentityCode, getObjects, getObjectState, getSelectedObjects, isObject, removeObject, removeObjectSceneListener, setFocusedObject, setHighlightedObjects, setHoveredObject, setSelectedObjects, userSelectionSuggested
 
Methods inherited from class org.netbeans.api.visual.widget.Scene
addSceneListener, convertSceneToView, convertSceneToView, convertViewToScene, createBirdView, createSatelliteView, createView, createWidgetHoverAction, getActiveTool, getDefaultFont, getFocusedWidget, getGraphics, getInputBindings, getKeyEventProcessingType, getLookFeel, getMaximumBounds, getPriorActions, getResourceTable, getSceneAnimator, getView, getZoomFactor, isRepaintRequiredForRevalidating, isValidated, paint, removeSceneListener, setActiveTool, setFocusedWidget, setKeyEventProcessingType, setLookFeel, setMaximumBounds, setResourceTable, setZoomFactor, validate, validate
 
Methods inherited from class org.netbeans.api.visual.widget.Widget
addChild, addChild, addChild, addChild, addChildren, addDependency, bringToBack, bringToFront, calculateClientArea, convertLocalToScene, convertLocalToScene, convertSceneToLocal, convertSceneToLocal, createActions, equals, getAccessibleContext, getActions, getActions, getBackground, getBorder, getBounds, getChildConstraint, getChildren, getClientArea, getCursor, getCursorAt, getDependencies, getFont, getForeground, getLayout, getLocation, getLookup, getMaximumSize, getMinimumSize, getParentWidget, getPreferredBounds, getPreferredLocation, getPreferredSize, getScene, getState, getToolTipText, hashCode, isCheckClipping, isEnabled, isHitAt, isOpaque, isPreferredBoundsSet, isVisible, notifyAdded, notifyBackgroundChanged, notifyFontChanged, notifyForegroundChanged, notifyRemoved, notifyStateChanged, paint, paintBackground, paintBorder, paintChildren, paintWidget, removeChild, removeChildren, removeChildren, removeDependency, removeFromParent, repaint, resolveBounds, revalidate, revalidate, setAccessibleContext, setBackground, setBackgroundFromResource, setBorder, setBorder, setCheckClipping, setChildConstraint, setCursor, setEnabled, setFont, setFontFromResource, setForeground, setForegroundFromResource, setLayout, setMaximumSize, setMinimumSize, setOpaque, setPreferredBounds, setPreferredLocation, setPreferredSize, setState, setToolTipText, setVisible, updateResources
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PIN_ID_DEFAULT_SUFFIX

public static final String PIN_ID_DEFAULT_SUFFIX
See Also:
Constant Field Values
Constructor Detail

VMDGraphScene

public VMDGraphScene()
Creates a VMD graph scene.


VMDGraphScene

public VMDGraphScene(VMDColorScheme scheme)
Creates a VMD graph scene with a specific color scheme.

Parameters:
scheme - the color scheme
Method Detail

attachNodeWidget

protected Widget attachNodeWidget(String node)
Implements attaching a widget to a node. The widget is VMDNodeWidget and has object-hover, select, popup-menu and move actions.

Specified by:
attachNodeWidget in class GraphPinScene<String,String,String>
Parameters:
node - the node
Returns:
the widget attached to the node

attachPinWidget

protected Widget attachPinWidget(String node,
                                 String pin)
Implements attaching a widget to a pin. The widget is VMDPinWidget and has object-hover and select action. The the node id ends with "#default" then the pin is the default pin of a node and therefore it is non-visual.

Specified by:
attachPinWidget in class GraphPinScene<String,String,String>
Parameters:
node - the node
pin - the pin
Returns:
the widget attached to the pin, null, if it is a default pin

attachEdgeWidget

protected Widget attachEdgeWidget(String edge)
Implements attaching a widget to an edge. the widget is ConnectionWidget and has object-hover, select and move-control-point actions.

Specified by:
attachEdgeWidget in class GraphPinScene<String,String,String>
Parameters:
edge - the edge
Returns:
the widget attached to the edge

attachEdgeSourceAnchor

protected void attachEdgeSourceAnchor(String edge,
                                      String oldSourcePin,
                                      String sourcePin)
Attaches an anchor of a source pin an edge. The anchor is a ProxyAnchor that switches between the anchor attached to the pin widget directly and the anchor attached to the pin node widget based on the minimize-state of the node.

Specified by:
attachEdgeSourceAnchor in class GraphPinScene<String,String,String>
Parameters:
edge - the edge
oldSourcePin - the old source pin
sourcePin - the new source pin

attachEdgeTargetAnchor

protected void attachEdgeTargetAnchor(String edge,
                                      String oldTargetPin,
                                      String targetPin)
Attaches an anchor of a target pin an edge. The anchor is a ProxyAnchor that switches between the anchor attached to the pin widget directly and the anchor attached to the pin node widget based on the minimize-state of the node.

Specified by:
attachEdgeTargetAnchor in class GraphPinScene<String,String,String>
Parameters:
edge - the edge
oldTargetPin - the old target pin
targetPin - the new target pin

layoutScene

public void layoutScene()
Invokes layout of the scene.


org.netbeans.api.visual 2.17.1

Built on November 10 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.