ilog.tgo.css.function
Class IltPatternFunction

java.lang.Object
  extended by ilog.views.util.styling.IlvCSSFunction
      extended by ilog.tgo.css.function.IltPatternFunction
All Implemented Interfaces:
Serializable

public class IltPatternFunction
extends IlvCSSFunction

Defines a function to create a customized instance of IltPattern based on user input.

This class can generate the following types of patterns:

  Grid
  SkewGrid
  Dots
  ThinHatching
 
Refer to IltPattern for more details about these patterns.

It can also generate patterns corresponding to an IlvPattern. Refer to IlvPattern for a list of available patterns. The function is defined as follows:


    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:

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:

equivalent to 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.

Since:
JTGO 3.5
See Also:
IltPattern, IlvPattern, Serialized Form

Constructor Summary
IltPatternFunction()
           
 
Method Summary
 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.
 
Methods inherited from class ilog.views.util.styling.IlvCSSFunction
getImportance, getShortDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltPatternFunction

public IltPatternFunction()
Method Detail

getName

public String getName()
Retrieves the name of the function, which is "pattern".

Specified by:
getName in class IlvCSSFunction

getDelimiters

public String getDelimiters()
Returns the delimiters of the function parameters.

Overrides:
getDelimiters in class IlvCSSFunction
Returns:
A string containing the accepted delimiters for this function, which is ",".

returnDelimitersAsToken

public boolean returnDelimitersAsToken()
Returns true if the delimiters are also returned as a token.

Overrides:
returnDelimitersAsToken in class IlvCSSFunction
Returns:
For this function it returns false.

call

public Object call(Object[] args,
                   Class type,
                   ilog.views.util.css.IlvCSSModel model,
                   Object node,
                   Object target,
                   Object closure)
Method called to execute the function.

Specified by:
call in class IlvCSSFunction
Parameters:
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)
Returns:
The value computed by this function, which is IlPattern.
See Also:
IlvCSSFunction


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.