public class IlpImageFunction extends IlpConvertionFunction
Image
instance.
It uses the image repository from the context of JTGO to fetch and load a specific image. The image repository of JTGO also provides a cache for all previously loaded images.
The function should be defined as follows:
anInt : '@|image("/home/images/MyImage.png")'
Arguments:
This definition will fetch the corresponding image. If the function argument is not valid or cannot be fetched, a default image from the image repository will be returned.
Note: The function must be fully quoted in order to be parsed correctly.
IlpImageRepository
,
Serialized FormANY, ANY_PROPERTIES, ANY_PSEUDOCLASSES
Constructor and Description |
---|
IlpImageFunction()
Constructor
It has no arguments and gets the default application context.
|
IlpImageFunction(IlpContext context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
call(Object[] args,
Class type,
ilog.views.util.css.IlvCSSModel model,
Object node,
Object target,
Object closure)
Method called to execute the function.
|
String |
getDelimiters()
Returns the delimiters of the function parameters.
|
String |
getName()
Retrieves the name of the function.
|
boolean |
returnDelimitersAsToken()
Returns true whether the delimiters are returned also as token.
|
convertColor, getContext
getDependencies, getImportance, getShortDescription
public IlpImageFunction()
It has no arguments and gets the default application context.
public IlpImageFunction(IlpContext context)
context
- A context to be used by the function.public String getName()
getName
in class IlvCSSFunction
public String getDelimiters()
getDelimiters
in class IlvCSSFunction
public boolean returnDelimitersAsToken()
returnDelimitersAsToken
in class IlvCSSFunction
false
means the delimiters are discarded.public Object call(Object[] args, Class type, ilog.views.util.css.IlvCSSModel model, Object node, Object target, Object closure)
call
in class IlvCSSFunction
args
- List of arguments passed to the function.type
- Expected type of the object returned by the function.model
- The CSS model being used.node
- Current model object being called ontarget
- The target object where the returned object will be applied.closure
- An object set by
IlvCSSBeans.setFunctionClosure(java.lang.Object)
Image
.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.