public class CellFormatPart extends Object
Modifier and Type | Field and Description |
---|---|
static int |
COLOR_GROUP
Within
FORMAT_PAT , the group number for the matched color. |
static Pattern |
COLOR_PAT
Pattern for the color part of a cell format part.
|
static int |
CONDITION_OPERATOR_GROUP
Within
FORMAT_PAT , the group number for the operator in the
condition. |
static Pattern |
CONDITION_PAT
Pattern for the condition part of a cell format part.
|
static int |
CONDITION_VALUE_GROUP
Within
FORMAT_PAT , the group number for the value in the
condition. |
static int |
CURRENCY_GROUP |
static Pattern |
FORMAT_PAT
Pattern for an entire cell single part.
|
static int |
LOCALE_GROUP
Within
FORMAT_PAT , the group number for the matched locale code. |
static Pattern |
LOCALE_PAT
Pattern for an i18n part of a cell format.
|
static int |
PREFIX_GROUP |
static int |
SPECIFICATION_GROUP
Within
FORMAT_PAT , the group number for the format
specification. |
static Pattern |
SPECIFICATION_PAT
Pattern for the format specification part of a cell format part.
|
Constructor and Description |
---|
CellFormatPart(String desc)
Create an object to represent a format part.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applies(Object valueObject)
Returns true if this format part applies to the given value.
|
CellFormatResult |
apply(JLabel label,
Object value)
Apply this format part to the given value, applying the result to the
given label.
|
CellFormatResult |
apply(Object value)
Apply this format part to the given value.
|
CellFormatType |
getCellFormatType()
Returns the CellFormatType object implied by the format specification for
the format part.
|
static String |
group(Matcher m,
int g)
Returns the string from the group, or "" if the group is
null.
|
static StringBuffer |
parseFormat(String fdesc,
CellFormatType type,
org.zkoss.poi.ss.format.CellFormatPart.PartHandler partHandler) |
public static final Pattern COLOR_PAT
public static final Pattern CONDITION_PAT
public static final Pattern SPECIFICATION_PAT
public static final Pattern FORMAT_PAT
public static final Pattern LOCALE_PAT
public static final int CURRENCY_GROUP
public static final int PREFIX_GROUP
public static final int LOCALE_GROUP
FORMAT_PAT
, the group number for the matched locale code.public static final int COLOR_GROUP
FORMAT_PAT
, the group number for the matched color.public static final int CONDITION_OPERATOR_GROUP
FORMAT_PAT
, the group number for the operator in the
condition.public static final int CONDITION_VALUE_GROUP
FORMAT_PAT
, the group number for the value in the
condition.public static final int SPECIFICATION_GROUP
FORMAT_PAT
, the group number for the format
specification.public CellFormatPart(String desc)
desc
- The string to parse.public boolean applies(Object valueObject)
valueObject
- The value to evaluate.public CellFormatResult apply(Object value)
CellFormatResult
object with the results.value
- The value to apply this format part to.CellFormatResult
object containing the results of
applying the format to the value.public CellFormatResult apply(JLabel label, Object value)
label
- The labelvalue
- The value to apply this format part to.public CellFormatType getCellFormatType()
public static StringBuffer parseFormat(String fdesc, CellFormatType type, org.zkoss.poi.ss.format.CellFormatPart.PartHandler partHandler)
Copyright © 2020. All rights reserved.