Class FreeformGraphicalRootEditPart
- All Implemented Interfaces:
- IAdaptable,- EditPart,- LayerManager,- GraphicalEditPart,- LayerConstants,- RequestConstants,- RootEditPart
- Direct Known Subclasses:
- ScalableFreeformRootEditPart
FreeformFigures as the layers in the diagram. The
 contents editpart must provide a
 FreeformFigure as its figure. Freeform figures are special because they can
 expand in any direction. This allows the user to drag objects or bendpoints
 into the negative X and Y coordinates of a diagram. If this feature is not
 being used, clients should use the FreeformGraphicalRootEditPart as
 their viewer's root editpart.
 
 IMPORTANT: The contents editpart that is added to a freeform root
 should have a FreeformFigure (such as FreeformLayer) as its
 Figure. The primary layer is not using a draw2d LayoutManager, and
 will not size the contents' figure properly unless it is a freeform figure.
 
 IMPORTANT:The freeform root uses a FreeformViewport as
 its primary figure. This class must be used with the
 ScrollingGraphicalViewer. The viewport gets
 installed into that viewer's FigureCanvas, which
 provides native scrollbars for scrolling the viewport.
 
 This root serves as the diagram's
 LayerManager, providing the following layer
 structure, in top-to-bottom order:
 
| Root Freeform Layered Pane | |
| ├ | Feedback Layer | 
| ├ | Handle Layer | 
| └ | Printable Layers | 
| ├ Connection Layer | |
| └ Primary Layer | |
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPartAbstractGraphicalEditPart.AccessibleGraphicalEditPart, AbstractGraphicalEditPart.DefaultAccessibleAnchorProviderNested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPartAbstractEditPart.EditPolicyIteratorNested classes/interfaces inherited from interface org.eclipse.gef.editparts.LayerManagerLayerManager.Helper
- 
Field SummaryFields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPartfigure, sourceConnections, targetConnectionsFields inherited from class org.eclipse.gef.editparts.AbstractEditPartchildren, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAGFields inherited from interface org.eclipse.gef.EditPartSELECTED, SELECTED_NONE, SELECTED_PRIMARYFields inherited from interface org.eclipse.gef.LayerConstantsCONNECTION_LAYER, FEEDBACK_LAYER, GRID_LAYER, GUIDE_LAYER, HANDLE_LAYER, PRIMARY_LAYER, PRINTABLE_LAYERS, SCALABLE_LAYERS, SCALED_FEEDBACK_LAYERFields inherited from interface org.eclipse.gef.editparts.LayerManagerIDFields inherited from interface org.eclipse.gef.RequestConstantsREQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected IFigureThe default root figure is a figure with a stack layout.protected GridLayerCreates agrid.protected voidcreateLayers(LayeredPane layeredPane) Creates the top-most set of layers on the given layered pane.protected LayeredPaneCreates a layered pane and the layers that should be printed.<T> TgetAdapter(Class<T> adapter) ExtendsAbstractEditPart.getAdapter(Class)to handle additional adapter types.The contents' Figure will be added to the PRIMARY_LAYER.getDragTracker(Request req) Should not be called, but returns a MarqeeDragTracker for good measure.Returns the layer indicated by the key.getModel()The root editpart does not have a real model.protected LayeredPaneReturns the LayeredPane that should be used during printing.protected voidUpdates thegridbased on properties set on thegraphical viewer:SnapToGrid.PROPERTY_GRID_VISIBLE,SnapToGrid.PROPERTY_GRID_SPACING, andSnapToGrid.PROPERTY_GRID_ORIGIN.protected voidregister()Registers itself in the viewer's various registries.protected voidUndoes any registration performed byAbstractEditPart.register().Methods inherited from class org.eclipse.gef.editparts.SimpleRootEditPartcreateEditPolicies, getCommand, getContents, getRoot, getViewer, refreshChildren, setContents, setViewerMethods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPartactivate, addChildVisual, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, deactivate, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getChildren, getFigure, getModelSourceConnections, getModelTargetConnections, getSourceConnections, getTargetConnections, isSelectable, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeChildVisual, removeNodeListener, removeNotify, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisualsMethods inherited from class org.eclipse.gef.editparts.AbstractEditPartactivateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getAccessibleEditPart, getEditPolicy, getEditPolicyIterable, getEditPolicyIterator, getEventListeners, getEventListenersIterable, getFlag, getModelChildren, getParent, getSelected, getTargetEditPart, hasFocus, installEditPolicy, isActive, performRequest, refreshVisuals, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, toString, understandsRequest, unregisterAccessibility, unregisterModelMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.gef.EditPartactivate, addEditPartListener, addNotify, deactivate, eraseSourceFeedback, eraseTargetFeedback, getEditPolicy, getParent, getSelected, getTargetEditPart, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest
- 
Constructor Details- 
FreeformGraphicalRootEditPartpublic FreeformGraphicalRootEditPart()
 
