/** * Print the help for the specified Options to the specified writer, * using the specified width, left padding and description padding. * * @param pw The printWriter to write the help to * @param width The number of characters to display per line * @param options The command line Options * @param leftPad the number of characters of padding to be prefixed * to each line * @param descPad the number of characters of padding to be prefixed * to each description line */ public void printOptions(PrintWriter pw, int width, Options options, int leftPad, int descPad) { StringBuffer sb = new StringBuffer(); renderOptions(sb, width, options, leftPad, descPad); pw.println(sb.toString()); }
public void renderOptions(StringBuffer sb, Options options) { super.renderOptions(sb, getWidth(), options, getLeftPadding(), this.getDescPadding()); } }
return super.renderOptions(buffer, width, options, leftPaddingWidth, descriptionPaddingWidth);
hf.renderOptions(sb, 60, options, leftPad, descPad); assertEquals("simple non-wrapped option", expected, sb.toString()); hf.createPadding(nextLineTabStop) + "aaaa aaaa"; sb.setLength(0); hf.renderOptions(sb, nextLineTabStop + 17, options, leftPad, descPad); assertEquals("simple wrapped option", expected, sb.toString()); expected = lpad + "-a,--aaa" + dpad + "dddd dddd dddd dddd"; sb.setLength(0); hf.renderOptions(sb, 60, options, leftPad, descPad); assertEquals("long non-wrapped option", expected, sb.toString()); hf.createPadding(nextLineTabStop) + "dddd dddd"; sb.setLength(0); hf.renderOptions(sb, 25, options, leftPad, descPad); assertEquals("long wrapped option", expected, sb.toString()); hf.createPadding(nextLineTabStop) + "eeee eeee"; sb.setLength(0); hf.renderOptions(sb, 25, options, leftPad, descPad); assertEquals("multiple wrapped options", expected, sb.toString());
/** * <p>Print the help for the specified Options to the specified writer, * using the specified width, left padding and description padding.</p> * * @param pw The printWriter to write the help to * @param width The number of characters to display per line * @param options The command line Options * @param leftPad the number of characters of padding to be prefixed * to each line * @param descPad the number of characters of padding to be prefixed * to each description line */ public void printOptions(PrintWriter pw, int width, Options options, int leftPad, int descPad) { StringBuffer sb = new StringBuffer(); renderOptions(sb, width, options, leftPad, descPad); pw.println(sb.toString()); }
/** * <p>Print the help for the specified Options to the specified writer, * using the specified width, left padding and description padding.</p> * * @param pw The printWriter to write the help to * @param width The number of characters to display per line * @param options The command line Options * @param leftPad the number of characters of padding to be prefixed * to each line * @param descPad the number of characters of padding to be prefixed * to each description line */ public void printOptions(PrintWriter pw, int width, Options options, int leftPad, int descPad) { StringBuffer sb = new StringBuffer(); renderOptions(sb, width, options, leftPad, descPad); pw.println(sb.toString()); }
/** * Print the help for the specified Options to the specified writer, * using the specified width, left padding and description padding. * * @param pw The printWriter to write the help to * @param width The number of characters to display per line * @param options The command line Options * @param leftPad the number of characters of padding to be prefixed * to each line * @param descPad the number of characters of padding to be prefixed * to each description line */ public void printOptions(PrintWriter pw, int width, Options options, int leftPad, int descPad) { StringBuffer sb = new StringBuffer(); renderOptions(sb, width, options, leftPad, descPad); pw.println(sb.toString()); }
/** * <p>Print the help for the specified Options to the specified writer, * using the specified width, left padding and description padding.</p> * * @param pw The printWriter to write the help to * @param width The number of characters to display per line * @param options The command line Options * @param leftPad the number of characters of padding to be prefixed * to each line * @param descPad the number of characters of padding to be prefixed * to each description line */ public void printOptions(PrintWriter pw, int width, Options options, int leftPad, int descPad) { StringBuffer sb = new StringBuffer(); renderOptions(sb, width, options, leftPad, descPad); pw.println(sb.toString()); }
/** * <p>Print the help for the specified Options to the specified writer, * using the specified width, left padding and description padding.</p> * * @param pw The printWriter to write the help to * @param width The number of characters to display per line * @param options The command line Options * @param leftPad the number of characters of padding to be prefixed * to each line * @param descPad the number of characters of padding to be prefixed * to each description line */ public void printOptions(PrintWriter pw, int width, Options options, int leftPad, int descPad) { StringBuffer sb = new StringBuffer(); renderOptions(sb, width, options, leftPad, descPad); pw.println(sb.toString()); }