ilog.cpl.css.function
Interface IlpCSSFunction

All Superinterfaces:
Serializable
All Known Implementing Classes:
IltAbstractAlarmCountFunction, IltAbstractAlarmSummaryFunction, IltAbstractHighestSeverityFunction, IltAbstractSeverityColorFunction, IltAcknowledgedAlarmCountFunction, IltAcknowledgedAlarmSummaryFunction, IltAlarmCountFunction, IltAlarmSummaryFunction, IltHighestAcknowledgedSeverityFunction, IltHighestNewSeverityFunction, IltHighestSeverityFunction, IltNewAlarmCountFunction, IltNewAlarmSummaryFunction, IltPrimaryStateSummaryFunction, IltSecondaryStateSummaryFunction, IltSettingsFunction, IltSeverityBrightColorFunction, IltSeverityColorFunction, IltSeverityDarkColorFunction, IltSeverityIconFunction

public interface IlpCSSFunction
extends Serializable

This interface defines functions used by the JTGO style sheets.

An implemented function must be registered before it can be used.

Functions can be registered in your component directly in the style sheets, for instance:


  StyleSheet { 
    functionList : "myPackage.RevertFunction,tests.RandomFunction";
  }
  
or

 StyleSheet {
   functions[0]: "myPackage.RevertFunction";
   functions[1]: "tests.RandomFunction";
 }
 

Since:
JTGO 3.5

Method Summary
 Object call(Object[] args, Class type, IlpContext appc, IlpGraphicView view, IlpRepresentationObject ro, IlpAttribute attribute)
          Calls the function.
 String getDelimiters()
          Returns the delimiters of the function parameters.
 String getName()
          Returns the name of the function that will be known in the style sheet.
 boolean returnDelimitersAsToken()
          Returns true if the delimiters are also returned as token.
 

Method Detail

getName

String getName()
Returns the name of the function that will be known in the style sheet.


getDelimiters

String getDelimiters()
Returns the delimiters of the function parameters. It is strongly recommended to return at least the comma (","). The default implementation returns ",".

Returns:
A string containing all the accepted delimiters. A null or empty return value means there is no delimiter, so all the parameters are returned as a single token.

returnDelimitersAsToken

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

Returns:
true means the delimiters are returned as token; false means the delimiters are discarded (default).

call

Object call(Object[] args,
            Class type,
            IlpContext appc,
            IlpGraphicView view,
            IlpRepresentationObject ro,
            IlpAttribute attribute)
Calls the function.

Parameters:
args - The parameters of the functions.
type - The expected type to be returned. It can be null.
appc - The application context.
view - The graphic view.
ro - The current representation object.
attribute - The business attribute.
Returns:
The value computed by this function. It is advisable to return an object compatible with the expected type or a String.


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