biouml.model
Class DefaultSemanticController

java.lang.Object
  extended bybiouml.model.DefaultSemanticController
All Implemented Interfaces:
SemanticController
Direct Known Subclasses:
PathwaySemanticController

public class DefaultSemanticController
extends java.lang.Object
implements SemanticController

To do:
implement

Field Summary
 
Fields inherited from interface biouml.model.SemanticController
ERROR_CAN_NOT_CLONE_NODE, ERROR_NODE_IS_DUPLICATED
 
Constructor Summary
DefaultSemanticController()
           
 
Method Summary
 boolean canAccept(Compartment compartment, java.lang.Class c)
           
 boolean canAccept(Compartment compartment, DiagramElement de)
           
 DiagramElement createInstance(Compartment compartment, java.lang.Class type, java.awt.Point point, ViewEditorPane viewEditor)
           
protected  Node findNewNode(Node oldNode, Compartment oldCompartment, Compartment newCompartment)
           
 boolean isResizable(DiagramElement diagramElement)
           
 java.awt.Dimension move(Node node, Compartment newParent, java.awt.Dimension offset)
          Moves the specified diagram node to the specified position.
protected  void moveEdge(Edge oldEdge, Node inNode, Node outNode)
           
protected  void moveEdges(Compartment root, Compartment oldCompartment, Compartment newCompartment, java.lang.String oldCompartmentName)
           
 void moveEdges(Node oldNode, Node newNode)
           
 void moveNode(Node oldNode, Node newNode)
           
protected  void remapEdge(Edge edge, Compartment oldCompartment, Compartment newCompartment, java.lang.String oldCompartmentName)
           
 boolean remove(DiagramElement de)
          Removes the diagram element and all related edges.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSemanticController

public DefaultSemanticController()
Method Detail

canAccept

public boolean canAccept(Compartment compartment,
                         java.lang.Class c)
Specified by:
canAccept in interface SemanticController

canAccept

public boolean canAccept(Compartment compartment,
                         DiagramElement de)
Specified by:
canAccept in interface SemanticController

isResizable

public boolean isResizable(DiagramElement diagramElement)
Specified by:
isResizable in interface SemanticController

remove

public boolean remove(DiagramElement de)
               throws java.lang.Exception
Removes the diagram element and all related edges.

Specified by:
remove in interface SemanticController
Throws:
java.lang.Exception
Pendung:
if compartment is removed we should remove outer edges for compartment nodes

createInstance

public DiagramElement createInstance(Compartment compartment,
                                     java.lang.Class type,
                                     java.awt.Point point,
                                     ViewEditorPane viewEditor)
Specified by:
createInstance in interface SemanticController

move

public java.awt.Dimension move(Node node,
                               Compartment newParent,
                               java.awt.Dimension offset)
                        throws java.lang.Exception
Moves the specified diagram node to the specified position. If neccessary compartment can be changed.

Specified by:
move in interface SemanticController
Parameters:
node - the diagram node
offset - distance for which node should be moved relative its initial location.
Throws:
java.lang.Exception

moveNode

public void moveNode(Node oldNode,
                     Node newNode)
              throws java.lang.Exception
Throws:
java.lang.Exception

moveEdges

public void moveEdges(Node oldNode,
                      Node newNode)
               throws java.lang.Exception
Throws:
java.lang.Exception

moveEdges

protected void moveEdges(Compartment root,
                         Compartment oldCompartment,
                         Compartment newCompartment,
                         java.lang.String oldCompartmentName)
                  throws java.lang.Exception
Throws:
java.lang.Exception

remapEdge

protected void remapEdge(Edge edge,
                         Compartment oldCompartment,
                         Compartment newCompartment,
                         java.lang.String oldCompartmentName)
                  throws java.lang.Exception
Throws:
java.lang.Exception

findNewNode

protected Node findNewNode(Node oldNode,
                           Compartment oldCompartment,
                           Compartment newCompartment)

moveEdge

protected void moveEdge(Edge oldEdge,
                        Node inNode,
                        Node outNode)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.