org.eclipse.gef.handles
Class AbstractHandle
java.lang.Object
|
+--org.eclipse.draw2d.Figure
|
+--org.eclipse.gef.handles.AbstractHandle
- All Implemented Interfaces:
- AncestorListener, Handle, IFigure
- Direct Known Subclasses:
- MoveHandle, SquareHandle
- public abstract class AbstractHandle
- extends Figure
- implements Handle, AncestorListener
Base class for handles.
| Fields inherited from class org.eclipse.draw2d.Figure |
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
| Methods inherited from class org.eclipse.draw2d.Figure |
add, add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocation, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, isEnabled, isFocusTraversable, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setUpdateManager, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractHandle
public AbstractHandle()
AbstractHandle
public AbstractHandle(GraphicalEditPart owner,
Locator loc)
- Creates a handle for the given
GraphicalEditPart using
the given Locator.
- Parameters:
owner - The GraphicalEditPart this handle is attached to.loc - The Locator that places the handle.
AbstractHandle
public AbstractHandle(GraphicalEditPart owner,
Locator loc,
Cursor c)
- Creates a handle for the given
GraphicalEditPart using
the given Locator and Cursor.
- Parameters:
owner - The GraphicalEditPart this handle is attached to.loc - The Locator that places the handle.c - The Cursor that will appear over the handle.
addNotify
public void addNotify()
- Adds this as a
FigureListener to the owner's Figure.
- Overrides:
addNotify in class Figure
ancestorMoved
public void ancestorMoved(IFigure ancestor)
- Specified by:
ancestorMoved in interface AncestorListener
ancestorAdded
public void ancestorAdded(IFigure ancestor)
- Specified by:
ancestorAdded in interface AncestorListener
ancestorRemoved
public void ancestorRemoved(IFigure ancestor)
- Specified by:
ancestorRemoved in interface AncestorListener
createDragTracker
protected abstract DragTracker createDragTracker()
getAccessibleLocation
public Point getAccessibleLocation()
- Specified by:
getAccessibleLocation in interface Handle
getDragCursor
public Cursor getDragCursor()
- Returns the Cursor that appears over the handle.
getDragTracker
public DragTracker getDragTracker()
- Returns the handle tracker to use when dragging this handle.
- Specified by:
getDragTracker in interface Handle
getLocator
public Locator getLocator()
- Returns the
Locator associated with this handle.
getOwner
protected GraphicalEditPart getOwner()
- Returns the
GraphicalEditPart associated with
this handle.
getOwnerFigure
protected IFigure getOwnerFigure()
removeNotify
public void removeNotify()
- Overrides:
removeNotify in class Figure
setDragCursor
public void setDragCursor(Cursor c)
throws Exception
- Sets the Cursor for the handle.
setDragTracker
public void setDragTracker(DragTracker t)
setLocator
protected void setLocator(Locator locator)
setOwner
protected void setOwner(GraphicalEditPart editpart)
validate
public void validate()
- Overrides:
validate in class Figure