|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.RootTreeEditPart
public class RootTreeEditPart
The root editpart for a TreeViewer. There is limited control of
a Tree, so this root implementation should work for all purposes. This
implementation does little more than hold onto the viewer, and pass the
Tree to the contents as its widget.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
AbstractEditPart.EditPolicyIterator |
| Field Summary |
|---|
| 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.RequestConstants |
|---|
REQ_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 Summary | |
|---|---|
RootTreeEditPart()
|
|
| Method Summary | |
|---|---|
protected void |
addChildVisual(EditPart childEditPart,
int index)
This is where the child gets added. |
protected void |
createEditPolicies()
Creates the initial EditPolicies and/or reserves slots for dynamic ones. |
Command |
getCommand(Request request)
Subclasses should rarely extend this method. |
EditPart |
getContents()
Returns the contents EditPart. |
DragTracker |
getDragTracker(Request request)
This method will never be called on a tree root. |
RootEditPart |
getRoot()
Returns this. |
EditPartViewer |
getViewer()
Convenience method for returning the EditPartViewer for this
part. |
Widget |
getWidget()
The editpart holds onto the SWT Tree, which is also the contents' widget. |
protected void |
refreshChildren()
Overridden to do nothing since the child is explicitly set. |
protected void |
removeChildVisual(EditPart childEditPart)
This is where the child gets removed. |
void |
setContents(EditPart editpart)
Sets the contents EditPart. |
void |
setViewer(EditPartViewer epviewer)
Sets the root's EditPartViewer. |
void |
setWidget(Widget w)
Called by TreeViewer to set the Tree into the
root. |
| 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, getModel, 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 |
| Constructor Detail |
|---|
public RootTreeEditPart()
| Method Detail |
|---|
protected void addChildVisual(EditPart childEditPart,
int index)
addChildVisual in class AbstractEditPartchildEditPart - EditPart of child to be added.index - Position where it is to be added.AbstractEditPart.addChild(EditPart, int),
AbstractGraphicalEditPart.removeChildVisual(EditPart)protected void createEditPolicies()
AbstractEditPartnull can be used to reserve a "slot",
should there be some desire to guarantee the ordering of EditPolcies.
createEditPolicies in class AbstractEditPartAbstractEditPart.createEditPolicies()public Command getCommand(Request request)
AbstractEditPartEditPolicy.
This method is implemented indirectly using EditPolicies.
| It is recommended that Command creation be handled by EditPolicies, and not directly by the EditPart. |
getCommand in interface EditPartgetCommand in class AbstractEditPartrequest - the Request
EditPart.getCommand(org.eclipse.gef.Request)public EditPart getContents()
RootEditPart
getContents in interface RootEditPartRootEditPart.getContents()public DragTracker getDragTracker(Request request)
getDragTracker in interface EditPartrequest - a Request indicating the context of the drag
null or a DragTrackerEditPart.getDragTracker(org.eclipse.gef.Request)public RootEditPart getRoot()
this.
getRoot in interface EditPartgetRoot in class AbstractEditPartnull or the RootEditPartEditPart.getRoot()public EditPartViewer getViewer()
EditPartEditPartViewer for this
part.
getViewer in interface EditPartgetViewer in interface RootEditPartgetViewer in class AbstractEditPartEditPartViewer or nullRootEditPart.getViewer()public Widget getWidget()
getWidget in interface TreeEditPartTreeEditPart.getWidget()protected void refreshChildren()
refreshChildren in class AbstractEditPartAbstractEditPart.refreshChildren()protected void removeChildVisual(EditPart childEditPart)
removeChildVisual in class AbstractEditPartchildEditPart - EditPart of child to be removed.public void setContents(EditPart editpart)
RootEditPart
setContents in interface RootEditParteditpart - the contentsRootEditPart.setContents(org.eclipse.gef.EditPart)public void setViewer(EditPartViewer epviewer)
RootEditPart
setViewer in interface RootEditPartepviewer - the EditPartViewerRootEditPart.setViewer(org.eclipse.gef.EditPartViewer)public void setWidget(Widget w)
TreeViewer to set the Tree into the
root. The root simply holds onto this widget and passes it to the
contents when the contents is added.
setWidget in interface TreeEditPartw - the WidgetTreeEditPart.setWidget(org.eclipse.swt.widgets.Widget)
|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||