public class PoshScene
extends org.netbeans.api.visual.graph.GraphScene
Use clearPoshWidgets to remove all PoshWidgets and its connections from the scene Set new root widget by setRootWidget and the rest should be handled by root widget that will recieve informations about new children, moved children or about deletions.
How to create:
org.netbeans.api.visual.graph.GraphScene.StringGraph| Constructor and Description |
|---|
PoshScene()
Create a new PoshScene, add default Pan and Zoom actions to the scene
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addGhostWidget(org.netbeans.api.visual.widget.Widget ghost)
Add widget to ghost layer, used for DnD
|
void |
addPoshWidget(PoshWidget newWidget,
boolean consolidate)
Add widget and its connection widget to the scene.
|
protected void |
attachEdgeSourceAnchor(Object arg0,
Object arg1,
Object arg2)
Not implemented, not usefull.
|
protected void |
attachEdgeTargetAnchor(Object arg0,
Object arg1,
Object arg2)
Not implemented, not usefull.
|
protected org.netbeans.api.visual.widget.Widget |
attachEdgeWidget(Object node)
Called by the addEdge method before the edge is registered to acquire
a widget that is going to represent the edge in the scene.
|
protected org.netbeans.api.visual.widget.Widget |
attachNodeWidget(Object node)
Called by the addNode method before the node is registered to acquire
a widget that is going to represent the node in the scene.
|
void |
clearPoshWidgets()
Clear the scene, remove all widgets from the PoshScene.
|
void |
consolidate()
Order all widgets to form a tree, root widget is in left top corner.
|
void |
deletePoshWidget(PoshWidget widget)
Remove widget and its connection from scene, doesn't consolidate
BEWARE: if it is not leaf that is removed, results are unpredictable.
|
Map<String,String> |
getActionsFQNMapping() |
protected List<org.netbeans.api.visual.widget.Widget> |
getPoshWidgets()
Return list of PoshWidgets that are in the main layer.
|
PoshWidget<? extends cz.cuni.amis.pogamut.sposh.elements.PoshElement> |
getRootWidget() |
Map<String,String> |
getSensesFQNMapping() |
boolean |
isInMainLayer(PoshWidget widget)
Check if the widget is in the main layer.
|
protected void |
removeGhostWidget(org.netbeans.api.visual.widget.Widget ghost)
Remove the widget from DnD layer
|
void |
setParsingError()
In case of parsing error, hide all widgets in the scene.
|
void |
setRootWidget(PoshWidget<? extends cz.cuni.amis.pogamut.sposh.elements.PoshElement> node)
Set root widget of the scene.
|
void |
setSourceUpdater(KidViewElement.SourceUpdater sourceUpdater)
Source updater will take the lap plan in its current tree form and serializes it into the document form
This is set every time I switch from text to graph view
XXX: My eyes are bleeding.
|
void |
updateSource() |
addEdge, addNode, detachEdgeWidget, detachNodeWidget, findEdgesBetween, findNodeEdges, getEdges, getEdgeSource, getEdgeTarget, getNodes, isEdge, isNode, notifyEdgeAdded, notifyNodeAdded, removeEdge, removeNode, removeNodeWithEdges, setEdgeSource, setEdgeTargetaddObject, addObjectSceneListener, createObjectHoverAction, createSelectAction, findObject, findStoredObject, findWidget, findWidgets, getFocusedObject, getHighlightedObjects, getHoveredObject, getIdentityCode, getObjects, getObjectState, getSelectedObjects, isObject, removeObject, removeObjectSceneListener, setFocusedObject, setHighlightedObjects, setHoveredObject, setSelectedObjects, userSelectionSuggestedaddSceneListener, 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, validateaddChild, 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, updateResourcespublic PoshScene()
public void clearPoshWidgets()
public boolean isInMainLayer(PoshWidget widget)
widget - widget that will be checked.public void setParsingError()
public void consolidate()
public void deletePoshWidget(PoshWidget widget)
widget - widget to deletepublic PoshWidget<? extends cz.cuni.amis.pogamut.sposh.elements.PoshElement> getRootWidget()
public void setRootWidget(PoshWidget<? extends cz.cuni.amis.pogamut.sposh.elements.PoshElement> node)
node - public void addPoshWidget(PoshWidget newWidget, boolean consolidate)
newWidget - widget that is being added to the treeconsolidate - should the method automaticaly consolidate the tree?protected org.netbeans.api.visual.widget.Widget attachNodeWidget(Object node)
attachNodeWidget in class org.netbeans.api.visual.graph.GraphScenenode - the node that is going to be addedprotected org.netbeans.api.visual.widget.Widget attachEdgeWidget(Object node)
attachEdgeWidget in class org.netbeans.api.visual.graph.GraphScenenode - the edge that is going to be addedprotected void attachEdgeSourceAnchor(Object arg0, Object arg1, Object arg2)
attachEdgeSourceAnchor in class org.netbeans.api.visual.graph.GraphSceneprotected void attachEdgeTargetAnchor(Object arg0, Object arg1, Object arg2)
attachEdgeTargetAnchor in class org.netbeans.api.visual.graph.GraphSceneprotected void addGhostWidget(org.netbeans.api.visual.widget.Widget ghost)
ghost - Widget to be added to the layerprotected void removeGhostWidget(org.netbeans.api.visual.widget.Widget ghost)
ghost - widget to be removed from the DnD layerprotected List<org.netbeans.api.visual.widget.Widget> getPoshWidgets()
public void setSourceUpdater(KidViewElement.SourceUpdater sourceUpdater)
sourceUpdater - public void updateSource()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.