annotate java/src/uk/ac/qmul/eecs/ccmi/gui/DiagramModelUpdater.java @ 0:9418ab7b7f3f

Initial import
author Fiore Martin <fiore@eecs.qmul.ac.uk>
date Fri, 16 Dec 2011 17:35:51 +0000
parents
children 9e67171477bc
rev   line source
fiore@0 1 /*
fiore@0 2 CCmI Editor - A Collaborative Cross-Modal Diagram Editing Tool
fiore@0 3
fiore@0 4 Copyright (C) 2011 Queen Mary University of London (http://ccmi.eecs.qmul.ac.uk/)
fiore@0 5
fiore@0 6 This program is free software: you can redistribute it and/or modify
fiore@0 7 it under the terms of the GNU General Public License as published by
fiore@0 8 the Free Software Foundation, either version 3 of the License, or
fiore@0 9 (at your option) any later version.
fiore@0 10
fiore@0 11 This program is distributed in the hope that it will be useful,
fiore@0 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
fiore@0 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fiore@0 14 GNU General Public License for more details.
fiore@0 15
fiore@0 16 You should have received a copy of the GNU General Public License
fiore@0 17 along with this program. If not, see <http://www.gnu.org/licenses/>.
fiore@0 18 */
fiore@0 19 package uk.ac.qmul.eecs.ccmi.gui;
fiore@0 20
fiore@0 21 import java.awt.geom.Point2D;
fiore@0 22 import java.util.Set;
fiore@0 23
fiore@0 24 import uk.ac.qmul.eecs.ccmi.diagrammodel.DiagramElement;
fiore@0 25 import uk.ac.qmul.eecs.ccmi.diagrammodel.DiagramModelTreeNode;
fiore@0 26 import uk.ac.qmul.eecs.ccmi.diagrammodel.NodeProperties;
fiore@0 27
fiore@0 28 /**
fiore@0 29 *
fiore@0 30 * The DiagramModelUpdater class is used to make changes to the diagram model. The reason why
fiore@0 31 * changes are not made directly to the model is allowing the network-local diagram interchangeability.
fiore@0 32 * A NetDiagram differs from a local
fiore@0 33 * diagram only by its DiagramModelUpdater implementation. The rest of the operations are
fiore@0 34 * performed through the delegate local diagram which is passed as argument to the constructor.
fiore@0 35 * In this way a local diagram can be easily turned into a network diagram and vice versa.
fiore@0 36 *
fiore@0 37 * @see NetDiagram
fiore@0 38 */
fiore@0 39 public interface DiagramModelUpdater {
fiore@0 40
fiore@0 41 public boolean getLock(DiagramModelTreeNode treeNode, Lock lock);
fiore@0 42
fiore@0 43 public void yieldLock(DiagramModelTreeNode treeNode, Lock lock);
fiore@0 44
fiore@0 45 public void insertInCollection(DiagramElement element);
fiore@0 46
fiore@0 47 public void insertInTree(DiagramElement element);
fiore@0 48
fiore@0 49 public void takeOutFromCollection(DiagramElement element);
fiore@0 50
fiore@0 51 public void takeOutFromTree(DiagramElement element);
fiore@0 52
fiore@0 53 public void setName(DiagramElement element, String name);
fiore@0 54
fiore@0 55 public void setProperty(Node node, String type, int index, String value);
fiore@0 56
fiore@0 57 public void setProperties(Node node, NodeProperties properties);
fiore@0 58
fiore@0 59 public void clearProperties(Node node);
fiore@0 60
fiore@0 61 public void setNotes(DiagramModelTreeNode treeNode, String notes);
fiore@0 62
fiore@0 63 public void addProperty(Node node, String type, String value);
fiore@0 64
fiore@0 65 public void removeProperty(Node node, String type, int index);
fiore@0 66
fiore@0 67 public void setModifiers(Node node, String type, int index, Set<Integer> modifiers);
fiore@0 68
fiore@0 69 public void setEndLabel(Edge edge, Node node, String label);
fiore@0 70
fiore@0 71 public void setEndDescription(Edge edge, Node node, int i);// String description);
fiore@0 72
fiore@0 73 public void translate(GraphElement ge, Point2D p, double x, double y);
fiore@0 74
fiore@0 75 public void startMove(GraphElement ge, Point2D p);
fiore@0 76
fiore@0 77 public void bend(Edge edge, Point2D p);
fiore@0 78
fiore@0 79 public void stopMove(GraphElement ge);
fiore@0 80 }