- 
- 
Method Details- 
createFigureDescription copied from class:SimpleRootEditPartThe default root figure is a figure with a stack layout.- Overrides:
- createFigurein class- SimpleRootEditPart
- Returns:
- a Figure
- See Also:
 
- 
createGridLayerCreates agrid. Sub-classes can override this method to customize the appearance of the grid. The grid layer should be the first layer (i.e., beneath the primary layer) if it is not to cover up parts on the primary layer. In that case, the primary layer should be transparent so that the grid is visible.- Returns:
- the newly created GridLayer
 
- 
createLayersCreates the top-most set of layers on the given layered pane.- Parameters:
- layeredPane- the parent for the created layers
 
- 
createPrintableLayersCreates a layered pane and the layers that should be printed.- Returns:
- a new LayeredPane containing the printable layers
- See Also:
 
- 
getAdapterDescription copied from class:AbstractGraphicalEditPartExtendsAbstractEditPart.getAdapter(Class)to handle additional adapter types. Currently, these types includeAccessibleHandleProviderandAccessibleAnchorProvider. Subclasses should extend this method to support additional adapter types, or to replace the default provided adapters.- Specified by:
- getAdapterin interface- IAdaptable
- Overrides:
- getAdapterin class- AbstractGraphicalEditPart
- See Also:
 
- 
getContentPaneThe contents' Figure will be added to the PRIMARY_LAYER.- Specified by:
- getContentPanein interface- GraphicalEditPart
- Overrides:
- getContentPanein class- AbstractGraphicalEditPart
- Returns:
- the content pane Figure
- See Also:
 
- 
getDragTrackerShould not be called, but returns a MarqeeDragTracker for good measure.- Specified by:
- getDragTrackerin interface- EditPart
- Overrides:
- getDragTrackerin class- AbstractGraphicalEditPart
- Parameters:
- req- a- Requestindicating the context of the drag
- Returns:
- nullor a DragTracker
- See Also:
 
- 
getLayerReturns the layer indicated by the key. Searches all layered panes.- Specified by:
- getLayerin interface- LayerManager
- Overrides:
- getLayerin class- AbstractGraphicalEditPart
- Parameters:
- key- ID of the Layer
- Returns:
- The requested layer or nullif it doesn't exist
- See Also:
 
- 
getModelThe root editpart does not have a real model. The LayerManager ID is returned so that this editpart gets registered using that key.- Specified by:
- getModelin interface- EditPart
- Overrides:
- getModelin class- AbstractEditPart
- Returns:
- nullor the primary model object
- See Also:
 
- 
getPrintableLayersReturns the LayeredPane that should be used during printing. This layer will be identified usingLayerConstants.PRINTABLE_LAYERS.- Returns:
- the layered pane containing all printable content
 
- 
refreshGridLayerprotected void refreshGridLayer()Updates thegridbased on properties set on thegraphical viewer:SnapToGrid.PROPERTY_GRID_VISIBLE,SnapToGrid.PROPERTY_GRID_SPACING, andSnapToGrid.PROPERTY_GRID_ORIGIN.This method is invoked initially when the GridLayer is created, and when any of the above-mentioned properties are changed on the viewer. 
- 
registerprotected void register()Description copied from class:AbstractEditPartRegisters itself in the viewer's various registries. If your EditPart has a 1-to-1 relationship with a visual object and a 1-to-1 relationship with a model object, the default implementation should be sufficient.- Overrides:
- registerin class- AbstractEditPart
- See Also:
 
- 
unregisterprotected void unregister()Description copied from class:AbstractEditPartUndoes any registration performed byAbstractEditPart.register(). The provided base classes will correctly unregister their visuals.- Overrides:
- unregisterin class- AbstractEditPart
- See Also:
 
 
-