|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.util.styling.IlvCSSFunction
public abstract class IlvCSSFunction
The abstract base class that defines functions in CSS expressions so that
they can be called from a style sheet. An implementation must be
registered
IlvAcceptFunctions.registerFunction(ilog.views.util.styling.IlvCSSFunction)
before being usable. See the User Manual for more details.
The following functions are registered by default: concat,
id, type.
int, long, float,
double,
The first one concatenates strings, the next two returns current node ID and
type respectively, the others
compute an arithmetic function of the suggested type. Example:
foo[speed] {
mph = @|float(@speed*1.6);
}
IlvAcceptFunctions.registerFunction(ilog.views.util.styling.IlvCSSFunction),
Serialized Form| Constructor Summary | |
|---|---|
protected |
IlvCSSFunction()
Creates a new IlvCSSFunction. |
| Method Summary | |
|---|---|
abstract Object |
call(Object[] args,
Class type,
ilog.views.util.css.IlvCSSModel model,
Object node,
Object target,
Object closure)
Calls the function. |
String |
getDelimiters()
Returns the delimiters of the function parameters. |
float |
getImportance()
Returns the importance of the function. |
abstract String |
getName()
Returns the name of the function that will be known in the style sheet. |
String |
getShortDescription()
Returns a short description of the function. |
boolean |
returnDelimitersAsToken()
Returns whether the delimiters are also returned as tokens. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected IlvCSSFunction()
IlvCSSFunction.
| Method Detail |
|---|
public abstract String getName()
public String getDelimiters()
null
or empty return value means there is no delimiter, so all the
parameters are returned as a single token.public boolean returnDelimitersAsToken()
true means the delimiters are returned as tokens,
false means the delimiters are discarded (default).
public abstract Object call(Object[] args,
Class type,
ilog.views.util.css.IlvCSSModel model,
Object node,
Object target,
Object closure)
args - The parameters of the function.type - The expected returned type, which may be null.
It is wise
to return an object compatible with the expected type, or a
String.model - The current model. Usually the model comes from
the engine, but there are some situations where it is a
new model.node - The current node. This is the current model object
being called on. Inside a @# construct, node represents the
parent of the fake node indeed used to process the @#
construct, i.e. the real node of interest.target - The current rendered object being called on.closure - An object set by
IlvCSSBeans.setFunctionClosure(java.lang.Object)
public String getShortDescription()
public float getImportance()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||