org.eclipse.gef.internal.ui.palette.editparts
Class PaletteStackEditPart

java.lang.Object
  extended byorg.eclipse.gef.editparts.AbstractEditPart
      extended byorg.eclipse.gef.editparts.AbstractGraphicalEditPart
          extended byorg.eclipse.gef.internal.ui.palette.editparts.PaletteEditPart
              extended byorg.eclipse.gef.internal.ui.palette.editparts.PaletteStackEditPart
All Implemented Interfaces:
EditPart, java.util.EventListener, GraphicalEditPart, org.eclipse.core.runtime.IAdaptable, java.beans.PropertyChangeListener, RequestConstants

public class PaletteStackEditPart
extends PaletteEditPart

The EditPart for a PaletteStack.

Since:
3.0

Nested Class Summary
 
Nested classes inherited from class org.eclipse.gef.internal.ui.palette.editparts.PaletteEditPart
PaletteEditPart.ImageCache
 
Nested classes inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
AbstractGraphicalEditPart.AccessibleGraphicalEditPart, AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider
 
Nested classes inherited from class org.eclipse.gef.editparts.AbstractEditPart
AbstractEditPart.EditPolicyIterator
 
Field Summary
 
Fields inherited from class org.eclipse.gef.internal.ui.palette.editparts.PaletteEditPart
XML_NAME
 
Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
figure, sourceConnections, targetConnections
 
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
PaletteStackEditPart(PaletteStack model)
          Creates a new PaletteStackEditPart with the given PaletteStack as its model.
 
Method Summary
 void activate()
          Extends AbstractEditPart#activate() to also activate all source ConnectionEditParts.
 org.eclipse.draw2d.IFigure createFigure()
          Creates the Figure to be used as this part's visuals.
 void deactivate()
          Extends AbstractEditPart#deactivate() to also deactivate the source ConnectionEditParts.
 void eraseTargetFeedback(Request request)
          Erases target feedback for the specified Request.
 org.eclipse.draw2d.IFigure getContentPane()
          If the children's Figures should be
 void openMenu()
          Opens the menu to display the choices for the active entry.
protected  void refreshChildren()
          Updates the set of children EditParts so that it is in sync with the model children.
 void showTargetFeedback(Request request)
          Shows or updates target feedback for the given request.
 
Methods inherited from class org.eclipse.gef.internal.ui.palette.editparts.PaletteEditPart
createAccessible, createEditPolicies, createToolTip, getAccessibleEditPart, getDragTracker, getImageCache, getModelChildren, getPaletteEntry, getPreferenceSource, getToolTipFigure, getToolTipText, nameNeededInToolTip, propertyChange, restoreState, saveState, setImageDescriptor, setImageInFigure
 
Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
addChildVisual, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getAdapter, getFigure, getLayer, getModelSourceConnections, getModelTargetConnections, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeChildVisual, removeNodeListener, removeNotify, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisuals
 
Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart
activateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, refreshVisuals, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, toString, understandsRequest, unregister, unregisterAccessibility, unregisterModel
 
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
addEditPartListener, eraseSourceFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, setSelected, showSourceFeedback, understandsRequest
 

Constructor Detail

PaletteStackEditPart

public PaletteStackEditPart(PaletteStack model)
Creates a new PaletteStackEditPart with the given PaletteStack as its model.

Parameters:
model - the PaletteStack to associate with this EditPart.
Method Detail

activate

public void activate()
Description copied from class: AbstractGraphicalEditPart
Extends AbstractEditPart.activate() to also activate all source ConnectionEditParts.

Specified by:
activate in interface EditPart
Overrides:
activate in class PaletteEditPart
See Also:
EditPart.activate()

createFigure

public org.eclipse.draw2d.IFigure createFigure()
Description copied from class: AbstractGraphicalEditPart
Creates the Figure to be used as this part's visuals. This is called from AbstractGraphicalEditPart.getFigure() if the figure has not been created.

Specified by:
createFigure in class AbstractGraphicalEditPart
Returns:
a Figure
See Also:
AbstractGraphicalEditPart.createFigure()

deactivate

public void deactivate()
Description copied from class: AbstractGraphicalEditPart
Extends AbstractEditPart.deactivate() to also deactivate the source ConnectionEditParts. Subclasses should extend this method to remove any listeners added in AbstractGraphicalEditPart.activate().

Specified by:
deactivate in interface EditPart
Overrides:
deactivate in class PaletteEditPart
See Also:
EditPart.deactivate()

eraseTargetFeedback

public void eraseTargetFeedback(Request request)
Description copied from interface: EditPart
Erases target feedback for the specified Request. A Request is used to describe the type of target feedback that should be erased. This method should only be called once to erase feedback. It should only be called in conjunction with a prior call to EditPart.showTargetFeedback(Request).

Specified by:
eraseTargetFeedback in interface EditPart
Overrides:
eraseTargetFeedback in class AbstractEditPart
Parameters:
request - Command requesting the erase.
See Also:
EditPart.eraseTargetFeedback(org.eclipse.gef.Request)

getContentPane

public org.eclipse.draw2d.IFigure getContentPane()
Description copied from class: AbstractGraphicalEditPart
If the children's Figures should be

Specified by:
getContentPane in interface GraphicalEditPart
Overrides:
getContentPane in class AbstractGraphicalEditPart
See Also:
GraphicalEditPart.getContentPane()

openMenu

public void openMenu()
Opens the menu to display the choices for the active entry.


refreshChildren

protected void refreshChildren()
Description copied from class: AbstractEditPart
Updates the set of children EditParts so that it is in sync with the model children. This method is called from AbstractEditPart.refresh(), and may also be called in response to notification from the model. This method requires linear time complete. Clients should call this method as few times as possible. Consider also calling AbstractEditPart.removeChild(EditPart) and AbstractEditPart.addChild(EditPart, int) which run in constant time.

The update is performed by comparing the exising EditParts with the set of model children returned from AbstractEditPart.getModelChildren(). EditParts whose model no longer exists are removed. New models have their EditParts created.

This method should not be overridden.

Overrides:
refreshChildren in class AbstractEditPart
See Also:
AbstractEditPart.refreshChildren()

showTargetFeedback

public void showTargetFeedback(Request request)
Description copied from interface: EditPart
Shows or updates target feedback for the given request. This method can be called multiple times so that the feedback can be updated for changes in the request, such as the mouse location changing.

Specified by:
showTargetFeedback in interface EditPart
Overrides:
showTargetFeedback in class AbstractEditPart
Parameters:
request - the Request
See Also:
EditPart.showTargetFeedback(org.eclipse.gef.Request)