home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / text / html / HTMLDocument$HTMLReader$ObjectAction.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.8 KB  |  45 lines

  1. package javax.swing.text.html;
  2.  
  3. import javax.swing.text.AttributeSet;
  4. import javax.swing.text.DefaultStyledDocument;
  5. import javax.swing.text.MutableAttributeSet;
  6. import javax.swing.text.html.HTML.Attribute;
  7. import javax.swing.text.html.HTML.Tag;
  8.  
  9. class HTMLDocument$HTMLReader$ObjectAction extends HTMLDocument.HTMLReader.SpecialAction {
  10.    // $FF: synthetic field
  11.    private final HTMLDocument.HTMLReader this$1;
  12.  
  13.    HTMLDocument$HTMLReader$ObjectAction(HTMLDocument.HTMLReader var1) {
  14.       super(var1);
  15.       this.this$1 = var1;
  16.    }
  17.  
  18.    public void start(HTML.Tag var1, MutableAttributeSet var2) {
  19.       if (var1 == Tag.PARAM) {
  20.          this.addParameter(var2);
  21.       } else {
  22.          super.start(var1, var2);
  23.       }
  24.  
  25.    }
  26.  
  27.    public void end(HTML.Tag var1) {
  28.       if (var1 != Tag.PARAM) {
  29.          super.end(var1);
  30.       }
  31.  
  32.    }
  33.  
  34.    void addParameter(AttributeSet var1) {
  35.       String var2 = (String)var1.getAttribute(Attribute.NAME);
  36.       String var3 = (String)var1.getAttribute(Attribute.VALUE);
  37.       if (var2 != null && var3 != null) {
  38.          DefaultStyledDocument.ElementSpec var4 = (DefaultStyledDocument.ElementSpec)this.this$1.parseBuffer.lastElement();
  39.          MutableAttributeSet var5 = (MutableAttributeSet)var4.getAttributes();
  40.          var5.addAttribute(var2, var3);
  41.       }
  42.  
  43.    }
  44. }
  45.