|
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.gef.editparts.AbstractConnectionEditPart
org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart
the base edit part that controls Edge views, it is the basic
controller for the connection's view
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.gef.editparts.AbstractConnectionEditPart |
AbstractConnectionEditPart.DefaultAccessibleAnchorProvider |
| Nested classes inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
AbstractGraphicalEditPart.AccessibleGraphicalEditPart |
| Nested classes inherited from class org.eclipse.gef.editparts.AbstractEditPart |
AbstractEditPart.EditPolicyIterator |
| Field Summary | |
protected AccessibleEditPart |
accessibleEP
Used for accessibility. |
protected static java.lang.String[] |
appearanceProperties
a static array of appearance property ids applicable to the connections |
| 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.LayerConstants |
CONNECTION_LAYER, FEEDBACK_LAYER, GRID_LAYER, GUIDE_LAYER, HANDLE_LAYER, PRIMARY_LAYER, PRINTABLE_LAYERS, SCALABLE_LAYERS, SCALED_FEEDBACK_LAYER |
| 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 | |
ConnectionEditPart(View view)
construcotr |
|
| Method Summary | |
void |
activate()
|
protected void |
addChild(EditPart child,
int index)
|
protected void |
addListenerFilter(java.lang.String filterId,
NotificationListener listener,
EObject element)
Adds a listener filter by adding the given listener to a passed notifier |
protected void |
addListenerFilter(java.lang.String filterId,
NotificationListener listener,
EObject element,
EStructuralFeature feature)
Adds a listener filter by adding the given listener to a passed notifier |
protected void |
addNotationalListeners()
This method adds all listeners to the notational world (views, figures, editpart...etc) Override this method to add more notational listeners down the hierarchy |
void |
addNotify()
|
protected void |
addSemanticListeners()
This method adds all listeners to the semantic element behind this EditPart Override this method to add more semantic listeners down the hierarchy This method is called only if the semantic element is resolvable |
protected EditPart |
createChild(java.lang.Object model)
|
protected ConnectionEditPart |
createConnection(java.lang.Object connectionView)
|
protected abstract Connection |
createConnectionFigure()
Method createConnectionFigure. |
protected void |
createDefaultEditPolicies()
Should be overridden to install editpolicies programmatically. |
protected void |
createEditPolicies()
Overridden to support editpolicies installed programmatically and via the EditPolicyService. |
protected IFigure |
createFigure()
|
void |
deactivate()
|
void |
disableEditMode()
Disables edit mode of the EditPart. |
void |
enableEditMode()
Enables edit mode of the EditPart. |
void |
eraseSourceFeedback(Request request)
|
void |
eraseTargetFeedback(Request request)
|
protected void |
executeCommand(Command command)
executes the passed command |
EditPart |
findEditPart(EditPart epBegin,
EObject theElement)
Finds an editpart given a starting editpart and an EObject |
protected AccessibleEditPart |
getAccessibleEditPart()
|
java.lang.Object |
getAdapter(java.lang.Class key)
Adds the ability to adapt to this editpart's view class. |
protected java.lang.String[] |
getAppearancePropertyIDs()
Returns an array of the appearance property ids applicable to the receiver. |
IGraphicalEditPart |
getChildBySemanticHint(java.lang.String semanticHint)
Method getChildBySemanticHint. |
Command |
getCommand(Request _request)
|
IDiagramEditDomain |
getDiagramEditDomain()
Gets the associated DiagramEditDomain to the edit part |
PreferencesHint |
getDiagramPreferencesHint()
Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. |
protected Diagram |
getDiagramView()
Convenience method returning the editpart's Diagram, the Diagam that owns the edit part |
DragTracker |
getDragTracker(Request req)
|
protected Edge |
getEdge()
utility method to get the Edge view |
protected EditDomain |
getEditDomain()
Convenience method returning the editpart's edit domain. |
org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingDomain()
Derives my editing domain from my diagram element. |
protected org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode |
getMapMode()
|
protected java.util.List |
getModelChildren()
Return this editpart's view (model) children. |
protected java.lang.Object |
getModelSource()
give access to the source of the edit part's Edge |
protected java.lang.Object |
getModelTarget()
give access to the target of the edit part's Edge |
View |
getNotationView()
Return the editpart's associated Notation View. |
java.lang.Object |
getPreferredValue(EStructuralFeature feature)
Retrieves the preferred value for the supplied feature. |
EditPart |
getPrimaryChildEditPart()
this method will return the primary child EditPart inside this edit part |
View |
getPrimaryView()
Convenience method returns the editpart's primary view. |
protected Command |
getPropertyChangeCommand(java.lang.Object property,
java.lang.Object oldValue,
java.lang.Object newValue)
gets a property change command for the passed property, using both of the old and new values |
protected ResourceManager |
getResourceManager()
Gets the resource manager to remember the resources allocated for this graphical viewer. |
java.lang.Object |
getStructuralFeatureValue(EStructuralFeature feature)
Convenience method to retreive the value for the supplied value from the editpart's associated view element. |
TopGraphicEditPart |
getTopGraphicEditPart()
Walks up the editpart hierarchy to find and return the TopGraphicEditPart instance. |
protected void |
handleMajorSemanticChange()
Handles the case where the semantic reference has changed. |
protected void |
handleNotificationEvent(Notification event)
Handles the property changed event |
protected void |
handlePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Handles the property changed event. |
protected void |
installRouter()
installes a router on the edit part, depending on the RoutingStyle |
boolean |
isCanonical()
check if there is a canonical edit policy installed on the edit part or not |
boolean |
isEditModeEnabled()
Returns true if the EditPart is editable. |
boolean |
isSelectable()
checks if the edit part's figure is visible or not |
boolean |
isSemanticConnection()
Answers whether or not this connection represents a part of the semantic model. |
void |
notifyChanged(Notification notification)
Will be called when a Notification event gets sent from the DiagramEventBroker after the transaction has been closed. |
protected void |
performDirectEditRequest(Request request)
Performs a direct edit request (usually by showing some type of editor) |
void |
performRequest(Request request)
Perform a request by executing a command from the target editpart of the request For the Direct_Edit request, we need to show up an editor first |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Handles the passed property changed event only if the editpart's view is not deleted |
void |
reactivateSemanticModel()
Method reactivateSemanticModel. |
void |
refresh()
|
protected void |
refreshBendpoints()
refresh the pendpoints owned by the EditPart's Edge |
protected void |
refreshFont()
Refresh the editpart's figure font. |
protected void |
refreshForegroundColor()
Refresh the editpart's figure foreground colour. |
protected void |
refreshJumplinks()
Method refreshJumplinks. |
protected void |
refreshRouterChange()
Method refreshRouterChange. |
protected void |
refreshRoutingStyles()
Method refreshRoutingStyles. |
protected void |
refreshSmoothness()
Method refreshSmoothness. |
protected void |
refreshVisibility()
Refresh the editpart's figure visibility. |
protected void |
refreshVisuals()
|
protected void |
registerModel()
Adds a [ref, editpart] mapping to the EditPartForElement map. |
protected void |
removeListenerFilter(java.lang.String filterId)
Removes a listener previously added with the given id |
protected void |
removeNotationalListeners()
This method removes all listeners to the notational world (views, figures, editpart...etc) Override this method to remove notational listeners down the hierarchy |
void |
removeNotify()
|
protected void |
removeSemanticListeners()
This method removes all listeners to the semantic element behind this EditPart Override this method to remove semantic listeners down the hierarchy |
EObject |
resolveSemanticElement()
try to resolve the semantic element and Return the resolven element; if the element is unresolvable or null it will return null |
protected void |
setFont(FontData fontData)
Sets the font to the label. |
protected void |
setForegroundColor(Color color)
sets the forefround color of the editpart's figure |
void |
setModel(java.lang.Object model)
Clear the semantic connection value when the model changes. |
void |
setStructuralFeatureValue(EStructuralFeature feature,
java.lang.Object value)
Sets the passed feature if possible on this editpart's view to the passed value. |
protected void |
setVisibility(boolean vis)
sets the edit part's visibility |
void |
showSourceFeedback(Request request)
|
void |
showTargetFeedback(Request request)
|
boolean |
understandsRequest(Request req)
|
protected void |
unregisterModel()
Remove this editpart from the EditPartForElement map. |
| Methods inherited from class org.eclipse.gef.editparts.AbstractConnectionEditPart |
activateFigure, deactivateFigure, getConnectionFigure, getSource, getSourceConnectionAnchor, getTarget, getTargetConnectionAnchor, refreshSourceAnchor, refreshTargetAnchor, setParent, setSource, setTarget |
| Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart |
activateEditPolicies, addEditPartListener, deactivateEditPolicies, debug, debugFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getChildren, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, refreshChildren, register, registerAccessibility, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setSelected, toString, unregister, unregisterAccessibility |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.gef.GraphicalEditPart |
addNodeListener, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint |
| Methods inherited from interface org.eclipse.gef.EditPart |
addEditPartListener, getChildren, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, removeEditPartListener, removeEditPolicy, setFocus, setParent, setSelected |
| Field Detail |
protected AccessibleEditPart accessibleEP
protected static final java.lang.String[] appearanceProperties
| Constructor Detail |
public ConnectionEditPart(View view)
view - ,
the view the edit part will own| Method Detail |
protected Command getPropertyChangeCommand(java.lang.Object property,
java.lang.Object oldValue,
java.lang.Object newValue)
property - the property associated with the commandoldValue - the old value associated with the commandnewValue - the new value associated with the command
protected void addChild(EditPart child,
int index)
public void activate()
activate in interface EditPart
protected void addListenerFilter(java.lang.String filterId,
NotificationListener listener,
EObject element)
filterId - A unique filter id (within the same editpart instance)listener - A listener instance
protected void addListenerFilter(java.lang.String filterId,
NotificationListener listener,
EObject element,
EStructuralFeature feature)
filterId - A unique filter id (within the same editpart instance)listener - A listener instanceprotected final EditPart createChild(java.lang.Object model)
protected final ConnectionEditPart createConnection(java.lang.Object connectionView)
protected final void createEditPolicies()
EditPolicyService. Subclasses should override
createDefaultEditPolicies().
AbstractEditPart.createEditPolicies()protected void createDefaultEditPolicies()
AbstractEditPart.createEditPolicies()public void deactivate()
deactivate in interface EditPartpublic void removeNotify()
removeNotify in interface EditPartprotected void executeCommand(Command command)
command - the command to executeprotected AccessibleEditPart getAccessibleEditPart()
public java.lang.Object getAdapter(java.lang.Class key)
getAdapter in interface IAdaptablepublic IGraphicalEditPart getChildBySemanticHint(java.lang.String semanticHint)
getChildBySemanticHint in interface IGraphicalEditPartsemanticHint -
public Command getCommand(Request _request)
getCommand in interface EditPartprotected Diagram getDiagramView()
public View getPrimaryView()
IGraphicalEditPart
getPrimaryView in interface IGraphicalEditPartprotected EditDomain getEditDomain()
getRoot().getViewer().getEditDomain()
public IDiagramEditDomain getDiagramEditDomain()
IGraphicalEditPart
getDiagramEditDomain in interface IGraphicalEditPartprotected java.util.List getModelChildren()
public java.lang.Object getStructuralFeatureValue(EStructuralFeature feature)
ViewUtil.getStructuralFeatureValue(getNotationView(),feature).
getStructuralFeatureValue in interface IGraphicalEditPartpublic EObject resolveSemanticElement()
resolveSemanticElement in interface IGraphicalEditPartpublic TopGraphicEditPart getTopGraphicEditPart()
TopGraphicEditPart instance.
getTopGraphicEditPart in interface IGraphicalEditPartpublic View getNotationView()
getNotationView in interface IGraphicalEditPartView, the associated view or null if there is no
associated Notation Viewpublic final void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerprotected void handlePropertyChangeEvent(java.beans.PropertyChangeEvent event)
event - the Notification object that is the property
changed eventpublic void reactivateSemanticModel()
public EditPart findEditPart(EditPart epBegin,
EObject theElement)
findEditPart in interface IGraphicalEditPartepBegin - starting edit parttheElement - eObject to use
protected void refreshForegroundColor()
protected void refreshVisibility()
protected void removeListenerFilter(java.lang.String filterId)
filterId - the filiter IDprotected void setForegroundColor(Color color)
color - the color
public void setStructuralFeatureValue(EStructuralFeature feature,
java.lang.Object value)
setStructuralFeatureValue in interface IGraphicalEditPartfeature - the feature to usevalue - the value of the property being setprotected void setVisibility(boolean vis)
vis - the new visibilty valueprotected void addNotationalListeners()
protected void addSemanticListeners()
protected void removeNotationalListeners()
protected void removeSemanticListeners()
public void addNotify()
addNotify in interface EditPartEditPart.addNotify()protected abstract Connection createConnectionFigure()
Connection figureprotected final IFigure createFigure()
public void refresh()
refresh in interface EditPartprotected Edge getEdge()
Edge view
Edgepublic DragTracker getDragTracker(Request req)
getDragTracker in interface EditPartprotected java.lang.Object getModelSource()
protected java.lang.Object getModelTarget()
protected void installRouter()
RoutingStyle
protected void refreshBendpoints()
Edge
protected void refreshRouterChange()
protected void refreshSmoothness()
protected void refreshJumplinks()
protected void refreshRoutingStyles()
protected void refreshVisuals()
protected void refreshFont()
protected void setFont(FontData fontData)
fontData - the font dataprotected java.lang.String[] getAppearancePropertyIDs()
public void performRequest(Request request)
performRequest in interface EditPartEditPart.performRequest(org.eclipse.gef.Request)protected void performDirectEditRequest(Request request)
request - the direct edit requestpublic boolean understandsRequest(Request req)
understandsRequest in interface EditPartEditPart.understandsRequest(org.eclipse.gef.Request)protected void registerModel()
protected void unregisterModel()
protected final void handleMajorSemanticChange()
public final boolean isCanonical()
public boolean isSelectable()
isSelectable in interface EditPartpublic void disableEditMode()
org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPart
disableEditMode in interface org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPartpublic void enableEditMode()
org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPart
enableEditMode in interface org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPartpublic boolean isEditModeEnabled()
org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditParttrue if the EditPart is editable. Editparts are
editable after IEditableEditPart.enableEditMode()is called, and until
IEditableEditPart.disableEditMode()is called.
isEditModeEnabled in interface org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditParttrue when editablepublic void showSourceFeedback(Request request)
showSourceFeedback in interface EditPartpublic void showTargetFeedback(Request request)
showTargetFeedback in interface EditPartpublic void eraseSourceFeedback(Request request)
eraseSourceFeedback in interface EditPartpublic void eraseTargetFeedback(Request request)
eraseTargetFeedback in interface EditPartpublic EditPart getPrimaryChildEditPart()
getPrimaryChildEditPart in interface IGraphicalEditPartpublic PreferencesHint getDiagramPreferencesHint()
IGraphicalEditPart
getDiagramPreferencesHint in interface IGraphicalEditPartpublic void notifyChanged(Notification notification)
NotificationListener
notifyChanged in interface NotificationListenernotification - the notification objectprotected void handleNotificationEvent(Notification event)
event - the property changed eventprotected org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode getMapMode()
IMapMode that allows for the coordinate mapping
from device to logical units.public org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
getEditingDomain in interface IGraphicalEditPartpublic java.lang.Object getPreferredValue(EStructuralFeature feature)
IGraphicalEditPart
getPreferredValue in interface IGraphicalEditPartfeature - the feature to use
protected ResourceManager getResourceManager()
public boolean isSemanticConnection()
true if this connection has semantic meaning,
false otherwise.public void setModel(java.lang.Object model)
setModel in interface EditPart
|
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.