|
Eclipse GEF 3.0.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.Figure
org.eclipse.gef.handles.AbstractHandle
Base implementation for handles. This class keeps track of the typical data needed by
a handle, such as a drag tracker, a locator to place the handle, a cursor, and the
editpart to which the handle belongs. AbstractHandle will add an AncestorListener to the owner's figure, and will automatically revalidate this handle
whenever the owner's figure moves.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator, Figure.IdentitySearch |
| Nested classes inherited from class org.eclipse.draw2d.AncestorListener |
AncestorListener.Stub |
| Nested classes inherited from class org.eclipse.draw2d.IFigure |
IFigure.NoInsets |
| Field Summary |
| Fields inherited from class org.eclipse.draw2d.Figure |
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
| Fields inherited from interface org.eclipse.draw2d.IFigure |
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
| Constructor Summary | |
AbstractHandle()
Null constructor |
|
AbstractHandle(GraphicalEditPart owner,
Locator loc)
Creates a handle for the given GraphicalEditPart using the given
Locator. |
|
AbstractHandle(GraphicalEditPart owner,
Locator loc,
Cursor c)
Creates a handle for the given GraphicalEditPart using the given
Locator and Cursor. |
|
| Method Summary | |
void |
addNotify()
Adds this as a FigureListener to the owner's Figure. |
void |
ancestorAdded(IFigure ancestor)
|
void |
ancestorMoved(IFigure ancestor)
|
void |
ancestorRemoved(IFigure ancestor)
|
protected abstract DragTracker |
createDragTracker()
Creates a new drag tracker to be returned by getDragTracker(). |
Point |
getAccessibleLocation()
By default, the center of the handle is returned. |
Cursor |
getDragCursor()
Deprecated. use getCursor() |
DragTracker |
getDragTracker()
Returns the drag tracker to use when the user clicks on this handle. |
Locator |
getLocator()
Returns the Locator used to position this handle. |
protected GraphicalEditPart |
getOwner()
Returns the GraphicalEditPart associated with this handle. |
protected IFigure |
getOwnerFigure()
Convenience method to return the owner's figure. |
void |
removeNotify()
|
void |
setDragCursor(Cursor c)
Deprecated. use setCursor() |
void |
setDragTracker(DragTracker t)
Sets the drag tracker for this handle. |
protected void |
setLocator(Locator locator)
Sets the locator which position this handle. |
protected void |
setOwner(GraphicalEditPart editpart)
Sets the owner editpart associated with this handle. |
void |
validate()
Extends validate() to place the handle using its locator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractHandle()
public AbstractHandle(GraphicalEditPart owner,
Locator loc)
GraphicalEditPart using the given
Locator.
owner - The editpart which provided this handleloc - The locator to position the handle
public AbstractHandle(GraphicalEditPart owner,
Locator loc,
Cursor c)
GraphicalEditPart using the given
Locator and Cursor.
owner - The editpart which provided this handleloc - The locator to position the handlec - The cursor to display when the mouse is over the handle| Method Detail |
public void addNotify()
FigureListener to the owner's Figure.
addNotify in interface IFigurepublic void ancestorMoved(IFigure ancestor)
ancestorMoved in interface AncestorListenerAncestorListener.ancestorMoved(org.eclipse.draw2d.IFigure)public void ancestorAdded(IFigure ancestor)
ancestorAdded in interface AncestorListenerAncestorListener.ancestorAdded(org.eclipse.draw2d.IFigure)public void ancestorRemoved(IFigure ancestor)
ancestorRemoved in interface AncestorListenerAncestorListener.ancestorRemoved(org.eclipse.draw2d.IFigure)protected abstract DragTracker createDragTracker()
public Point getAccessibleLocation()
getAccessibleLocation in interface Handlenull or the absolute locationHandle.getAccessibleLocation()public Cursor getDragCursor()
public DragTracker getDragTracker()
createDragTracker().
getDragTracker in interface Handlepublic Locator getLocator()
Locator used to position this handle.
protected GraphicalEditPart getOwner()
GraphicalEditPart associated with this handle.
protected IFigure getOwnerFigure()
public void removeNotify()
removeNotify in interface IFigureIFigure.removeNotify()
public void setDragCursor(Cursor c)
throws Exception
c - the cursor
Exception - a bogus excpetion declarationpublic void setDragTracker(DragTracker t)
t - the drag trackerprotected void setLocator(Locator locator)
locator - the new locatorprotected void setOwner(GraphicalEditPart editpart)
editpart - the ownerpublic void validate()
validate in interface IFigureIFigure.validate()
|
Eclipse GEF 3.0.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||