ilog.views.util.styling
Interface IlvCSSAttributeSelector


public interface IlvCSSAttributeSelector

This interface defines the read only access to the attribute selectors of a simple selector of a CSS rule. Each CSS rule consists of a sequence of simple selectors that define how the rule matches the objects, and the declarations the define how to set the properties of the matches objects. For instance, the CSS rule

 node.activity[workload==5]:touched {
   x: 100;
   y: 200;
 }
 
contains the simple selector node.activity[workload==5]:touched which has the attribute selector [workload==5].

Since:
JViews 7.5
See Also:
IlvCSSRule, IlvCSSSelector

Field Summary
static int DIFFERENT_NUM
          Tests that the attribute at the matching object is unequal to the value.
static int DIFFERENT_STRING
          Tests that the attribute at the matching object is unequal to the value.
static int EQUAL
          Tests that the attribute at the matching object is equal to the value.
static int EXACT
          Tests that the attribute at the matching object is equal to the value.
static int GREATER
          Tests that the attribute at the matching object is greater than the value.
static int GREATER_EQUAL
          Tests that the attribute at the matching object is greater or equal to the value.
static int LESS
          Tests that the attribute at the matching object is less than the value.
static int LESS_EQUAL
          Tests that the attribute at the matching object is less or equal to the value.
static int NONE
          Tests whether the attribute exists at the matching object and is not null.
static int SUBSTRING
          Tests that the attribute at the matching object is a list of space-separated words, one of which is exactly equal to the value.
 
Method Summary
 String getAttributeName()
          Returns the attribute name of the attribute selector.
 int getComparator()
          Returns the comparator of the attribute selector.
 String getValue()
          Returns the comparison value of the attribute selector as String.
 boolean isIdentical(Object obj)
          Returns true if this attribute selector is considered logically identical to the input object.
 void printCSS(PrintWriter out, int indent)
          Prints the attribute selector using CSS syntax.
 

Field Detail

NONE

static final int NONE
Tests whether the attribute exists at the matching object and is not null.
Example: [attribute]

See Also:
getComparator(), Constant Field Values

EXACT

static final int EXACT
Tests that the attribute at the matching object is equal to the value. This works for nonnumerical values.
Example: [attribute="warning"]

See Also:
getComparator(), Constant Field Values

SUBSTRING

static final int SUBSTRING
Tests that the attribute at the matching object is a list of space-separated words, one of which is exactly equal to the value.
Example: [attribute~="warning"]

See Also:
getComparator(), Constant Field Values

GREATER

static final int GREATER
Tests that the attribute at the matching object is greater than the value. This works for numerical values.
Example: [attribute>5]

See Also:
getComparator(), Constant Field Values

GREATER_EQUAL

static final int GREATER_EQUAL
Tests that the attribute at the matching object is greater or equal to the value. This works for numerical values.
Example: [attribute>=5]

See Also:
getComparator(), Constant Field Values

LESS

static final int LESS
Tests that the attribute at the matching object is less than the value. This works for numerical values.
Example: [attribute<5]

See Also:
getComparator(), Constant Field Values

LESS_EQUAL

static final int LESS_EQUAL
Tests that the attribute at the matching object is less or equal to the value. This works for numerical values.
Example: [attribute<=5]

See Also:
getComparator(), Constant Field Values

EQUAL

static final int EQUAL
Tests that the attribute at the matching object is equal to the value. This works for numerical values.
Example: [attribute==5]

See Also:
getComparator(), Constant Field Values

DIFFERENT_NUM

static final int DIFFERENT_NUM
Tests that the attribute at the matching object is unequal to the value. This works for numerical values.
Example: [attribute<>5]

See Also:
getComparator(), Constant Field Values

DIFFERENT_STRING

static final int DIFFERENT_STRING
Tests that the attribute at the matching object is unequal to the value. This works for nonnumerical values.
Example: [attribute~5]

See Also:
getComparator(), Constant Field Values
Method Detail

getAttributeName

String getAttributeName()
Returns the attribute name of the attribute selector.

Returns:
The left hand part of the attribute selector.

getValue

String getValue()
Returns the comparison value of the attribute selector as String. The comparison value is ignored for the comparator NONE.

Returns:
The right hand part of the attribute selector.

getComparator

int getComparator()
Returns the comparator of the attribute selector. Possible values are NONE, EXACT, SUBSTRING, GREATER, GREATER_EQUAL, LESS, LESS_EQUAL, EQUAL, DIFFERENT_NUM, DIFFERENT_STRING.


printCSS

void printCSS(PrintWriter out,
              int indent)
Prints the attribute selector using CSS syntax.

Parameters:
out - The output print writer.
indent - The indentation level.

isIdentical

boolean isIdentical(Object obj)
Returns true if this attribute selector is considered logically identical to the input object. It compares the attribute name, value and the comparator.

Parameters:
obj - The object to compare with.


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