Explorar el Código

Detail in ColoredStringList

smelc hace 6 años
padre
commit
0f14d44540
Se han modificado 1 ficheros con 12 adiciones y 2 borrados
  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);