|
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.ScalableRootEditPart
A graphical root composed of regular Layers
. The
layers are added to LayeredPane
or ScalableLayeredPane
. All layers are positioned by StackLayout
s, which means that the diagrams preferred size is the
union of the preferred size of each layer, and all layers will be positioned to fill
the entire diagram.
IMPORTANTScalableRootEditPart uses a Viewport
as its primary
figure. It must be used with a ScrollingGraphicalViewer
. The viewport gets installed into
that viewer's FigureCanvas
, which provides native scrollbars
for scrolling the viewport.
The layer structure (top-to-bottom) for this root is:
Root Layered Pane | |||
├ | Feedback Layer | ||
├ | Handle Layer | ||
└ | Scalable Layers | (ScalableLayeredPane ) |
|
└ | Printable Layers | ||
├ Connection Layer | |||
└ Primary Layer |
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
Deprecated. call getContents() |
protected EditPartViewer |
viewer
Deprecated. call getViewer() to access |
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, SCALABLE_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 | |
ScalableRootEditPart()
Constructor for ScalableFreeformRootEditPart |
Method Summary | |
protected void |
createEditPolicies()
Creates the initial EditPolicies and/or reserves slots for dynamic ones. |
protected IFigure |
createFigure()
Creates the Figure to be used as this part's visuals. |
protected void |
createLayers(LayeredPane layeredPane)
|
protected LayeredPane |
createPrintableLayers()
Creates a layered pane and the layers that should be printed. |
protected ScalableLayeredPane |
createScaledLayers()
Creates a scalable layered pane and the layers that should be scaled. |
protected Viewport |
createViewport()
Constructs the viewport that will be used to contain all of the layers. |
Command |
getCommand(Request req)
The RootEditPart should never be asked for a command. |
IFigure |
getContentPane()
The contents' Figure will be added to the PRIMARY_LAYER. |
EditPart |
getContents()
Returns the contents EditPart. |
DragTracker |
getDragTracker(Request req)
Should not be called, but returns a MarqeeDragTracker for good measure. |
IFigure |
getLayer(Object key)
Returns the layer indicated by the key. |
Object |
getModel()
The root editpart does not have a real model. |
protected LayeredPane |
getPrintableLayers()
Returns the LayeredPane that should be used during printing. |
RootEditPart |
getRoot()
Returns this . |
protected LayeredPane |
getScaledLayers()
Returns the scalable layers of this EditPart |
EditPartViewer |
getViewer()
Returns the viewer that was set. |
ZoomManager |
getZoomManager()
Returns the zoomManager. |
protected void |
refreshChildren()
Overridden to do nothing, child is set using setContents(EditPart) |
void |
setContents(EditPart editpart)
Sets the contents EditPart. |
void |
setViewer(EditPartViewer newViewer)
Sets the EditPartViewer. |
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 |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
Field Detail |
protected EditPart contents
protected EditPartViewer viewer
Constructor Detail |
public ScalableRootEditPart()
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
AbstractEditPart.createEditPolicies()
protected 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
AbstractGraphicalEditPart.createFigure()
protected void createLayers(LayeredPane layeredPane)
FreeformGraphicalRootEditPart.createLayers(LayeredPane)
protected LayeredPane createPrintableLayers()
PrintGraphicalViewerOperation
protected ScalableLayeredPane createScaledLayers()
ScalableLayeredPane
containing the scalable layersprotected Viewport createViewport()
public Command getCommand(Request req)
getCommand
in interface EditPart
getCommand
in class AbstractEditPart
req
- describes the Command being requested
null
or a CommandEditPart.getCommand(org.eclipse.gef.Request)
public IFigure getContentPane()
getContentPane
in interface GraphicalEditPart
getContentPane
in class AbstractGraphicalEditPart
GraphicalEditPart.getContentPane()
public EditPart getContents()
RootEditPart
getContents
in interface RootEditPart
RootEditPart.getContents()
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 DragTrackerEditPart.getDragTracker(org.eclipse.gef.Request)
public IFigure getLayer(Object key)
getLayer
in interface LayerManager
getLayer
in class AbstractGraphicalEditPart
key
- a key identifying the layer
LayerManager.getLayer(Object)
public Object getModel()
getModel
in interface EditPart
getModel
in class AbstractEditPart
EditPart.getModel()
protected LayeredPane getPrintableLayers()
LayerConstants.PRINTABLE_LAYERS
.
public RootEditPart getRoot()
this
.
getRoot
in interface EditPart
getRoot
in class AbstractEditPart
RootEditPart
EditPart.getRoot()
protected LayeredPane getScaledLayers()
public EditPartViewer getViewer()
getViewer
in interface RootEditPart
getViewer
in class AbstractEditPart
EditPartViewer
EditPart.getViewer()
public ZoomManager getZoomManager()
protected void refreshChildren()
refreshChildren
in class AbstractEditPart
AbstractEditPart.refreshChildren()
public void setContents(EditPart editpart)
RootEditPart
setContents
in interface RootEditPart
editpart
- the contentsRootEditPart.setContents(org.eclipse.gef.EditPart)
public void setViewer(EditPartViewer newViewer)
setViewer
in interface RootEditPart
newViewer
- the viewer
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |