|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart
org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart
org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart
org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart
An editpart implementation of the ResizableCompartment as a list compartment
| Nested Class Summary |
| 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 | |
protected boolean |
listening
State of listening |
protected java.util.List |
modelChildrenListeners
list of model children that this edit part is listening |
| Fields inherited from class org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart |
accessibleEP, elementGuid |
| 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 | |
ListCompartmentEditPart(EObject model)
|
|
| Method Summary | |
protected void |
addSemanticChildrenListeners()
Add listeners to the children of this list compartment so changes to the children can be pickup and the sorting / filtering may be updated. |
protected void |
addSemanticListeners()
Add semanticChildrenListeners when we activiate, if needed. |
protected void |
createDefaultEditPolicies()
Should be overridden to install editpolicies programmatically. |
IFigure |
createFigure()
Adds a constrained flow layout algorithm to the content pane of compartment figure |
protected java.util.List |
getBaseModelChildren()
Returns a list of model children in their natural model state. |
protected java.util.List |
getChildrenFilteredBy(java.util.List filterKeys)
Returns a list of model children that are filtered according to Properties.ID_FILTERING_KEYS. |
protected java.util.List |
getChildrenSortedBy(java.util.Map sortingKeys)
Returns the model children sorted by the order specified by Properties.ID_SORTING_KEYS. |
protected java.util.Comparator |
getComparator(java.lang.String name,
SortingDirection direction)
Returns a Comparator that is used to sort the list compartment
children. |
java.lang.String |
getCompartmentName()
|
protected java.util.List |
getFilteredChildren()
Returns a List of View s corresponding
to the unique id of the semantic elements which are filtered. |
protected View |
getModelChildByID(EObject eObject)
Returns the child view given the semantic ID. |
protected java.util.List |
getModelChildren()
Returns a list of sorted / filtered model children. |
protected java.util.List |
getSortedChildren()
Returns a List of model children corresponding appearance order of the list
compartment items. |
protected void |
handleNotificationEvent(Notification event)
Handles the following properties: NotationPackage.eINSTANCE.getRatio_Value() calls ResizableCompartmentEditPart.refreshRatio()
NotationPackage.eINSTANCE.getDrawerStyle_Collapsed() calls ResizableCompartmentEditPart.refreshCollapsed()
NotationPackage.eINSTANCE.getTitleStyle_ShowTitle() calls ResizableCompartmentEditPart.refreshShowCompartmentTitle()
All other properties are forwarded to the parent class for processing. |
protected abstract boolean |
hasModelChildrenChanged(Notification evt)
Determines if the given event affects the semantic model children |
protected boolean |
isAffectingSortingFiltering(java.lang.Object feature)
checks whether the feature affects the sorting / filtering. |
protected boolean |
modeAutomatic()
Returns true if sorting or filtering is in automatic mode
and false otherwise. |
protected void |
removeSemanticChildrenListeners()
Remove the listeners on the children of this list compartment. |
protected void |
removeSemanticListeners()
Remove semanticChildrenListeners when we stop listening. |
| Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart |
addNotationalListeners, getAdapter, getCompartmentFigure, getContentPane, isSelectable, refreshCollapsed, refreshRatio, refreshShowCompartmentTitle, refreshVisuals, removeNotationalListeners, setCollapsed, setFont, setFontColor, setRatio, setShowCompartmentTitle |
| Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart |
getDragTracker |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart |
findEditPart, getChildBySemanticHint, getDiagramEditDomain, getDiagramPreferencesHint, getEditingDomain, getNotationView, getPreferredValue, getPrimaryChildEditPart, getPrimaryView, getStructuralFeatureValue, getTopGraphicEditPart, resolveSemanticElement, setStructuralFeatureValue |
| Methods inherited from interface org.eclipse.gef.GraphicalEditPart |
addNodeListener, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint |
| Methods inherited from interface org.eclipse.gef.EditPart |
activate, addEditPartListener, addNotify, deactivate, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, performRequest, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
| Methods inherited from interface org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPart |
disableEditMode, enableEditMode, isEditModeEnabled |
| Field Detail |
protected java.util.List modelChildrenListeners
protected boolean listening
| Constructor Detail |
public ListCompartmentEditPart(EObject model)
| Method Detail |
protected void createDefaultEditPolicies()
GraphicalEditPart
createDefaultEditPolicies in class CompartmentEditPartpublic IFigure createFigure()
createFigure in class ResizableCompartmentEditPartAbstractGraphicalEditPart.createFigure()protected java.util.List getModelChildren()
getModelChildren in class GraphicalEditPartAbstractEditPart.getModelChildren()protected java.util.List getBaseModelChildren()
protected abstract boolean hasModelChildrenChanged(Notification evt)
evt - The event in question
true if the events affects model children, false otherwiseprotected void handleNotificationEvent(Notification event)
ResizableCompartmentEditPartNotationPackage.eINSTANCE.getRatio_Value() calls ResizableCompartmentEditPart.refreshRatio()
NotationPackage.eINSTANCE.getDrawerStyle_Collapsed() calls ResizableCompartmentEditPart.refreshCollapsed()
NotationPackage.eINSTANCE.getTitleStyle_ShowTitle() calls ResizableCompartmentEditPart.refreshShowCompartmentTitle()
handleNotificationEvent in class ResizableCompartmentEditPartorg.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#handlePropertyChangeEvent(java.beans.PropertyChangeEvent)protected java.util.List getSortedChildren()
List of model children corresponding appearance order of the list
compartment items.
List of Idsprotected java.util.List getChildrenSortedBy(java.util.Map sortingKeys)
sortingKeys -
protected java.util.Comparator getComparator(java.lang.String name,
SortingDirection direction)
Comparator that is used to sort the list compartment
children. Override to provide a Comparator that provides
for a particular child type.
name - direction -
protected java.util.List getFilteredChildren()
List of View s corresponding
to the unique id of the semantic elements which are filtered.
protected java.util.List getChildrenFilteredBy(java.util.List filterKeys)
filterKeys -
public java.lang.String getCompartmentName()
getCompartmentName in interface IResizableCompartmentEditPartgetCompartmentName in class ResizableCompartmentEditPartprotected View getModelChildByID(EObject eObject)
eObject - the semantic element
protected boolean modeAutomatic()
true if sorting or filtering is in automatic mode
and false otherwise.
true if yes, oherwise falseprotected boolean isAffectingSortingFiltering(java.lang.Object feature)
feature - the feature to check
protected void addSemanticChildrenListeners()
protected void removeSemanticChildrenListeners()
protected void addSemanticListeners()
addSemanticListeners in class GraphicalEditPartprotected void removeSemanticListeners()
removeSemanticListeners in class GraphicalEditPart
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.