gnu.text
Class PadFormat
java.lang.Object
java.text.Format
gnu.text.ReportFormat
gnu.text.PadFormat
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class PadFormat
- extends ReportFormat
Given a Format, pad the formatted result to a specified width.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.text.Format |
java.text.Format.Field |
Constructor Summary |
PadFormat(java.text.Format fmt,
int minWidth)
|
PadFormat(java.text.Format fmt,
int minWidth,
char padChar,
int where)
|
Method Summary |
static int |
format(java.text.Format fmt,
java.lang.Object[] args,
int start,
java.io.Writer dst,
char padChar,
int minWidth,
int colInc,
int minPad,
int where,
java.text.FieldPosition fpos)
|
int |
format(java.lang.Object[] args,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
Format an array of arguments, and write out the result. |
static int |
padNeeded(int actualWidth,
int minWidth,
int colInc,
int minPad)
|
Methods inherited from class gnu.text.ReportFormat |
format, format, format, format, format, getParam, getParam, getParam, nextArg, parseObject, print, result, resultCode |
Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PadFormat
public PadFormat(java.text.Format fmt,
int minWidth,
char padChar,
int where)
PadFormat
public PadFormat(java.text.Format fmt,
int minWidth)
format
public int format(java.lang.Object[] args,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
throws java.io.IOException
- Description copied from class:
ReportFormat
- Format an array of arguments, and write out the result.
- Specified by:
format
in class ReportFormat
- Parameters:
args
- the objects to be formattedstart
- the index (in args) of the argument to start withdst
- where to write the result
- Returns:
- an integer result(resultCode, nextArg), where
nextArg is the index following the last argument processed, and
code is a result code (normally 0, or negative if early termintation)
- Throws:
java.io.IOException
padNeeded
public static int padNeeded(int actualWidth,
int minWidth,
int colInc,
int minPad)
format
public static int format(java.text.Format fmt,
java.lang.Object[] args,
int start,
java.io.Writer dst,
char padChar,
int minWidth,
int colInc,
int minPad,
int where,
java.text.FieldPosition fpos)
throws java.io.IOException
- Throws:
java.io.IOException