|
http://www.eteks.com | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.eteks.parser.AbstractSyntax | +--com.eteks.jeks.ResourceSyntax | +--com.eteks.jeks.JeksFunctionSyntax | +--com.eteks.jeks.JeksExpressionSyntax
Localized syntax used by the parser to compile expressions defined in a cell.
Field Summary | |
static java.lang.Integer |
ERROR_DIVISION_BY_ZERO
|
static java.lang.Integer |
ERROR_ERR
|
static java.lang.Integer |
ERROR_ILLEGAL_CELL
Key for an invalid reference in a cell. |
static java.lang.Integer |
ERROR_ILLEGAL_VALUE
|
static java.lang.Integer |
ERROR_INVALID_NUMBER
|
static java.lang.Integer |
ERROR_UNKNOWN_NAME
|
static java.lang.Integer |
JEKS_FUNCTION_IF
|
static java.lang.Integer |
MESSAGE_CIRCULARITY_ERROR_CONFIRM
|
static java.lang.Integer |
MESSAGE_CIRCULARITY_ERROR_INFO
|
static java.lang.Integer |
MESSAGE_CIRCULARITY_ERROR_TITLE
|
Constructor Summary | |
JeksExpressionSyntax()
Creates an instance of JeksExpressionSyntax with default locale. |
|
JeksExpressionSyntax(java.util.Locale locale)
Creates an instance of JeksExpressionSyntax initialized with the resource bundle
com.eteks.jeks.syntax . |
Method Summary | |
JeksCell |
getCellAt(java.lang.String identifier)
Returns a cell at the coordinates contained in the string identifier . |
java.lang.String |
getCellError(java.lang.Object cellErrorKey)
Returns the localized string code used to describe the cell error cellErrorKey . |
java.lang.String |
getCellError(java.lang.Throwable error)
Returns a localized error string matching the exception error . |
char |
getCellSetSeparator()
Returns the character used to separate the two cells of a set. |
java.lang.String |
getColumnName(int column)
Returns a string equivalent to column . |
java.lang.Object |
getConditionPartKey(java.lang.String conditionPart)
Returns null . |
char |
getConstantChar()
Returns the character representing a constant row or column. |
java.lang.String |
getMessage(java.lang.Object messageKey)
Returns the localized message matching the key messageKey . |
java.lang.String |
getRowName(int row)
Returns a string equivalent to row . |
boolean |
isCellIdentifier(java.lang.String identifier)
Returns true if identifier represents a cell.
|
boolean |
isValidIdentifier(java.lang.String identifier)
Returns true if identifier is a valid identifier
for a function or is a cell identifier. |
java.lang.String |
toString(int row,
boolean rowConstant,
int column,
boolean columnConstant)
Returns a string equivalent to cell . |
java.lang.String |
toString(JeksCell cell)
Returns a string equivalent to cell . |
Methods inherited from class com.eteks.jeks.JeksFunctionSyntax |
getExceptionMessage, getJeksFunction, getJeksFunctionKey, getLiteral, getLocale, getNumberFormat, getQuoteCharacter |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Integer ERROR_ILLEGAL_CELL
public static final java.lang.Integer ERROR_ILLEGAL_VALUE
public static final java.lang.Integer ERROR_UNKNOWN_NAME
public static final java.lang.Integer ERROR_INVALID_NUMBER
public static final java.lang.Integer ERROR_DIVISION_BY_ZERO
public static final java.lang.Integer ERROR_ERR
public static final java.lang.Integer JEKS_FUNCTION_IF
public static final java.lang.Integer MESSAGE_CIRCULARITY_ERROR_TITLE
public static final java.lang.Integer MESSAGE_CIRCULARITY_ERROR_CONFIRM
public static final java.lang.Integer MESSAGE_CIRCULARITY_ERROR_INFO
Constructor Detail |
public JeksExpressionSyntax()
JeksExpressionSyntax
with default locale.public JeksExpressionSyntax(java.util.Locale locale)
JeksExpressionSyntax
initialized with the resource bundle
com.eteks.jeks.syntax
. The syntax may be localized with an appropriate
locale. See the default locale file com/eteks/jeks/resources/syntax.properties to see which
type of syntax is described by a JeksExpressionSyntax
object.Method Detail |
public java.lang.String getCellError(java.lang.Object cellErrorKey)
cellErrorKey
.public java.lang.String getCellError(java.lang.Throwable error)
error
.error
- an exception thrown at the interpretation time of an expression.null
if error doesn't match any forseen
exception.public java.lang.Object getConditionPartKey(java.lang.String conditionPart)
null
. This method is overriden to disable the condition
operator in an expression. Users may use the user function IF(,,) instead.getConditionPartKey
in class AbstractSyntax
com.eteks.parser.AbstractSyntax
conditionPart
- the string to test.conditionPart
.public java.lang.String getMessage(java.lang.Object messageKey)
messageKey
.getMessage
in class JeksFunctionSyntax
public char getCellSetSeparator()
public char getConstantChar()
public boolean isValidIdentifier(java.lang.String identifier)
true
if identifier
is a valid identifier
for a function or is a cell identifier.isValidIdentifier
in class JeksFunctionSyntax
com.eteks.jeks.JeksFunctionSyntax
identifier
- the string to test.true
if identifier
is a correct identifier.public boolean isCellIdentifier(java.lang.String identifier)
true
if identifier
represents a cell.
The syntax for a single cell is one or more letters followed by a number.
A set of cells is separated by the character returned by getCellSetSeparator ()
.
The letters and the number may be prefixed by the constant char returned by getConstantChar ()
.public JeksCell getCellAt(java.lang.String identifier)
identifier
.identifier
- A string representing a cell (a group of letters followed by a number).
It may contain JeksExpressionSyntax.getConstantChar ()
('$' character by default).JeksCell
matching indentifier
.public java.lang.String getRowName(int row)
row
.row
- A cell row index.row + 1
.public java.lang.String getColumnName(int column)
column
.row
- A cell column index.column
using a group of letters.public java.lang.String toString(JeksCell cell)
cell
.cell
- A cell.cell
using a group of letters and a numberpublic java.lang.String toString(int row, boolean rowConstant, int column, boolean columnConstant)
cell
.cell
- A cell.cell
using a group of letters and a number
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |