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: fiore@0: package uk.ac.qmul.eecs.ccmi.simpletemplate; fiore@0: fiore@0: /** fiore@0: * This immutable class represents the view associated with the modifier type fiore@5: * associated with it in a {@code NodeProperties} instance. fiore@0: * fiore@5: */ fiore@0: public class ModifierView { fiore@0: fiore@0: public ModifierView(boolean underline, boolean bold, boolean italic, fiore@0: String prefix, String postfix) { fiore@0: this.underline = underline; fiore@0: this.bold = bold; fiore@0: this.italic = italic; fiore@0: this.prefix = prefix; fiore@0: this.suffix = postfix; fiore@0: } fiore@0: fiore@0: /* Getters */ fiore@0: public boolean isUnderline() { fiore@0: return underline; fiore@0: } fiore@0: fiore@0: public boolean isBold() { fiore@0: return bold; fiore@0: } fiore@0: fiore@0: public boolean isItalic() { fiore@0: return italic; fiore@0: } fiore@0: fiore@0: public String getPrefix() { fiore@0: return prefix; fiore@0: } fiore@0: fiore@0: public String getSuffix() { fiore@0: return suffix; fiore@0: } fiore@0: fiore@0: @Override fiore@0: public String toString(){ fiore@0: StringBuilder builder = new StringBuilder("ModifierView: "); fiore@0: builder.append("bold ").append(bold).append("; "); fiore@0: builder.append("italic ").append(italic).append("; "); fiore@0: builder.append("underline ").append(underline).append("; "); fiore@0: builder.append("prefix ").append(prefix).append("; "); fiore@0: builder.append("suffix ").append(suffix).append("; "); fiore@0: return builder.toString(); fiore@0: } fiore@0: fiore@0: private boolean underline; fiore@0: private boolean bold; fiore@0: private boolean italic; fiore@0: private String prefix; fiore@0: private String suffix; fiore@0: }