/** * Checks whether this feature is supported for provided IO * @param io IO to check on * @return true if supported */ public static boolean isSupported(InputOutput io) { return find(io) != null; }
/** * Prints line with selected color * @param io IO to print to * @param text a string to print to the tab * @param color a color for the line of text (null allowed). If null is passed default color (see {@link IOColors}) is used. */ public static void println(InputOutput io, CharSequence text, Color color) throws IOException { IOColorLines iocl = find(io); if (iocl != null) { iocl.println(text, null, false, color); } }
/** * Prints line with selected color * @param io IO to print to * @param text a string to print to the tab * @param listener a listener that will receive events about this line * @param important important mark the line as important. * Makes the UI respond appropriately, eg. stop the automatic scrolling * or highlight the hyperlink. * @param color a color for the line of text (null allowed). If null is passed default color (see {@link IOColors}) is used. */ public static void println(InputOutput io, CharSequence text, OutputListener listener, boolean important, Color color) throws IOException { IOColorLines iocl = find(io); if (iocl != null) { iocl.println(text, listener, important, color); } }