X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fteditor%2FWord.java;h=11fa39d9dee5545592426374f9cff1c6e189d016;hb=615a0d99fd0aa4437116dd083147f9150d5e6527;hp=d4532bbfa2d720ead178d4a2efdabc35989c104a;hpb=7d922e0dfd9a6da42b84e01d52adeec6fff10025;p=fanfix.git diff --git a/src/jexer/teditor/Word.java b/src/jexer/teditor/Word.java index d4532bb..11fa39d 100644 --- a/src/jexer/teditor/Word.java +++ b/src/jexer/teditor/Word.java @@ -40,6 +40,10 @@ import jexer.bits.CellAttributes; */ public class Word { + // ------------------------------------------------------------------------ + // Variables -------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * The color to render this word as on screen. */ @@ -61,6 +65,42 @@ public class Word { */ private StringBuilder text = new StringBuilder(3); + // ------------------------------------------------------------------------ + // Constructors ----------------------------------------------------------- + // ------------------------------------------------------------------------ + + /** + * Construct a word with one character. + * + * @param ch the first character of the word + * @param defaultColor the color for unhighlighted text + * @param highlighter the highlighter to use + */ + public Word(final char ch, final CellAttributes defaultColor, + final Highlighter highlighter) { + + this.defaultColor = defaultColor; + this.highlighter = highlighter; + text.append(ch); + } + + /** + * Construct a word with an empty string. + * + * @param defaultColor the color for unhighlighted text + * @param highlighter the highlighter to use + */ + public Word(final CellAttributes defaultColor, + final Highlighter highlighter) { + + this.defaultColor = defaultColor; + this.highlighter = highlighter; + } + + // ------------------------------------------------------------------------ + // Word ------------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * Get the color used to display this word on screen. * @@ -118,34 +158,6 @@ public class Word { return false; } - /** - * Construct a word with one character. - * - * @param ch the first character of the word - * @param defaultColor the color for unhighlighted text - * @param highlighter the highlighter to use - */ - public Word(final char ch, final CellAttributes defaultColor, - final Highlighter highlighter) { - - this.defaultColor = defaultColor; - this.highlighter = highlighter; - text.append(ch); - } - - /** - * Construct a word with an empty string. - * - * @param defaultColor the color for unhighlighted text - * @param highlighter the highlighter to use - */ - public Word(final CellAttributes defaultColor, - final Highlighter highlighter) { - - this.defaultColor = defaultColor; - this.highlighter = highlighter; - } - /** * Perform highlighting. */