public class IltPatternFunction extends IlvCSSFunction
IltPattern
based on user input.
This class can generate the following types of patterns:
Grid SkewGrid Dots ThinHatchingRefer to
IltPattern
for more details
about these patterns.
It can also generate patterns corresponding to an
IlvPattern
.
Refer to
for a list
of available patterns.
The function is defined as follows:
IlvPattern
aPattern : '@|pattern("Grid", 3, 2)';
bPattern : '@|pattern("SkewGrid", 2, 2)';
cPattern : '@|pattern("Dots")';
dPattern : '@|pattern("ThinHatching")';
ePattern : '@|pattern("LIGHT_VERTICAL")';
The Grid
is a pattern parallel to the x-axis and the y-axis.
It gets two integer arguments:
xPeriod
. It is the horizontal distance between two
dots. Use 1 (one) for a continuous horizontal hatching.
yPeriod
. It is the vertical distance between two
dots. Use 1 (one) for a continuous vertical hatching.
The SkewGrid
is a pattern parallel to the diagonals, that is,
the bisectors between the x-axis and y-axis. It gets two integer arguments:
uPeriod
. The pattern is translation invariant with
respect to the vector (uPeriod/2,uPeriod/2). Use 2 (two) for a
continuous diagonal hatching.
vPeriod
. The pattern is translation invariant with
respect to the vector (vPeriod/2,-vPeriod/2). Use 2 (two) for a
continuous anti-diagonal hatching.
IlvPattern.GRAY_20
.
ThinHatching
is a skew grid pattern that provides fine
hatching. It is equivalent to
IlvPattern.UP_DIAGONAL
.
LIGHT_VERTICAL
is one of the pattern types defined in
IlvPattern
and it is used as an example. Any of the patterns
available in that class can be used. See
IlvPattern
for more details.
IltPattern
,
IlvPattern
,
Serialized FormANY, ANY_PROPERTIES, ANY_PSEUDOCLASSES
Constructor and Description |
---|
IltPatternFunction() |
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, which is "pattern".
|
boolean |
returnDelimitersAsToken()
Returns true if the delimiters are also returned as a token.
|
getDependencies, getImportance, getShortDescription
public String getName()
getName
in class IlvCSSFunction
public String getDelimiters()
getDelimiters
in class IlvCSSFunction
public boolean returnDelimitersAsToken()
returnDelimitersAsToken
in class IlvCSSFunction
false
.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 on.target
- The target object to which the returned object is applied.closure
- An object set by
IlvCSSBeans.setFunctionClosure(java.lang.Object)
IlPattern
.IlvCSSFunction
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.