*
* The MIT License (MIT)
*
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*/
public class Word {
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* The color to render this word as on screen.
*/
*/
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.
*
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.
*/