|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.actuate.util.Debug
|
+--com.f1j.util.Debug
|
+--com.f1j.util.ObjConst
|
+--com.f1j.util.Obj
|
+--com.f1j.ss.CustomFormat
|
+--com.f1j.ss.ConditionalFormat
This class represents a conditional format condition and the associated formatting. Conditional cell formats are formats that are applied to a cell only when the value of a cell or formula meets a predetermined set of conditions. A range of cells can be formatted with up to three conditional formats. Conditional formats may inclued font colors and styles and cell border colors, styles and patterns.
| Field Summary | |
static short |
eOperatorBetween
The format is applied if the cell is greater than or equal to formula1 and less than or equal to formula2. |
static short |
eOperatorEqual
The format is applied if the cell is equal to formula1. |
static short |
eOperatorGreaterThan
The format is applied if the cell is greater than formula1. |
static short |
eOperatorGreaterThanOrEqual
The format is applied if the cell is greater than or equal to formula1. |
static short |
eOperatorLessThan
The format is applied if the cell is less than formula1. |
static short |
eOperatorLessThanOrEqual
The format is applied if the cell is less than or equal to formula1. |
static short |
eOperatorNone
No operator. |
static short |
eOperatorNotBetween
The format is applied if the cell is less than formula1 or
greater than formula2. |
static short |
eOperatorNotEqual
The format is applied if the cell is not equal to formula1. |
static short |
eTypeCell
Condition has a type of "Cell". |
static short |
eTypeFormula
Condition has a type of "Formula". |
static short |
eTypeNone
No condition type. |
| Constructor Summary | |
ConditionalFormat(Sheet sheet)
Creates a new instance of a conditional format. |
|
| Method Summary | |
CellFormat |
getCellFormat()
Returns the cell format with the formatting options for this conditional format. |
java.lang.String |
getFormula1(int row,
int col)
Returns the first formula associated with this conditional format, in US English. |
java.lang.String |
getFormula1Local(int row,
int col)
Returns the first formula associated with this conditional format, in the user's language. |
java.lang.String |
getFormula2(int row,
int col)
Returns the second formula associated with this conditional format, in US English. |
java.lang.String |
getFormula2Local(int row,
int col)
Returns the second formula associated with this conditional format, in the user's language. |
short |
getOperator()
Returns the operator for this conditional format. |
short |
getType()
Returns the conditional format type associated with this conditional format. |
void |
setCellFormat(CellFormat cellFormat)
Sets formatting options for this conditional format from the specified CellFormat object. |
void |
setEntry1(java.lang.String entry,
int row,
int col)
Sets the first entry associated with this conditional format. |
void |
setEntry2(java.lang.String entry,
int row,
int col)
Sets the second entry associated with this conditional format. |
void |
setFormula1(java.lang.String formula,
int row,
int col)
Sets the first formula associated with this conditional format, in US English. |
void |
setFormula1Local(java.lang.String formula,
int row,
int col)
Sets the first formula associated with this conditional format, in the user's language. |
void |
setFormula2(java.lang.String formula,
int row,
int col)
Sets the second formula associated with this conditional format, in US English. |
void |
setFormula2Local(java.lang.String formula,
int row,
int col)
Sets the second formula associated with this conditional format, in the user's language. |
void |
setOperator(short operator)
Sets the operator for this conditional format. |
void |
setType(short type)
Sets the type of this conditional format. |
| Field Detail |
public static final short eTypeNone
public static final short eTypeCell
public static final short eTypeFormula
public static final short eOperatorNone
public static final short eOperatorBetween
formula1 and less than or equal to formula2.public static final short eOperatorNotBetween
formula1 or
greater than formula2.public static final short eOperatorEqual
formula1.public static final short eOperatorNotEqual
formula1.public static final short eOperatorGreaterThan
formula1.public static final short eOperatorLessThan
formula1.public static final short eOperatorGreaterThanOrEqual
formula1.public static final short eOperatorLessThanOrEqual
formula1.| Constructor Detail |
public ConditionalFormat(Sheet sheet)
sheet - the worksheet this conditional format will belong to.| Method Detail |
public CellFormat getCellFormat()
Note: Only the following attributes of cell formatting are supported by conditional formats: bold, italic, strikeout, underline, font color, border, fill pattern, fill foreground and fill background.
setCellFormat(com.f1j.ss.CellFormat),
CellFormat
public java.lang.String getFormula1(int row,
int col)
row - the row this formula is relative to.col - the column this formula is relative to.getFormula1Local(int, int),
getFormula2(int, int)
public java.lang.String getFormula1Local(int row,
int col)
row - the row this formula is relative to.col - the column this formula is relative to.getFormula1(int, int),
getFormula2Local(int, int)
public java.lang.String getFormula2(int row,
int col)
row - the row this formula is relative to.col - the column this formula is relative to.getFormula1(int, int),
getFormula2Local(int, int)
public java.lang.String getFormula2Local(int row,
int col)
row - the row this formula is relative to.col - the column this formula is relative to.getFormula1Local(int, int),
getFormula2(int, int)public short getType()
setType(short)public short getOperator()
setOperator(short)
public void setCellFormat(CellFormat cellFormat)
throws F1Exception
Note: Only the following attributes of cell formatting are supported by conditional formats: bold, italic, strikeout, underline, font color, border, fill pattern, fill foreground and fill background.
cellFormat - the formatting to apply to this conditional format.getCellFormat(),
CellFormat
public void setEntry1(java.lang.String entry,
int row,
int col)
throws F1Exception
entry - the first entry for this conditional format.row - the row which the formula will be relative to.col - the column which the formula will be relative to.setEntry2(java.lang.String, int, int)
public void setEntry2(java.lang.String entry,
int row,
int col)
throws F1Exception
entry - the first entry for this conditional format.row - the row the formula will be relative to.col - the column the formula will be relative to.setEntry1(java.lang.String, int, int)
public void setFormula1(java.lang.String formula,
int row,
int col)
throws F1Exception
formula - the first formula for this conditional format.row - the row the formula will be relative to.col - the column the formula will be relative to.setFormula1Local(java.lang.String, int, int),
setFormula2(java.lang.String, int, int)
public void setFormula1Local(java.lang.String formula,
int row,
int col)
throws F1Exception
formula - the first formula for this conditional format.row - the row the formula will be relative to.col - the column the formula will be relative to.setFormula1(java.lang.String, int, int),
setFormula2Local(java.lang.String, int, int)
public void setFormula2(java.lang.String formula,
int row,
int col)
throws F1Exception
formula - the second formula for this conditional format.row - the row the formula will be relative to.col - the column the formula will be relative to.setFormula1(java.lang.String, int, int),
setFormula2Local(java.lang.String, int, int)
public void setFormula2Local(java.lang.String formula,
int row,
int col)
throws F1Exception
formula - the second formula for this conditional format.row - the row the formula will be relative to.col - the column the formula will be relative to.setFormula1Local(java.lang.String, int, int),
setFormula2(java.lang.String, int, int)public void setOperator(short operator)
operator - the operator for this conditional format:
getOperator()public void setType(short type)
type - a short indicating the type of this conditional format:
eTypeNone, eTypeCell or
eTypeFormula.getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||