Here you can find the source of mode(final StringBuilder buffer, final int mode)
Parameter | Description |
---|---|
buffer | Holds messages. |
mode | Text formatting mode. |
public static StringBuilder mode(final StringBuilder buffer, final int mode)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w . ja v a2 s . co m * Sets the text formatting mode. The mode may be one of the following: * <ul> * <li>{@link #NORMAL}</li> * <li>{@link #BOLD}</li> * <li>{@link #DIM}</li> * <li>{@link #ITALIC_ON}</li> * <li>{@link #ITALIC_OFF}</li> * <li>{@link #UNDERLINE_ON}</li> * <li>{@link #UNDERLINE_OFF}</li> * <li>{@link #BLINKING_ON}</li> * <li>{@link #BLINKING_OFF}</li> * <li>{@link #REVERSE_VIDEO_ON}</li> * <li>{@link #REVERSE_VIDEO_OFF}</li> * </ul> * @param buffer Holds messages. * @param mode Text formatting mode. * @return buffer, for fluency. */ public static StringBuilder mode(final StringBuilder buffer, final int mode) { buffer.append("\u001B[").append(mode).append('m'); return buffer; } }