Mercurial > hg > accesspd
comparison java/src/uk/ac/qmul/eecs/ccmi/simpletemplate/ModifierView.java @ 0:78b7fc5391a2
first import, outcome of NIME 2014 hackaton
author | Fiore Martin <f.martin@qmul.ac.uk> |
---|---|
date | Tue, 08 Jul 2014 16:28:59 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:78b7fc5391a2 |
---|---|
1 /* | |
2 CCmI Editor - A Collaborative Cross-Modal Diagram Editing Tool | |
3 | |
4 Copyright (C) 2011 Queen Mary University of London (http://ccmi.eecs.qmul.ac.uk/) | |
5 | |
6 This program is free software: you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
8 the Free Software Foundation, either version 3 of the License, or | |
9 (at your option) any later version. | |
10 | |
11 This program is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 */ | |
19 | |
20 package uk.ac.qmul.eecs.ccmi.simpletemplate; | |
21 | |
22 /** | |
23 * This immutable class represents the view associated with the modifier type | |
24 * associated with it in a {@code NodeProperties} instance. | |
25 * | |
26 */ | |
27 public class ModifierView { | |
28 | |
29 public ModifierView(boolean underline, boolean bold, boolean italic, | |
30 String prefix, String postfix) { | |
31 this.underline = underline; | |
32 this.bold = bold; | |
33 this.italic = italic; | |
34 this.prefix = prefix; | |
35 this.suffix = postfix; | |
36 } | |
37 | |
38 /* Getters */ | |
39 public boolean isUnderline() { | |
40 return underline; | |
41 } | |
42 | |
43 public boolean isBold() { | |
44 return bold; | |
45 } | |
46 | |
47 public boolean isItalic() { | |
48 return italic; | |
49 } | |
50 | |
51 public String getPrefix() { | |
52 return prefix; | |
53 } | |
54 | |
55 public String getSuffix() { | |
56 return suffix; | |
57 } | |
58 | |
59 @Override | |
60 public String toString(){ | |
61 StringBuilder builder = new StringBuilder("ModifierView: "); | |
62 builder.append("bold ").append(bold).append("; "); | |
63 builder.append("italic ").append(italic).append("; "); | |
64 builder.append("underline ").append(underline).append("; "); | |
65 builder.append("prefix ").append(prefix).append("; "); | |
66 builder.append("suffix ").append(suffix).append("; "); | |
67 return builder.toString(); | |
68 } | |
69 | |
70 private boolean underline; | |
71 private boolean bold; | |
72 private boolean italic; | |
73 private String prefix; | |
74 private String suffix; | |
75 } |