|
SAM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectModelerLayoutEditPolicy
org.topcased.modeler.sam.edit.policies.SAMDiagramLayoutEditPolicy
public class SAMDiagramLayoutEditPolicy
This is a custom LayoutEditPolicy that handles Ports layout. Ports are attached to the borders of the editing area. Added support for drag and drops of systems/automatas from the oultline. Created 7 juin 2005
Constructor Summary | |
---|---|
SAMDiagramLayoutEditPolicy()
Default contructor. |
Method Summary | |
---|---|
protected org.eclipse.gef.commands.Command |
createAddCommand(org.eclipse.gef.EditPart child,
java.lang.Object constraint,
org.eclipse.draw2d.geometry.Point mouseLocation)
Create and return the Command used to perform the DND of a Port |
protected org.eclipse.gef.commands.Command |
getAddCommand(org.eclipse.gef.Request generic)
Copy the code of the LayoutEditPolicy and pass to the createAddCommand the mouseLocation given by the request |
protected org.eclipse.gef.commands.Command |
getAutoLayoutCommand(AutoLayoutRequest request)
Overriden so as to disallow the autolayout requested during external drag and drops (it doesn't work well with our references to other systems) |
protected org.eclipse.gef.commands.Command |
getCreateCommand(org.eclipse.gef.EditDomain domain,
GraphNode newObject,
GraphNode newParent,
EObject newContainerParent,
org.eclipse.draw2d.geometry.Point location,
org.eclipse.draw2d.geometry.Dimension dimension,
int attach,
java.util.List featuresList,
boolean needModelUpdate)
This is called when performing a drag and drop from the outline into a diagram, thus it has been customized to deal with instance creation. |
protected boolean |
isAttachedToBorder(GraphNode node)
|
protected boolean |
isExternalObjectAllowed(GraphNode parent,
GraphNode child)
Overriden to allow drag and drops of systems/automatas from the outline. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SAMDiagramLayoutEditPolicy()
Method Detail |
---|
protected boolean isAttachedToBorder(GraphNode node)
org.topcased.modeler.edit.policies.ModelerLayoutEditPolicy#isAttachedToBorder(org.topcased.modeler.di.model.GraphNode)
protected org.eclipse.gef.commands.Command getAddCommand(org.eclipse.gef.Request generic)
LayoutEditPolicy.getAddCommand(org.eclipse.gef.Request)
protected org.eclipse.gef.commands.Command createAddCommand(org.eclipse.gef.EditPart child, java.lang.Object constraint, org.eclipse.draw2d.geometry.Point mouseLocation)
child
- constraint
- mouseLocation
-
protected org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gef.EditDomain domain, GraphNode newObject, GraphNode newParent, EObject newContainerParent, org.eclipse.draw2d.geometry.Point location, org.eclipse.draw2d.geometry.Dimension dimension, int attach, java.util.List featuresList, boolean needModelUpdate)
org.topcased.modeler.edit.policies.ModelerLayoutEditPolicy#getCreateCommand(org.eclipse.gef.EditDomain,
org.topcased.modeler.di.model.GraphNode,
org.topcased.modeler.di.model.GraphNode,
org.eclipse.emf.ecore.EObject, org.eclipse.draw2d.geometry.Point,
org.eclipse.draw2d.geometry.Dimension, int, java.util.List, boolean)
protected boolean isExternalObjectAllowed(GraphNode parent, GraphNode child)
org.topcased.modeler.edit.policies.ModelerLayoutEditPolicy#isExternalObjectAllowed(org.topcased.modeler.di.model.GraphNode,
org.topcased.modeler.di.model.GraphNode)
protected org.eclipse.gef.commands.Command getAutoLayoutCommand(AutoLayoutRequest request)
org.topcased.modeler.edit.policies.ModelerLayoutEditPolicy#getAutoLayoutCommand(org.topcased.modeler.requests.AutoLayoutRequest)
|
SAM | |||||||||
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.