|
Modelers | |||||||||
| 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.topcased.modeler.edit.BaseEditPart
org.topcased.modeler.edit.GraphNodeEditPart
public class GraphNodeEditPart
Default edit part for a graph node
creation : 3 dec. 2004
| Nested Class Summary | |
|---|---|
protected class |
GraphNodeEditPart.GraphNodeEditPartListener
Typed listener for a GraphNode |
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
org.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart, org.eclipse.gef.editparts.AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider |
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
org.eclipse.gef.editparts.AbstractEditPart.EditPolicyIterator |
| Field Summary |
|---|
| 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 | |
|---|---|
GraphNodeEditPart(GraphNode obj)
Constructor |
|
| Method Summary | |
|---|---|
void |
activate()
|
protected void |
createEditPolicies()
|
protected org.eclipse.draw2d.IFigure |
createFigure()
|
void |
deactivate()
|
protected boolean |
directEditHitTest(org.eclipse.draw2d.geometry.Point requestLoc)
Check if the direct dedit is allowed for the given position |
java.lang.Object |
getAdapter(java.lang.Class key)
|
protected org.eclipse.draw2d.IFigure |
getAnchorableFigure()
Return the Figure on which the Connection Anchors should be attached. |
org.eclipse.draw2d.IFigure |
getContentPane()
|
protected org.eclipse.swt.graphics.Color |
getDefaultBackgroundColor()
Return the default foreground color of this type of element |
protected org.eclipse.swt.graphics.Font |
getDefaultFont()
Return the default font of this type of element |
protected org.eclipse.swt.graphics.Color |
getDefaultForegroundColor()
Return the default foreground color of this type of element |
protected int |
getDefaultHeight()
Return the default height for this object |
protected int |
getDefaultWidth()
Return the default width for this object |
protected DiagramElementListener |
getDiagramElementListener()
Returns the listener used to listen the graphical mode object |
protected org.eclipse.gef.tools.DirectEditManager |
getDirectEditManager()
Returns the direct edit manager |
ILabel |
getEditableLabel()
Return the editable part of the label of the figure. |
protected GraphNode |
getGraphNode()
Get the graphNode model object (DI) associated with the EditPart |
ILabel |
getHeader()
Deprecated. |
org.eclipse.swt.graphics.FontData[] |
getHeaderFontData()
Return the FontData[] associated with the header Figure. |
ILabel |
getLabel()
Return the ILabel figure contained in the figure of the graph node |
protected int |
getLineStyle()
Return the line style of the edge |
protected int |
getLineWidth()
Return the line width of the edge |
int |
getMinimumHeight()
Return the minimum height for this object |
int |
getMinimumWidth()
Return the minimum width for this object |
protected java.util.List |
getModelChildren()
|
protected java.util.List |
getModelSourceConnections()
|
protected java.util.List |
getModelTargetConnections()
|
protected NodeGraphConf |
getNodeGraphConf()
Return the NodeGraphConf corresponding to the activeDiagram and the model object associated with the controller |
protected java.lang.String |
getPresentation()
Get the presentation field of the GraphElement associated with this EditPart. |
org.eclipse.draw2d.ConnectionAnchor |
getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
|
org.eclipse.draw2d.ConnectionAnchor |
getSourceConnectionAnchor(org.eclipse.gef.Request request)
|
org.eclipse.draw2d.ConnectionAnchor |
getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
|
org.eclipse.draw2d.ConnectionAnchor |
getTargetConnectionAnchor(org.eclipse.gef.Request request)
|
protected void |
handleModelChanged(Notification msg)
This method is called when an event occured on the model objects |
void |
handleNameChange(java.lang.String value)
|
protected void |
handlePropertyChanged(Notification msg)
Deprecated. use handleModelChanged instead |
protected void |
performDirectEdit()
Display the manager used to perform the directEdit action |
void |
performRequest(org.eclipse.gef.Request request)
|
protected void |
refreshColors()
Refresh the background and the foreground Colors of the GraphNode |
protected void |
refreshConstraints()
Refresh the constraints of the GraphNode |
protected void |
refreshTextAndFont()
Refresh the text to display at the top and the current Font of the GraphNode |
protected void |
refreshVisible()
Refresh the visbility state of the current object |
protected void |
refreshVisuals()
|
void |
revertNameChange()
Reverts to existing name in model when exiting from a direct edit (possibly before a commit which will result in a change in the label value) |
protected void |
setDirectEditManager(org.eclipse.gef.tools.DirectEditManager m)
Changes the direct edit manager |
protected void |
setNodeGraphConf(NodeGraphConf ngc)
Set the NodeGraphConf associated with this EditPart |
void |
setSelected(int value)
Handle selection |
| Methods inherited from class org.topcased.modeler.edit.BaseEditPart |
|---|
createSnapToHelper, getModelListener, refresh, updateModelListening |
| Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
addChildVisual, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getDragTracker, getFigure, getLayer, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, 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, getAccessibleEditPart, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, refreshChildren, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, 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.GraphicalEditPart |
|---|
addNodeListener, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint |
| Methods inherited from interface org.eclipse.gef.EditPart |
|---|
addEditPartListener, addNotify, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, showSourceFeedback, showTargetFeedback, understandsRequest |
| Constructor Detail |
|---|
public GraphNodeEditPart(GraphNode obj)
obj - the mdoel object| Method Detail |
|---|
protected DiagramElementListener getDiagramElementListener()
BaseEditPart
getDiagramElementListener in class BaseEditPartBaseEditPart.getDiagramElementListener()public void activate()
activate in interface org.eclipse.gef.EditPartactivate in class org.eclipse.gef.editparts.AbstractGraphicalEditPartEditPart.activate()public void deactivate()
deactivate in interface org.eclipse.gef.EditPartdeactivate in class org.eclipse.gef.editparts.AbstractGraphicalEditPartEditPart.deactivate()public java.lang.Object getAdapter(java.lang.Class key)
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in class BaseEditPartBaseEditPart.getAdapter(java.lang.Class)protected org.eclipse.draw2d.IFigure createFigure()
createFigure in class org.eclipse.gef.editparts.AbstractGraphicalEditPartAbstractGraphicalEditPart.createFigure()protected void createEditPolicies()
createEditPolicies in class BaseEditPartAbstractEditPart.createEditPolicies()protected void handleModelChanged(Notification msg)
BaseEditPart
handleModelChanged in class BaseEditPartmsg - the event notificationBaseEditPart.handleModelChanged(Notification)protected void handlePropertyChanged(Notification msg)
protected GraphNode getGraphNode()
protected java.util.List getModelChildren()
getModelChildren in class org.eclipse.gef.editparts.AbstractEditPartAbstractEditPart.getModelChildren()protected java.util.List getModelSourceConnections()
getModelSourceConnections in class org.eclipse.gef.editparts.AbstractGraphicalEditPartAbstractGraphicalEditPart.getModelSourceConnections()protected java.util.List getModelTargetConnections()
getModelTargetConnections in class org.eclipse.gef.editparts.AbstractGraphicalEditPartAbstractGraphicalEditPart.getModelTargetConnections()public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getSourceConnectionAnchor in interface org.eclipse.gef.NodeEditPartNodeEditPart.getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart)public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.Request request)
getSourceConnectionAnchor in interface org.eclipse.gef.NodeEditPartNodeEditPart.getSourceConnectionAnchor(org.eclipse.gef.Request)public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getTargetConnectionAnchor in interface org.eclipse.gef.NodeEditPartNodeEditPart.getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart)public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.Request request)
getTargetConnectionAnchor in interface org.eclipse.gef.NodeEditPartNodeEditPart.getTargetConnectionAnchor(org.eclipse.gef.Request)protected org.eclipse.draw2d.IFigure getAnchorableFigure()
protected void refreshVisuals()
refreshVisuals in class org.eclipse.gef.editparts.AbstractEditPartAbstractEditPart.registerVisuals()protected void refreshVisible()
protected void refreshColors()
protected void refreshTextAndFont()
protected void refreshConstraints()
public void performRequest(org.eclipse.gef.Request request)
performRequest in interface org.eclipse.gef.EditPartperformRequest in class org.eclipse.gef.editparts.AbstractEditPartEditPart.performRequest(org.eclipse.gef.Request)protected org.eclipse.gef.tools.DirectEditManager getDirectEditManager()
protected void setDirectEditManager(org.eclipse.gef.tools.DirectEditManager m)
m - The manager to set.protected boolean directEditHitTest(org.eclipse.draw2d.geometry.Point requestLoc)
requestLoc - the current position
true if the direct edit is allowedprotected void performDirectEdit()
public void handleNameChange(java.lang.String value)
value - the name change during an editpublic void revertNameChange()
public ILabel getHeader()
public ILabel getLabel()
public ILabel getEditableLabel()
public void setSelected(int value)
setSelected in interface org.eclipse.gef.EditPartsetSelected in class org.eclipse.gef.editparts.AbstractEditPartvalue - The value of the selectionpublic org.eclipse.swt.graphics.FontData[] getHeaderFontData()
public org.eclipse.draw2d.IFigure getContentPane()
getContentPane in interface org.eclipse.gef.GraphicalEditPartgetContentPane in class org.eclipse.gef.editparts.AbstractGraphicalEditPartAbstractGraphicalEditPart.getContentPane()protected org.eclipse.swt.graphics.Color getDefaultForegroundColor()
protected org.eclipse.swt.graphics.Color getDefaultBackgroundColor()
protected org.eclipse.swt.graphics.Font getDefaultFont()
protected int getDefaultWidth()
protected int getDefaultHeight()
public int getMinimumWidth()
public int getMinimumHeight()
protected int getLineWidth()
protected int getLineStyle()
protected NodeGraphConf getNodeGraphConf()
protected java.lang.String getPresentation()
protected void setNodeGraphConf(NodeGraphConf ngc)
ngc - the new NodeGraphConf
|
Modelers | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.