home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 144 / DPCS0200.iso / Internet / Supanet / system / swing.jar / javax / swing / text / html / StyleSheet$FontWeight.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-05  |  1.0 KB  |  35 lines

  1. package javax.swing.text.html;
  2.  
  3. class StyleSheet$FontWeight extends StyleSheet.CssValue {
  4.    // $FF: synthetic field
  5.    private final StyleSheet this$0;
  6.    int weight;
  7.  
  8.    StyleSheet$FontWeight(StyleSheet var1) {
  9.       super(var1);
  10.       this.this$0 = var1;
  11.    }
  12.  
  13.    int getValue() {
  14.       return this.weight;
  15.    }
  16.  
  17.    Object parseCssValue(String var1) {
  18.       StyleSheet$FontWeight var2 = new StyleSheet$FontWeight(this.this$0);
  19.       var2.svalue = var1;
  20.       if (var1.equals("bold")) {
  21.          var2.weight = 700;
  22.       } else if (var1.equals("normal")) {
  23.          var2.weight = 400;
  24.       } else {
  25.          try {
  26.             var2.weight = Integer.parseInt(var1);
  27.          } catch (NumberFormatException var3) {
  28.             var2 = null;
  29.          }
  30.       }
  31.  
  32.       return var2;
  33.    }
  34. }
  35.