Class VMDGraphScene
java.lang.Object
org.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.Scene
org.netbeans.api.visual.model.ObjectScene
org.netbeans.api.visual.graph.GraphPinScene<String,String,String>
org.netbeans.api.visual.vmd.VMDGraphScene
- All Implemented Interfaces:
Accessible
,org.openide.util.Lookup.Provider
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a VMD graph scene.VMDGraphScene
(VMDColorScheme scheme) Creates a VMD graph scene with a specific color scheme. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
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, clearObjectState, createObjectHoverAction, createSelectAction, findObject, findObjectState, findStoredObject, findWidget, findWidgets, getFocusedObject, getHighlightedObjects, getHoveredObject, getIdentityCode, getObjects, getObjectState, getSelectedObjects, isObject, removeObject, removeObjectMapping, removeObjectSceneListener, setFocusedObject, setHighlightedObjects, setHoveredObject, setSelectedObjects, userSelectionSuggested
Methods inherited from class org.netbeans.api.visual.widget.Scene
addSceneListener, convertSceneToView, convertSceneToView, convertViewToScene, 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
-
Field Details
-
PIN_ID_DEFAULT_SUFFIX
- See Also:
-
-
Constructor Details
-
VMDGraphScene
public VMDGraphScene()Creates a VMD graph scene. -
VMDGraphScene
Creates a VMD graph scene with a specific color scheme.- Parameters:
scheme
- the color scheme
-
-
Method Details
-
attachNodeWidget
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 classGraphPinScene<String,
String, String> - Parameters:
node
- the node- Returns:
- the widget attached to the node
-
attachPinWidget
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 classGraphPinScene<String,
String, String> - Parameters:
node
- the nodepin
- the pin- Returns:
- the widget attached to the pin, null, if it is a default pin
-
attachEdgeWidget
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 classGraphPinScene<String,
String, String> - Parameters:
edge
- the edge- Returns:
- the widget attached to the edge
-
attachEdgeSourceAnchor
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 classGraphPinScene<String,
String, String> - Parameters:
edge
- the edgeoldSourcePin
- the old source pinsourcePin
- the new source pin
-
attachEdgeTargetAnchor
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 classGraphPinScene<String,
String, String> - Parameters:
edge
- the edgeoldTargetPin
- the old target pintargetPin
- the new target pin
-
layoutScene
public void layoutScene()Invokes layout of the scene.
-