ilog.views.util.styling
Interface IlvStylable

All Known Subinterfaces:
IlpGraphicComponent, IlpInteractiveGraphicComponent, IlpStylable, IlpStylableAdapter, IlpStylableGraphicView, IlpStylableViewsView
All Known Implementing Classes:
IlpAbstractTreeAdapter, IlpContainmentTreeAdapter, IlpEquipment, IlpEquipmentAdapter, IlpEquipmentView, IlpGraphView, IlpListAdapter, IlpNetwork, IlpNetworkAdapter, IlpNetworkView, IlpTable, IlpTableListAdapter, IlpTableView, IlpTree, IlpTreeView, IltSettings, ilog.views.util.css.IlvCSS, ilog.views.util.cssbeans.IlvCSSBeans, IlvCSSJViews, IlvMapCSSRenderer, IlvMapStyleSheetRenderer, IlvSDMEngine, IlvSDMView, IlvStyleSheetRenderer

public interface IlvStylable

Defines the interface for stylable components, that is, the ability to set/get CSS, fix debug mask, and register a PropertyChangeListener whenever a setter is called.

Since:
JViews 5.5

Field Summary
static int APPLIED_RULE_MASK
          Debug mask: shows new applied rules.
static int BAD_CLASS_MASK
          Debug mask: reports problem when creating a rendering object.
static int BAD_PROP_MASK
          Debug mask: shows node asked location (from the model).
static int BAD_PROP_WITH_STACK_MASK
          Debug mask: like BAD_PROP_MASK, plus display the stack trace of the exception.
static int CREATED_MASK
          Debug mask: prints objects that are created.
static int DECL_MASK
          Debug mask: prints the declaration key/value.
static int DECL_VALUE_MASK
          Debug mask: prints the actual declaration value.
static int FAILED_CONVERSIONS_MASK
          Debug mask: see error messages for failed conversions.
static int TIME_REPORT_MASK
          Debug mask: time stat when applying rules.
static int WARNING_PROP_MASK
          Debug mask: reports when no setter is found for a property.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a listener on property modification.
 int getStyleSheetDebugMask()
          Returns the current debug level.
 String[] getStyleSheets()
          Returns the cascaded style sheets.
 String getStyleSheets(int index)
          Returns one of the cascaded style sheets.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a listener on property modification.
 void setStyleSheetDebugMask(int mask)
          Sets the debug level while parsing the style sheets.
 void setStyleSheets(int index, String css)
          Changes one of the cascading style sheets.
 void setStyleSheets(String[] css)
          Sets the cascading style sheets.
 

Field Detail

CREATED_MASK

static final int CREATED_MASK
Debug mask: prints objects that are created.

See Also:
setStyleSheetDebugMask(int), Constant Field Values

DECL_MASK

static final int DECL_MASK
Debug mask: prints the declaration key/value.

See Also:
setStyleSheetDebugMask(int), Constant Field Values

DECL_VALUE_MASK

static final int DECL_VALUE_MASK
Debug mask: prints the actual declaration value.

See Also:
setStyleSheetDebugMask(int), Constant Field Values

APPLIED_RULE_MASK

static final int APPLIED_RULE_MASK
Debug mask: shows new applied rules.

See Also:
setStyleSheetDebugMask(int), Constant Field Values

BAD_PROP_MASK

static final int BAD_PROP_MASK
Debug mask: shows node asked location (from the model).

See Also:
setStyleSheetDebugMask(int), Constant Field Values

BAD_CLASS_MASK

static final int BAD_CLASS_MASK
Debug mask: reports problem when creating a rendering object.

See Also:
setStyleSheetDebugMask(int), Constant Field Values

WARNING_PROP_MASK

static final int WARNING_PROP_MASK
Debug mask: reports when no setter is found for a property.

See Also:
setStyleSheetDebugMask(int), Constant Field Values

TIME_REPORT_MASK

static final int TIME_REPORT_MASK
Debug mask: time stat when applying rules.

See Also:
setStyleSheetDebugMask(int), Constant Field Values

BAD_PROP_WITH_STACK_MASK

static final int BAD_PROP_WITH_STACK_MASK
Debug mask: like BAD_PROP_MASK, plus display the stack trace of the exception.

See Also:
setStyleSheetDebugMask(int), Constant Field Values

FAILED_CONVERSIONS_MASK

static final int FAILED_CONVERSIONS_MASK
Debug mask: see error messages for failed conversions.

See Also:
setStyleSheetDebugMask(int), Constant Field Values
Method Detail

setStyleSheets

void setStyleSheets(String[] css)
                    throws Exception
Sets the cascading style sheets. Each element can be a URL, a filename, or the style sheet string directly. The order is by priority (the last CSS takes over).

This is a bound property. It means the implementation should fire a PropertyChange event to all registered PropertyChangeListeners after setting the new value.

Parameters:
css - An array of strings representing the CSS document (usually with a file or URL with .css suffix).
Throws:
Exception - if there is a problem with the given CSS. It should be an {#link ilog.views.util.styling.IlvStylingException}, but this interface does not constrain the type of exception. This gives the opportunity for the implementation to have its own exception.

setStyleSheets

void setStyleSheets(int index,
                    String css)
                    throws Exception
Changes one of the cascading style sheets. A style sheet can be a URL, a filename, or the style sheet string directly. This method is an alternative to setStyleSheets(java.lang.String[]). It lets you change one particular style sheet file, instead of setting the whole style sheet array.

This is a bound property. It means the implementation should fire a PropertyChange event to all registered PropertyChangeListeners after setting the new value. The old and new value arguments of the event represent the whole array.

Parameters:
index - The index of the style sheet to replace.
css - A String representing the CSS document (usually with a file or URL with .css suffix).
Throws:
Exception - if there is a problem with the given CSS. It should be an {#link ilog.views.util.styling.IlvStylingException}, but this interface does not constrain the type of the exception. This gives the opportunity for the implementation to have its own exception.
See Also:
setStyleSheets(java.lang.String[])

getStyleSheets

String getStyleSheets(int index)
Returns one of the cascaded style sheets.

Parameters:
index - The position of the cascading style sheet to return.
Returns:
The URL or file name of the ith index style sheet.

getStyleSheets

String[] getStyleSheets()
Returns the cascaded style sheets.

Returns:
An array containing the URLs or file names of the style sheets.

setStyleSheetDebugMask

void setStyleSheetDebugMask(int mask)
Sets the debug level while parsing the style sheets. Set this property before calling setStyleSheets(java.lang.String[]) to debug problems during configuration. This is a bound property. It means the implementation should fire a PropertyChange event to all registered PropertyChangeListeners after setting the new value.

Parameters:
mask - The debug mask, expressed as an OR combination of the predefined flags.
See Also:
setStyleSheets(java.lang.String[]), getStyleSheetDebugMask(), APPLIED_RULE_MASK, BAD_CLASS_MASK, BAD_PROP_MASK, BAD_PROP_WITH_STACK_MASK, CREATED_MASK, DECL_MASK, DECL_VALUE_MASK, FAILED_CONVERSIONS_MASK, TIME_REPORT_MASK, WARNING_PROP_MASK

getStyleSheetDebugMask

int getStyleSheetDebugMask()
Returns the current debug level.

See Also:
setStyleSheetDebugMask(int)

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener on property modification.

Parameters:
listener - The listener to add.

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener on property modification.

Parameters:
listener - The listener to remove.


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