public void addRule(String rule){
  if (rule != null) {
    final String baseUnitsDisable="BASE_SIZE_DISABLE";
    final String baseUnits="BASE_SIZE ";
    final String w3cLengthUnitsEnable="W3C_LENGTH_UNITS_ENABLE";
    final String w3cLengthUnitsDisable="W3C_LENGTH_UNITS_DISABLE";
    if (rule == baseUnitsDisable) {
      sizeMap=sizeMapDefault;
    }
 else     if (rule.startsWith(baseUnits)) {
      rebaseSizeMap(Integer.parseInt(rule.substring(baseUnits.length())));
    }
 else     if (rule == w3cLengthUnitsEnable) {
      w3cLengthUnits=true;
    }
 else     if (rule == w3cLengthUnitsDisable) {
      w3cLengthUnits=false;
    }
 else {
      CssParser parser=new CssParser();
      try {
        parser.parse(getBase(),new StringReader(rule),false,false);
      }
 catch (      IOException ioe) {
      }
    }
  }
}

public void addRule ( String rule ) { if ( rule != null ) { final String baseUnitsDisable = "BASE_SIZE_DISABLE" ; final String baseUnits = "BASE_SIZE " ; final String w3cLengthUnitsEnable = "W3C_LENGTH_UNITS_ENABLE" ; final String w3cLengthUnitsDisable = "W3C_LENGTH_UNITS_DISABLE" ; if ( rule == baseUnitsDisable ) { sizeMap = sizeMapDefault ; } else if ( rule . startsWith ( baseUnits ) ) { rebaseSizeMap ( Integer . parseInt ( rule . substring ( baseUnits . length ( ) ) ) ) ; } else if ( rule == w3cLengthUnitsEnable ) { w3cLengthUnits = true ; } else if ( rule == w3cLengthUnitsDisable ) { w3cLengthUnits = false ; } else { CssParser parser = new CssParser ( ) ; try { parser . parse ( getBase ( ) , new StringReader ( rule ) , false , false ) ; } catch ( IOException ioe ) { } } } }
adds a set of rules to the sheet . the rules are expected to be in valid css format . typically this would be called as a result of parsing a & lt ; style & gt ; tag .
