Java Code Examples for org.w3c.css.sac.Condition#SAC_ID_CONDITION

The following examples show how to use org.w3c.css.sac.Condition#SAC_ID_CONDITION . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CSSConditionalSelector.java    From pentaho-reporting with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void countConditions
  ( final int[] conditionCounter, final Condition condition ) {
  if ( condition.getConditionType() == Condition.SAC_ID_CONDITION ) {
    conditionCounter[ ID_CONDITION ] += 1;
  } else if ( condition instanceof AttributeCondition ) {
    conditionCounter[ ATTR_CONDITION ] += 1;
  } else if ( condition instanceof CombinatorCondition ) {
    CombinatorCondition c = (CombinatorCondition) condition;
    countConditions( conditionCounter, c.getFirstCondition() );
    countConditions( conditionCounter, c.getSecondCondition() );
  } else {
    conditionCounter[ OTHER_CONDITION ] += 1;
  }
}
 
Example 2
Source File: CSSConditionalSelector.java    From pentaho-reporting with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void countConditions( final int[] conditionCounter, final Condition condition ) {
  if ( condition.getConditionType() == Condition.SAC_ID_CONDITION ) {
    conditionCounter[ID_CONDITION] += 1;
  } else if ( condition instanceof AttributeCondition ) {
    conditionCounter[ATTR_CONDITION] += 1;
  } else if ( condition instanceof CombinatorCondition ) {
    final CombinatorCondition c = (CombinatorCondition) condition;
    countConditions( conditionCounter, c.getFirstCondition() );
    countConditions( conditionCounter, c.getSecondCondition() );
  } else {
    conditionCounter[OTHER_CONDITION] += 1;
  }
}
 
Example 3
Source File: IdConditionImpl.java    From pentaho-reporting with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * An integer indicating the type of <code>Condition</code>.
 */
public short getConditionType() {
  return Condition.SAC_ID_CONDITION;
}