Browse Source

Detail in ColoredStringList

smelc 6 years ago
parent
commit
0f14d44540
1 changed files with 12 additions and 2 deletions
  1. 12 2
      squidlib-util/src/main/java/squidpony/ColoredStringList.java

+ 12 - 2
squidlib-util/src/main/java/squidpony/ColoredStringList.java

@@ -1,11 +1,11 @@
 package squidpony;
 
-import squidpony.panel.IColoredString;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 
+import squidpony.panel.IColoredString;
+
 /**
  * An helper class for code that deals with lists of {@link IColoredString}s. It
  * does nothing smart, its only purpose is to save you some typing for frequent
@@ -69,6 +69,16 @@ public class ColoredStringList<T> extends ArrayList<IColoredString<T>> {
 	 * 
 	 * @param text the text to append
 	 */
+	public void addText(String text, T c) {
+		addColoredText(text, c);
+	}
+
+	/**
+	 * Appends colored text to {@code this}.
+	 * 
+	 * @param text
+	 *            the text to append
+	 */
 	public void addColoredText(String text, T c) {
 		if (isEmpty())
 			addColoredTextOnNewLine(text, c);