org.eclipse.gef.internal.ui.palette.editparts
Class PaletteEditPart
java.lang.Object
org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.eclipse.gef.internal.ui.palette.editparts.PaletteEditPart
- All Implemented Interfaces:
- EditPart, java.util.EventListener, GraphicalEditPart, org.eclipse.core.runtime.IAdaptable, java.beans.PropertyChangeListener, RequestConstants
- Direct Known Subclasses:
- DrawerEditPart, GroupEditPart, PaletteStackEditPart, SeparatorEditPart, SliderPaletteEditPart, TemplateEditPart, ToolEntryEditPart
- public abstract class PaletteEditPart
- extends AbstractGraphicalEditPart
- implements java.beans.PropertyChangeListener
Field Summary |
static java.lang.String |
XML_NAME
|
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 |
Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
addChildVisual, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createFigure, createOrFindConnection, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getAdapter, getContentPane, 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, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, refreshChildren, refreshVisuals, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, 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, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
XML_NAME
public static final java.lang.String XML_NAME
- See Also:
- Constant Field Values
PaletteEditPart
public PaletteEditPart(PaletteEntry model)
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 AbstractGraphicalEditPart
- See Also:
AbstractGraphicalEditPart.activate()
createAccessible
protected AccessibleEditPart createAccessible()
- returns the AccessibleEditPart for this EditPart. This method is called lazily from
getAccessibleEditPart()
.
createEditPolicies
public void createEditPolicies()
- Description copied from class:
AbstractEditPart
- Creates the initial EditPolicies and/or reserves slots for dynamic ones. Should be
implemented to install the inital EditPolicies based on the model's initial state.
null
can be used to reserve a "slot", should there be some desire to
guarantee the ordering of EditPolcies.
- Specified by:
createEditPolicies
in class AbstractEditPart
- See Also:
EditPart.installEditPolicy(Object, EditPolicy)
createToolTip
protected org.eclipse.draw2d.IFigure createToolTip()
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 AbstractGraphicalEditPart
- See Also:
AbstractGraphicalEditPart.deactivate()
getAccessibleEditPart
protected AccessibleEditPart getAccessibleEditPart()
- Description copied from class:
AbstractEditPart
- Returns the
AccessibleEditPart
adapter for this EditPart. The same
adapter instance must be used throughout the editpart's existance. Each adapter has
a unique ID which is registered during AbstractEditPart.register()
. Accessibility clients
can only refer to this editpart via that ID.
- Overrides:
getAccessibleEditPart
in class AbstractEditPart
- Returns:
null
or an AccessibleEditPart adapter
getDragTracker
public DragTracker getDragTracker(Request request)
- Description copied from class:
AbstractGraphicalEditPart
- Overridden to return a default
DragTracker
for GraphicalEditParts.
- Specified by:
getDragTracker
in interface EditPart
- Overrides:
getDragTracker
in class AbstractGraphicalEditPart
- See Also:
AbstractGraphicalEditPart.getDragTracker(Request)
getImageCache
protected static PaletteEditPart.ImageCache getImageCache()
- Returns the image cache.
The cache is global, and is shared by all palette edit parts. This has the disadvantage
that once an image is allocated, it is never freed until the display is disposed.
However, it has the advantage that the same image in different palettes is
only ever created once.
getModelChildren
public java.util.List getModelChildren()
- Description copied from class:
AbstractEditPart
- Returns a
List
containing the children
model objects. If this EditPart's model is a container, this method should be
overridden to returns its children. This is what causes children EditParts to be
created.
Callers must not modify the returned List. Must not return null
.
- Overrides:
getModelChildren
in class AbstractEditPart
- Returns:
- the List of children
- See Also:
AbstractEditPart.getModelChildren()
getPaletteEntry
protected PaletteEntry getPaletteEntry()
getPreferenceSource
protected PaletteViewerPreferences getPreferenceSource()
getToolTipFigure
protected org.eclipse.draw2d.IFigure getToolTipFigure()
getToolTipText
protected java.lang.String getToolTipText()
nameNeededInToolTip
protected boolean nameNeededInToolTip()
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChange
in interface java.beans.PropertyChangeListener
- See Also:
PropertyChangeListener.propertyChange(PropertyChangeEvent)
restoreState
public void restoreState(org.eclipse.ui.IMemento memento)
saveState
public void saveState(org.eclipse.ui.IMemento memento)
setImageDescriptor
protected void setImageDescriptor(org.eclipse.jface.resource.ImageDescriptor desc)
setImageInFigure
protected void setImageInFigure(org.eclipse.swt.graphics.Image image)