fiore@0: /*
fiore@0: CCmI Editor - A Collaborative Cross-Modal Diagram Editing Tool
fiore@0:
fiore@0: Copyright (C) 2011 Queen Mary University of London (http://ccmi.eecs.qmul.ac.uk/)
fiore@0:
fiore@0: This program is free software: you can redistribute it and/or modify
fiore@0: it under the terms of the GNU General Public License as published by
fiore@0: the Free Software Foundation, either version 3 of the License, or
fiore@0: (at your option) any later version.
fiore@0:
fiore@0: This program is distributed in the hope that it will be useful,
fiore@0: but WITHOUT ANY WARRANTY; without even the implied warranty of
fiore@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fiore@0: GNU General Public License for more details.
fiore@0:
fiore@0: You should have received a copy of the GNU General Public License
fiore@0: along with this program. If not, see .
fiore@0: */
fiore@0: package uk.ac.qmul.eecs.ccmi.gui;
fiore@0:
fiore@0: import java.awt.geom.Point2D;
fiore@0: import java.util.Set;
fiore@0:
fiore@0: import uk.ac.qmul.eecs.ccmi.diagrammodel.DiagramElement;
fiore@0: import uk.ac.qmul.eecs.ccmi.diagrammodel.DiagramModelTreeNode;
fiore@0: import uk.ac.qmul.eecs.ccmi.diagrammodel.NodeProperties;
fiore@0:
fiore@0: /**
fiore@0: *
fiore@0: * The DiagramModelUpdater class is used to make changes to the diagram model. The reason why
fiore@0: * changes are not made directly to the model is allowing the network-local diagram interchangeability.
fiore@0: * A NetDiagram differs from a local
fiore@0: * diagram only by its DiagramModelUpdater implementation. The rest of the operations are
fiore@0: * performed through the delegate local diagram which is passed as argument to the constructor.
fiore@0: * In this way a local diagram can be easily turned into a network diagram and vice versa.
fiore@0: *
fiore@0: * @see NetDiagram
fiore@0: */
fiore@0: public interface DiagramModelUpdater {
fiore@0:
fiore@0: public boolean getLock(DiagramModelTreeNode treeNode, Lock lock);
fiore@0:
fiore@0: public void yieldLock(DiagramModelTreeNode treeNode, Lock lock);
fiore@0:
fiore@0: public void insertInCollection(DiagramElement element);
fiore@0:
fiore@0: public void insertInTree(DiagramElement element);
fiore@0:
fiore@0: public void takeOutFromCollection(DiagramElement element);
fiore@0:
fiore@0: public void takeOutFromTree(DiagramElement element);
fiore@0:
fiore@0: public void setName(DiagramElement element, String name);
fiore@0:
fiore@0: public void setProperty(Node node, String type, int index, String value);
fiore@0:
fiore@0: public void setProperties(Node node, NodeProperties properties);
fiore@0:
fiore@0: public void clearProperties(Node node);
fiore@0:
fiore@0: public void setNotes(DiagramModelTreeNode treeNode, String notes);
fiore@0:
fiore@0: public void addProperty(Node node, String type, String value);
fiore@0:
fiore@0: public void removeProperty(Node node, String type, int index);
fiore@0:
fiore@0: public void setModifiers(Node node, String type, int index, Set modifiers);
fiore@0:
fiore@0: public void setEndLabel(Edge edge, Node node, String label);
fiore@0:
fiore@0: public void setEndDescription(Edge edge, Node node, int i);// String description);
fiore@0:
fiore@0: public void translate(GraphElement ge, Point2D p, double x, double y);
fiore@0:
fiore@0: public void startMove(GraphElement ge, Point2D p);
fiore@0:
fiore@0: public void bend(Edge edge, Point2D p);
fiore@0:
fiore@0: public void stopMove(GraphElement ge);
fiore@0: }