Parcourir la source

Detail in ColoredStringList

smelc il y a 6 ans
Parent
commit
0f14d44540
1 fichiers modifiés avec 12 ajouts et 2 suppressions
  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;
 package squidpony;
 
 
-import squidpony.panel.IColoredString;
-
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Iterator;
 
 
+import squidpony.panel.IColoredString;
+
 /**
 /**
  * An helper class for code that deals with lists of {@link IColoredString}s. It
  * 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
  * 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
 	 * @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) {
 	public void addColoredText(String text, T c) {
 		if (isEmpty())
 		if (isEmpty())
 			addColoredTextOnNewLine(text, c);
 			addColoredTextOnNewLine(text, c);