001 // This file is part of AceWiki.
002 // Copyright 2008-2012, AceWiki developers.
003 //
004 // AceWiki is free software: you can redistribute it and/or modify it under the terms of the GNU
005 // Lesser General Public License as published by the Free Software Foundation, either version 3 of
006 // the License, or (at your option) any later version.
007 //
008 // AceWiki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
009 // even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
010 // Lesser General Public License for more details.
011 //
012 // You should have received a copy of the GNU Lesser General Public License along with AceWiki. If
013 // not, see http://www.gnu.org/licenses/.
014
015 package ch.uzh.ifi.attempto.echocomp;
016
017 import nextapp.echo.app.ImageReference;
018
019 /**
020 * This is a convenience class for easy creation of labels with no line wrap.
021 *
022 * @author Tobias Kuhn
023 */
024 public class SolidLabel extends Label {
025
026 private static final long serialVersionUID = -1721467828910909396L;
027
028 /**
029 * Creates a new empty label.
030 */
031 public SolidLabel() {
032 super();
033 }
034
035 /**
036 * Creates a new label containing only an image.
037 *
038 * @param image The image.
039 */
040 public SolidLabel(ImageReference image) {
041 super(image);
042 }
043
044 /**
045 * Creates a new label.
046 *
047 * @param text The text of the label.
048 */
049 public SolidLabel(String text) {
050 super(text);
051 }
052
053 /**
054 * Creates a new label of the given style.
055 *
056 * @param text The text of the label.
057 * @param style The style of the label.
058 */
059 public SolidLabel(String text, int style) {
060 super(text, style);
061 }
062
063 /**
064 * Creates a new label of the given style with the given text size.
065 *
066 * @param text The text of the label.
067 * @param style The style of the label.
068 * @param size The size of the text.
069 */
070 public SolidLabel(String text, int style, int size) {
071 super(text, style, size);
072 }
073
074 void initLabel(int style, int size) {
075 super.initLabel(style, size);
076 setLineWrap(false);
077 }
078
079 }