|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.gef.editparts.AbstractEditPart | +--org.eclipse.gef.editparts.AbstractGraphicalEditPart | +--org.eclipse.gef.editparts.FreeformGraphicalRootEditPart
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.
Nested Class Summary |
Nested classes inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
AbstractGraphicalEditPart.AccessibleGraphicalEditPart, AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider |
Nested classes inherited from class org.eclipse.gef.editparts.AbstractEditPart |
AbstractEditPart.EditPolicyIterator |
Nested classes inherited from class org.eclipse.gef.editparts.LayerManager |
LayerManager.Helper |
Field Summary | |
protected EditPart |
contents
|
protected EditPartViewer |
viewer
|
Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
figure, sourceConnections, targetConnections |
Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart |
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG |
Fields inherited from interface org.eclipse.gef.EditPart |
SELECTED, SELECTED_NONE, SELECTED_PRIMARY |
Fields inherited from interface org.eclipse.gef.LayerConstants |
CONNECTION_LAYER, FEEDBACK_LAYER, HANDLE_LAYER, PRIMARY_LAYER, PRINTABLE_LAYERS |
Fields inherited from interface org.eclipse.gef.editparts.LayerManager |
ID |
Fields inherited from interface org.eclipse.gef.RequestConstants |
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, 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 Summary | |
FreeformGraphicalRootEditPart()
|
Method Summary | |
protected void |
createEditPolicies()
Creates the initial EditPolicies and/or reserves slots for dynamic ones. |
protected org.eclipse.draw2d.IFigure |
createFigure()
Creates the Figure to be used as this part's visuals. |
protected void |
createLayers(org.eclipse.draw2d.LayeredPane layeredPane)
|
protected org.eclipse.draw2d.LayeredPane |
createPrintableLayers()
|
Object |
getAdapter(Class adapter)
Extends AbstractEditPart.getAdapter(Class) to handle additional adapter types.
|
Command |
getCommand(Request req)
Doesnt provide any command support, returns an un-executable command |
org.eclipse.draw2d.IFigure |
getContentPane()
Returns the figure to which childrens' figures will be added. |
EditPart |
getContents()
Returns the contents EditPart. |
DragTracker |
getDragTracker(Request req)
Return a drag tracker suitable for dragging this. |
org.eclipse.draw2d.IFigure |
getLayer(Object key)
Returns the layer for the given key |
Object |
getModel()
Returns the model of this EditPart. |
protected org.eclipse.draw2d.LayeredPane |
getPrintableLayers()
|
RootEditPart |
getRoot()
Returns the RootEditPart . |
EditPartViewer |
getViewer()
Returns the root's EditPartViewer. |
protected void |
refreshChildren()
Updates the set of children EditParts so that it is in sync with the model children. |
void |
setContents(EditPart editpart)
Sets the contents. |
void |
setViewer(EditPartViewer newViewer)
Sets the viewer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.gef.EditPart |
activate, addEditPartListener, addNotify, deactivate, eraseSourceFeedback, eraseTargetFeedback, getChildren, getEditPolicy, getParent, getSelected, getTargetEditPart, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
Field Detail |
protected EditPart contents
protected EditPartViewer viewer
Constructor Detail |
public FreeformGraphicalRootEditPart()
Method Detail |
protected void createEditPolicies()
AbstractEditPart
null
can be used to reserve a "slot", should there be some desire to
guarantee the ordering of EditPolcies.
createEditPolicies
in class AbstractEditPart
#doInitialize()
,
EditPart.installEditPolicy(Object, EditPolicy)
protected org.eclipse.draw2d.IFigure createFigure()
AbstractGraphicalEditPart
Figure
to be used as this part's visuals. This is
called from AbstractGraphicalEditPart.getFigure()
if the figure has not been created.
createFigure
in class AbstractGraphicalEditPart
protected void createLayers(org.eclipse.draw2d.LayeredPane layeredPane)
protected org.eclipse.draw2d.LayeredPane createPrintableLayers()
public Object getAdapter(Class adapter)
AbstractGraphicalEditPart
AbstractEditPart.getAdapter(Class)
to handle additional adapter types.
Currently, these types include AccessibleHandleProvider
and AccessibleAnchorProvider
. Subclasses should extend this method to support
additional adapter types, or to replace the default provided adapaters.
getAdapter
in interface IAdaptable
getAdapter
in class AbstractGraphicalEditPart
IAdaptable.getAdapter(java.lang.Class)
public Command getCommand(Request req)
getCommand
in interface EditPart
getCommand
in class AbstractEditPart
req
- describes the Command being requested
null
or a Commandpublic org.eclipse.draw2d.IFigure getContentPane()
getContentPane
in interface GraphicalEditPart
getContentPane
in class AbstractGraphicalEditPart
public EditPart getContents()
RootEditPart
getContents
in interface RootEditPart
public DragTracker getDragTracker(Request req)
getDragTracker
in interface EditPart
getDragTracker
in class AbstractGraphicalEditPart
req
- a Request
indicating the context of the drag
null
or a DragTrackerpublic org.eclipse.draw2d.IFigure getLayer(Object key)
getLayer
in interface LayerManager
getLayer
in class AbstractGraphicalEditPart
key
- a key identifying the layer
* @return the specified layerpublic Object getModel()
getModel
in interface EditPart
getModel
in class AbstractEditPart
protected org.eclipse.draw2d.LayeredPane getPrintableLayers()
public RootEditPart getRoot()
EditPart
RootEditPart
. This method should only be called internally or by
helpers such as edit policies. The Root can be used to get the Viewer.
getRoot
in interface EditPart
getRoot
in class AbstractEditPart
RootEditPart
public EditPartViewer getViewer()
RootEditPart
getViewer
in interface RootEditPart
getViewer
in class AbstractEditPart
EditPartViewer
protected void refreshChildren()
AbstractEditPart
AbstractEditPart.refresh()
, and
may also be called in response to notification from the model.
The update is performed by comparing the exising EditParts with the set of
model children returned from AbstractEditPart.getModelChildren()
. EditParts whose
model no longer exists are removed
. New models have
their EditParts created
. Subclasses should override
getModelChildren()
.
This method should not be overridden.
refreshChildren
in class AbstractEditPart
AbstractEditPart.getModelChildren()
public void setContents(EditPart editpart)
setContents
in interface RootEditPart
editpart
- the contentspublic void setViewer(EditPartViewer newViewer)
setViewer
in interface RootEditPart
newViewer
- the EditPartViewer
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |