Eclipse GEF
2.1

org.eclipse.gef.handles
Class AbstractHandle

java.lang.Object
  |
  +--org.eclipse.draw2d.Figure
        |
        +--org.eclipse.gef.handles.AbstractHandle
All Implemented Interfaces:
org.eclipse.draw2d.AncestorListener, Handle, org.eclipse.draw2d.IFigure
Direct Known Subclasses:
MoveHandle, SquareHandle

public abstract class AbstractHandle
extends org.eclipse.draw2d.Figure
implements Handle, org.eclipse.draw2d.AncestorListener

Base class for handles.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.draw2d.Figure
org.eclipse.draw2d.Figure.FigureIterator
 
Nested classes inherited from class org.eclipse.draw2d.AncestorListener
org.eclipse.draw2d.AncestorListener.Stub
 
Nested classes inherited from class org.eclipse.draw2d.IFigure
org.eclipse.draw2d.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()
           
AbstractHandle(GraphicalEditPart owner, org.eclipse.draw2d.Locator loc)
          Creates a handle for the given GraphicalEditPart using the given Locator.
AbstractHandle(GraphicalEditPart owner, org.eclipse.draw2d.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(org.eclipse.draw2d.IFigure ancestor)
           
 void ancestorMoved(org.eclipse.draw2d.IFigure ancestor)
           
 void ancestorRemoved(org.eclipse.draw2d.IFigure ancestor)
           
protected abstract  DragTracker createDragTracker()
           
 org.eclipse.draw2d.geometry.Point getAccessibleLocation()
          Returns an optional accessibility Point.
 Cursor getDragCursor()
          Returns the Cursor that appears over the handle.
 DragTracker getDragTracker()
          Returns the handle tracker to use when dragging this handle.
 org.eclipse.draw2d.Locator getLocator()
          Returns the Locator associated with this handle.
protected  GraphicalEditPart getOwner()
          Returns the GraphicalEditPart associated with this handle.
protected  org.eclipse.draw2d.IFigure getOwnerFigure()
           
 void removeNotify()
           
 void setDragCursor(Cursor c)
          Sets the Cursor for the handle.
 void setDragTracker(DragTracker t)
           
protected  void setLocator(org.eclipse.draw2d.Locator locator)
           
protected  void setOwner(GraphicalEditPart editpart)
           
 void validate()
           
 
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, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, 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, 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
 

Constructor Detail

AbstractHandle

public AbstractHandle()

AbstractHandle

public AbstractHandle(GraphicalEditPart owner,
                      org.eclipse.draw2d.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,
                      org.eclipse.draw2d.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.
Method Detail

addNotify

public void addNotify()
Adds this as a FigureListener to the owner's Figure.

Specified by:
addNotify in interface org.eclipse.draw2d.IFigure
Overrides:
addNotify in class org.eclipse.draw2d.Figure

ancestorMoved

public void ancestorMoved(org.eclipse.draw2d.IFigure ancestor)
Specified by:
ancestorMoved in interface org.eclipse.draw2d.AncestorListener

ancestorAdded

public void ancestorAdded(org.eclipse.draw2d.IFigure ancestor)
Specified by:
ancestorAdded in interface org.eclipse.draw2d.AncestorListener

ancestorRemoved

public void ancestorRemoved(org.eclipse.draw2d.IFigure ancestor)
Specified by:
ancestorRemoved in interface org.eclipse.draw2d.AncestorListener

createDragTracker

protected abstract DragTracker createDragTracker()

getAccessibleLocation

public org.eclipse.draw2d.geometry.Point getAccessibleLocation()
Description copied from interface: Handle
Returns an optional accessibility Point. This Point is relative to the Control's client area

Specified by:
getAccessibleLocation in interface Handle
Returns:
null or

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
Returns:
null or a DragTracker

getLocator

public org.eclipse.draw2d.Locator getLocator()
Returns the Locator associated with this handle.


getOwner

protected GraphicalEditPart getOwner()
Returns the GraphicalEditPart associated with this handle.


getOwnerFigure

protected org.eclipse.draw2d.IFigure getOwnerFigure()

removeNotify

public void removeNotify()
Specified by:
removeNotify in interface org.eclipse.draw2d.IFigure
Overrides:
removeNotify in class org.eclipse.draw2d.Figure

setDragCursor

public void setDragCursor(Cursor c)
                   throws Exception
Sets the Cursor for the handle.

Exception

setDragTracker

public void setDragTracker(DragTracker t)

setLocator

protected void setLocator(org.eclipse.draw2d.Locator locator)

setOwner

protected void setOwner(GraphicalEditPart editpart)

validate

public void validate()
Specified by:
validate in interface org.eclipse.draw2d.IFigure
Overrides:
validate in class org.eclipse.draw2d.Figure

Eclipse GEF
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.