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
|
fiore@0
|
20 package uk.ac.qmul.eecs.ccmi.simpletemplate;
|
fiore@0
|
21
|
fiore@0
|
22 /**
|
fiore@0
|
23 * This immutable class represents the view associated with the modifier type
|
fiore@5
|
24 * associated with it in a {@code NodeProperties} instance.
|
fiore@0
|
25 *
|
fiore@5
|
26 */
|
fiore@0
|
27 public class ModifierView {
|
fiore@0
|
28
|
fiore@0
|
29 public ModifierView(boolean underline, boolean bold, boolean italic,
|
fiore@0
|
30 String prefix, String postfix) {
|
fiore@0
|
31 this.underline = underline;
|
fiore@0
|
32 this.bold = bold;
|
fiore@0
|
33 this.italic = italic;
|
fiore@0
|
34 this.prefix = prefix;
|
fiore@0
|
35 this.suffix = postfix;
|
fiore@0
|
36 }
|
fiore@0
|
37
|
fiore@0
|
38 /* Getters */
|
fiore@0
|
39 public boolean isUnderline() {
|
fiore@0
|
40 return underline;
|
fiore@0
|
41 }
|
fiore@0
|
42
|
fiore@0
|
43 public boolean isBold() {
|
fiore@0
|
44 return bold;
|
fiore@0
|
45 }
|
fiore@0
|
46
|
fiore@0
|
47 public boolean isItalic() {
|
fiore@0
|
48 return italic;
|
fiore@0
|
49 }
|
fiore@0
|
50
|
fiore@0
|
51 public String getPrefix() {
|
fiore@0
|
52 return prefix;
|
fiore@0
|
53 }
|
fiore@0
|
54
|
fiore@0
|
55 public String getSuffix() {
|
fiore@0
|
56 return suffix;
|
fiore@0
|
57 }
|
fiore@0
|
58
|
fiore@0
|
59 @Override
|
fiore@0
|
60 public String toString(){
|
fiore@0
|
61 StringBuilder builder = new StringBuilder("ModifierView: ");
|
fiore@0
|
62 builder.append("bold ").append(bold).append("; ");
|
fiore@0
|
63 builder.append("italic ").append(italic).append("; ");
|
fiore@0
|
64 builder.append("underline ").append(underline).append("; ");
|
fiore@0
|
65 builder.append("prefix ").append(prefix).append("; ");
|
fiore@0
|
66 builder.append("suffix ").append(suffix).append("; ");
|
fiore@0
|
67 return builder.toString();
|
fiore@0
|
68 }
|
fiore@0
|
69
|
fiore@0
|
70 private boolean underline;
|
fiore@0
|
71 private boolean bold;
|
fiore@0
|
72 private boolean italic;
|
fiore@0
|
73 private String prefix;
|
fiore@0
|
74 private String suffix;
|
fiore@0
|
75 }
|