org.eclipse.gef.ui.palette
Class CategoryEditPart
java.lang.Object
|
+--org.eclipse.gef.editparts.AbstractEditPart
|
+--org.eclipse.gef.editparts.AbstractGraphicalEditPart
|
+--org.eclipse.gef.ui.palette.PaletteEditPart
|
+--org.eclipse.gef.ui.palette.CategoryEditPart
- All Implemented Interfaces:
- EditPart, GraphicalEditPart, IAdaptable, RequestConstants
- public class CategoryEditPart
- extends org.eclipse.gef.ui.palette.PaletteEditPart
| Fields inherited from interface org.eclipse.gef.RequestConstants |
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILD, REQ_ALIGN_CHILDREN, REQ_ANCESTOR_DELETED, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_BENDPOINT, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILD, REQ_MOVE_CHILDREN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_END, REQ_RECONNECT_SOURCE, REQ_RECONNECT_START, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILD, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER, REQ_SOURCE_DELETED, REQ_TARGET_DELETED |
| Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
addSourceConnection, addTargetConnection, deactivate, dispose, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getDragTracker, getFigure, getLayer, getModelSourceConnections, getModelTargetConnections, getParentingFigure, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeChildVisual, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, shouldInitialize, unregister |
| Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart |
activateEditPolicies, addChild, addEditPartListener, createChild, createConnection, createOrFindConnection, deactivateEditPolicies, debug, debugFeedback, doInitialize, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getKeyHandler, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, initialize, installEditPolicy, isActive, isSelectable, performRequest, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, showSourceFeedback, showTargetFeedback, toString, understandsRequest, unregisterAccessibility, unregisterModel |
| Methods inherited from interface org.eclipse.gef.EditPart |
addEditPartListener, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getKeyHandler, getModel, getParent, getRoot, getSelected, getTargetEditPart, hasFocus, installEditPolicy, performRequest, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, showSourceFeedback, showTargetFeedback, understandsRequest |
triangleSide
protected static int triangleSide
CategoryEditPart
public CategoryEditPart(PaletteContainer category)
activate
public void activate()
- Description copied from interface:
EditPart
- Indicates that editing has begun and the model may start changing.
Called by the managing EditPart. The managing edit part may call
EditPart.activate() and then EditPart.deactivate() multiple times on
the receiver.
Activiation should initiate several things. First, the EditPart
should begin to observe its model if appropriate, and should continue
the observation until EditPart.deactivate() is called. The EditPart
should create and activate all of its EditPolicies. EditPolicies
may also observe the model, and should also stop observing when deactivated.
Any EditParts managed by this EditPart should also be activated.
- Overrides:
activate in class AbstractGraphicalEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractEditPart
- See Also:
AbstractEditPart.deactivate()
createFigure
public IFigure createFigure()
- Description copied from class:
AbstractGraphicalEditPart
- Returns the figure to be used as this part's visuals.
- Overrides:
createFigure in class AbstractGraphicalEditPart
getAdapter
public Object getAdapter(Class key)
- Description copied from class:
AbstractEditPart
Returns the adapter of the given type, for example: IPropertySource.
If your model implements IPropertySource, or if it is IAdaptable then there
is no reason to override this method. Or, if you do not need propertysheet
support.
EditParts are the objects sent out as selection to other viewers. If you have
viewers that require additional adapter types, return them here.
- Overrides:
getAdapter in class AbstractGraphicalEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractEditPart
- See Also:
IAdaptable
getContentPane
public IFigure getContentPane()
- Description copied from interface:
GraphicalEditPart
- The figure into which children will be placed. Should not return
null,
but may return the same figure as getFigure(). An example would be
a GraphicalEditPart that uses a
ScrollPane, which looks like this:
| ┬ |
ScrollPane - returned by getFigure() |
| └ |
┬ |
Viewport - (internal, does the scrolling) |
|
└ |
─ |
View - returned by getContentPane() |
A ScrollPane already has a special child, so the GraphicalEditPart's children
will get added to the View
- Overrides:
getContentPane in class AbstractGraphicalEditPart
isExpanded
public boolean isExpanded()
addChildVisual
protected void addChildVisual(EditPart childEditPart,
int index)
- Description copied from class:
AbstractGraphicalEditPart
- Before performing the addition of the child EditPart to
the model structure in super, its Figure is added to the
graphical model.
- Overrides:
addChildVisual in class AbstractGraphicalEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractGraphicalEditPart
- Parameters:
childEditPart - EditPart being added to the structureindex - Psotion the EditPart is being added into.
createAccessible
protected AccessibleEditPart createAccessible()
- Description copied from class:
org.eclipse.gef.ui.palette.PaletteEditPart
- returns the AccessibleEditPart for this EditPart. This method is called lazily from
PaletteEditPart.getAccessibleEditPart().
- Overrides:
createAccessible in class org.eclipse.gef.ui.palette.PaletteEditPart
- See Also:
PaletteEditPart.createAccessible()
refreshChildren
public void refreshChildren()
- Sets the minimum preferred size of certain figures, as
not doing so results in the figure's minimum size being
its preferred sizes, or the preferred size of the scrollbar's
which in-turn doesnt allow for compression.
Sometimes the scrollbar's minimum size if far more than
the compression desired, hence specific setting is required.
- Overrides:
refreshChildren in class AbstractEditPart
refreshVisuals
protected void refreshVisuals()
- Description copied from class:
AbstractEditPart
Refreshes this part's visuals. After creating the visuals, they should be
initialized and the updated in response to model changes by implementing
this method.
- Overrides:
refreshVisuals in class AbstractEditPart
refreshVisuals
protected void refreshVisuals(boolean animate)
- Refreshes the FIgure for this part. If the animate flag is true, then the category's
Figure will slide open or closed.
setExpanded
public void setExpanded(boolean expanded)
setSelected
public void setSelected(int value)
- Description copied from interface:
EditPart
Sets the selected state.
This should only be called by the EditPartViewer.
Fires selectedStateChanged(EditPart) to any EditPartListeners.
- Overrides:
setSelected in class AbstractEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractEditPart
- See Also:
SelectionHandlesEditPolicy
createEditPolicies
public void createEditPolicies()
- Description copied from class:
AbstractEditPart
Creates
the initial EditPolicies and reserves slots for dynamic ones.
Should be overridden to install the inital edit policies 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.
- Overrides:
createEditPolicies in class AbstractEditPart
- Following copied from class:
org.eclipse.gef.editparts.AbstractEditPart
- See Also:
AbstractEditPart.doInitialize(),
AbstractEditPart.installEditPolicy(Object, EditPolicy)
getAccessibleEditPart
protected AccessibleEditPart getAccessibleEditPart()
- Overrides:
getAccessibleEditPart in class AbstractEditPart
getModelChildren
public List getModelChildren()
- Description copied from class:
AbstractEditPart
Returns a List containing the children model objects.
Iff this EditPart's model is a composite, this method should be overridden
to returns its children.
AbstractEditPart.refreshChildren() requires that this List be non-null.
- Overrides:
getModelChildren in class AbstractEditPart