vocleditor.edit
Class LabelGraphicalEditPart

java.lang.Object
  extended by org.eclipse.gef.editparts.AbstractEditPart
      extended by org.eclipse.gef.editparts.AbstractGraphicalEditPart
          extended by vocleditor.edit.LabelGraphicalEditPart
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.gef.EditPart, org.eclipse.gef.GraphicalEditPart, org.eclipse.gef.RequestConstants

public class LabelGraphicalEditPart
extends org.eclipse.gef.editparts.AbstractGraphicalEditPart

This is the EditPart for the AssociationRole's Labels

Author:
jan

Field Summary
 
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
 
Method Summary
 org.eclipse.gef.commands.Command getCommand(org.eclipse.gef.Request request)
          Returns the MoveCommand if necessary.
 org.eclipse.draw2d.IFigure getFigure()
          Simply calls createFigure().
 void performRequest(org.eclipse.gef.Request request)
          Reacts on double-clicks.
 void setSelected(int i)
          Applies selection to the parent connection, too.
 
Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
activate, addNodeListener, addNotify, deactivate, getAdapter, getContentPane, getDragTracker, getSourceConnections, getTargetConnections, refresh, removeNodeListener, removeNotify, setLayoutConstraint
 
Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart
addEditPartListener, eraseSourceFeedback, eraseTargetFeedback, getChildren, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, showSourceFeedback, showTargetFeedback, toString, understandsRequest
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.gef.EditPart
addEditPartListener, eraseSourceFeedback, eraseTargetFeedback, getChildren, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, showSourceFeedback, showTargetFeedback, understandsRequest
 

Method Detail

getFigure

public org.eclipse.draw2d.IFigure getFigure()
Simply calls createFigure(). All necessary work is done there.

Specified by:
getFigure in interface org.eclipse.gef.GraphicalEditPart
Overrides:
getFigure in class org.eclipse.gef.editparts.AbstractGraphicalEditPart

setSelected

public void setSelected(int i)
Applies selection to the parent connection, too.

Specified by:
setSelected in interface org.eclipse.gef.EditPart
Overrides:
setSelected in class org.eclipse.gef.editparts.AbstractEditPart
See Also:
AbstractEditPart.setSelected(int)

getCommand

public org.eclipse.gef.commands.Command getCommand(org.eclipse.gef.Request request)
Returns the MoveCommand if necessary. Forwards all other requests to the parent (For deletion etc.) There is some kind of hack here, we set the VOCLAssociationRoleEditPart parent to NavExpEditPart for Dragging. If we don't do that here

Specified by:
getCommand in interface org.eclipse.gef.EditPart
Overrides:
getCommand in class org.eclipse.gef.editparts.AbstractEditPart

performRequest

public void performRequest(org.eclipse.gef.Request request)
Reacts on double-clicks. Forwards the request to the parent associationrole's EditPart.

Specified by:
performRequest in interface org.eclipse.gef.EditPart
Overrides:
performRequest in class org.eclipse.gef.editparts.AbstractEditPart
See Also:
VOCLAssociationRoleEditPart.performRequest(Request)