org.eclipse.gef.ui.parts
Class FreeformGraphicalRootEditPart
java.lang.Object
|
+--org.eclipse.gef.editparts.AbstractEditPart
|
+--org.eclipse.gef.editparts.AbstractGraphicalEditPart
|
+--org.eclipse.gef.ui.parts.FreeformGraphicalRootEditPart
- All Implemented Interfaces:
- EditPart, GraphicalEditPart, IAdaptable, LayerConstants, LayerManager, RequestConstants, RootEditPart
- public class FreeformGraphicalRootEditPart
- extends AbstractGraphicalEditPart
- implements RootEditPart, LayerConstants, LayerManager
Provides support for representation of any other graphical
EditPart. It contains Layers which are used to represent
specific type of visual information. The Layers are
(1) Primary - Used to hold the main EditPart's Figures.
(2) Connection - Used to hold the connections between EditParts.
(3) Handle - Takes care of holding handles for EditParts.
(4) Feedback - Shows feedback information for the EditParts.
| Fields inherited from interface org.eclipse.gef.editparts.LayerManager |
ID |
| Fields inherited from interface org.eclipse.gef.RequestConstants |
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILD, REQ_ALIGN_CHILDREN, REQ_ANCESTOR_DELETED, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_BENDPOINT, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILD, REQ_MOVE_CHILDREN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_END, REQ_RECONNECT_SOURCE, REQ_RECONNECT_START, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILD, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER, REQ_SOURCE_DELETED, REQ_TARGET_DELETED |
| Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
activate, addChildVisual, addSourceConnection, addTargetConnection, deactivate, dispose, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getAdapter, getFigure, getModelSourceConnections, getModelTargetConnections, getParentingFigure, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeChildVisual, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, shouldInitialize, unregister |
| Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart |
activateEditPolicies, addChild, addEditPartListener, createChild, createConnection, createOrFindConnection, deactivateEditPolicies, debug, debugFeedback, doInitialize, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getAccessibleEditPart, getChildren, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getKeyHandler, getModelChildren, getParent, getSelected, getTargetEditPart, hasFocus, initialize, installEditPolicy, isActive, isSelectable, performRequest, refreshVisuals, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, toString, understandsRequest, unregisterAccessibility, unregisterModel |
| Methods inherited from interface org.eclipse.gef.EditPart |
activate, addEditPartListener, deactivate, dispose, eraseSourceFeedback, eraseTargetFeedback, getChildren, getEditPolicy, getKeyHandler, getParent, getSelected, getTargetEditPart, hasFocus, installEditPolicy, performRequest, refresh, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
contents
protected EditPart contents
viewer
protected EditPartViewer viewer
FreeformGraphicalRootEditPart
public FreeformGraphicalRootEditPart()
createEditPolicies
protected void createEditPolicies()
- Description copied from class:
AbstractEditPart
Creates
the initial EditPolicies and reserves slots for dynamic ones.
Should be overridden to install the inital edit policies based on the
model's initial state.
null can be used to reserve a "slot", should there be
some desire to guarantee the ordering of EditPolcies.
- Overrides:
createEditPolicies in class AbstractEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractEditPart
- See Also:
AbstractEditPart.doInitialize(),
AbstractEditPart.installEditPolicy(Object, EditPolicy)
createFigure
protected IFigure createFigure()
- Description copied from class:
AbstractGraphicalEditPart
- Returns the figure to be used as this part's visuals.
- Overrides:
createFigure in class AbstractGraphicalEditPart
getCommand
public Command getCommand(Request req)
- Doesnt provide any command support, returns an
un-executable command
- Specified by:
getCommand in interface EditPart- Overrides:
getCommand in class AbstractEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractEditPart
- Parameters:
Request - A request describing the command to be created.- See Also:
EditPolicy.getCommand(Request)
getContentPane
public IFigure getContentPane()
- Returns the figure to which childrens' figures will be added.
An example would be a ScrollPane. Figures of child editpart are not
added to the ScrollPane, but to its ViewPort's View.
- Overrides:
getContentPane in class AbstractGraphicalEditPart
getContents
public EditPart getContents()
- Specified by:
getContents in interface RootEditPart
getDragTracker
public DragTracker getDragTracker(Request req)
- Return a drag tracker suitable for dragging this.
- Specified by:
getDragTracker in interface EditPart- Overrides:
getDragTracker in class AbstractGraphicalEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractGraphicalEditPart
- Parameters:
Request - A Request describing the type of drag.
getLayer
public IFigure getLayer(Object key)
- Returns the layer for the given key
- Specified by:
getLayer in interface LayerManager- Overrides:
getLayer in class AbstractGraphicalEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractGraphicalEditPart
- Parameters:
layer - Name of the Layer to be returned- Returns:
- The layer with the given name.
getModel
public Object getModel()
- Returns the model of this EditPart.
- Specified by:
getModel in interface EditPart- Overrides:
getModel in class AbstractEditPart
getRoot
public RootEditPart getRoot()
- Description copied from interface:
EditPart
- Returns the root EditPart.
This method should only be called internally or by helpers such as
edit policies.
- Specified by:
getRoot in interface EditPart- Overrides:
getRoot in class AbstractEditPart
getViewer
public EditPartViewer getViewer()
- Description copied from interface:
RootEditPart
- Return the EditPartViewerviewer for this root.
- Specified by:
getViewer in interface RootEditPart- Overrides:
getViewer in class AbstractEditPart
- Following copied from interface:
org.eclipse.gef.RootEditPart
- Returns:
- viewer The viewer.
refreshChildren
protected void refreshChildren()
- Description copied from class:
AbstractEditPart
Refreshes the set of Children.
This method should not be overridden. AbstractEditPart.createChild(Object)
and AbstractEditPart.getModelChildren() should be overridden together.
- Overrides:
refreshChildren in class AbstractEditPart
setContents
public void setContents(EditPart editpart)
- Sets the contents. The root contains a single child, it's contents.
- Specified by:
setContents in interface RootEditPart
setViewer
public void setViewer(EditPartViewer newViewer)
- Sets the viewer.
- Specified by:
setViewer in interface RootEditPart
- Parameters:
viewer - EditPartViewer.