annotate java/src/uk/ac/qmul/eecs/ccmi/diagrammodel/PropertyMutableTreeNode.java @ 8:ea7885bd9bff tip

fixed bug : render solid line as dotted/dashed when moving the stylus from dotted/dashed to solid
author ccmi-guest
date Thu, 03 Jul 2014 16:12:20 +0100
parents 9e67171477bc
children
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.diagrammodel;
fiore@0 20
fiore@0 21 /**
fiore@0 22 * This class represent node properties in the diagram tree representation. In the tree layout they are placed
fiore@0 23 * in the DiagramNode subtree. Note that a DiagramNode is also a DiagramModelTreeNode.
fiore@0 24 * @see NodeProperties
fiore@0 25 */
fiore@0 26 @SuppressWarnings("serial")
fiore@3 27 public class PropertyMutableTreeNode extends DiagramTreeNode {
fiore@3 28 PropertyMutableTreeNode(){
fiore@0 29 super();
fiore@0 30 }
fiore@0 31
fiore@3 32 PropertyMutableTreeNode(Object userObject) {
fiore@0 33 super(userObject);
fiore@0 34 modifiersString = "";
fiore@0 35 }
fiore@0 36
fiore@0 37 /**
fiore@0 38 * Sets a string to show in the tree that the NodeProperties value this tree node refers to
fiore@0 39 * has been assigned one or more modifiers.
fiore@0 40 *
fiore@0 41 * @param s the modifier string
fiore@0 42 */
fiore@0 43 public void setModifierString(String s){
fiore@0 44 modifiersString = s;
fiore@0 45 }
fiore@0 46
fiore@0 47 @Override
fiore@0 48 public String toString(){
fiore@0 49 return modifiersString + super.toString();
fiore@0 50 }
fiore@0 51
fiore@0 52 /**
fiore@0 53 * Returns a String representing this object for this tree node in a way more suitable
fiore@3 54 * for a text to speech synthesizer to read, than toString().
fiore@3 55 *
fiore@0 56 * @return a String suitable for text to speech synthesis
fiore@0 57 */
fiore@0 58 @Override
fiore@0 59 public String spokenText(){
fiore@0 60 return modifiersString + super.spokenText();
fiore@0 61 }
fiore@0 62
fiore@0 63 private String modifiersString;
fiore@0 64 }