de.cau.cs.kieler.karma.util.expandcollapsebutton
Class AdvancedRenderingCompartmentCollapseHandle

java.lang.Object
  extended by org.eclipse.draw2d.Figure
      extended by org.eclipse.gef.handles.AbstractHandle
          extended by de.cau.cs.kieler.karma.util.expandcollapsebutton.AdvancedRenderingCompartmentCollapseHandle
All Implemented Interfaces:
PropertyChangeListener, EventListener, AncestorListener, IFigure, Handle, NotificationListener

public class AdvancedRenderingCompartmentCollapseHandle
extends AbstractHandle
implements PropertyChangeListener, NotificationListener

This class is basically the same as the standard gmf CompartmentCollapseHandle. In addition it provides the potential to exchange or influence the Collapse/Expand button.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator, Figure.IdentitySearch
 
Nested classes/interfaces inherited from interface org.eclipse.draw2d.AncestorListener
AncestorListener.Stub
 
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
IFigure.NoInsets
 
Field Summary
static Dimension SIZE
          handle figure dimension.
 
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
AdvancedRenderingCompartmentCollapseHandle(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart owner)
           
AdvancedRenderingCompartmentCollapseHandle(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart owner, IFigure collapseFigure, IFigure expandFigure, Locator locator, Dimension size)
          Constructs a new Handle with custom collapse/expand figures and locator.
 
Method Summary
 void addNotify()
           
protected  DragTracker createDragTracker()
           
 IFigure findFigureAt(int x, int y, TreeSearch search)
           
 void notifyChanged(Notification notification)
           
 void propertyChange(PropertyChangeEvent evt)
           
 void removeNotify()
           
 
Methods inherited from class org.eclipse.gef.handles.AbstractHandle
ancestorAdded, ancestorMoved, ancestorRemoved, getAccessibleLocation, getDragCursor, getDragTracker, getLocator, getOwner, getOwnerFigure, setDragCursor, setDragTracker, setLocator, setOwner, validate
 
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, 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, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, 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
 

Field Detail

SIZE

public static Dimension SIZE
handle figure dimension.

Constructor Detail

AdvancedRenderingCompartmentCollapseHandle

public AdvancedRenderingCompartmentCollapseHandle(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart owner)
See Also:
org.eclipse.gmf.runtime.diagram.ui.handles.CompartmentCollapseHandle#CompartmentCollapseHandle(IGraphicalEditPart)

AdvancedRenderingCompartmentCollapseHandle

public AdvancedRenderingCompartmentCollapseHandle(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart owner,
                                                  IFigure collapseFigure,
                                                  IFigure expandFigure,
                                                  Locator locator,
                                                  Dimension size)
Constructs a new Handle with custom collapse/expand figures and locator.

Parameters:
owner -
collapseFigure - a custom figure to be display as collapse button.
expandFigure - a custom figure to be display as expand button.
locator - a custom locator to locate expand/collapse button
Method Detail

findFigureAt

public IFigure findFigureAt(int x,
                            int y,
                            TreeSearch search)
Specified by:
findFigureAt in interface IFigure
Overrides:
findFigureAt in class Figure
See Also:
IFigure.findFigureAt(int, int, TreeSearch)

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

notifyChanged

public void notifyChanged(Notification notification)
Specified by:
notifyChanged in interface NotificationListener
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

createDragTracker

protected DragTracker createDragTracker()
Specified by:
createDragTracker in class AbstractHandle
See Also:
AbstractHandle.createDragTracker()

addNotify

public void addNotify()
Specified by:
addNotify in interface IFigure
Overrides:
addNotify in class AbstractHandle
See Also:
IFigure.addNotify()

removeNotify

public void removeNotify()
Specified by:
removeNotify in interface IFigure
Overrides:
removeNotify in class AbstractHandle
See Also:
IFigure.removeNotify()