home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / text / rtf / RTFReader$DocumentDestination.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  2.2 KB  |  38 lines

  1. package com.sun.java.swing.text.rtf;
  2.  
  3. import com.sun.java.swing.text.AttributeSet;
  4. import com.sun.java.swing.text.BadLocationException;
  5.  
  6. class RTFReader$DocumentDestination extends RTFReader.TextHandlingDestination implements RTFReader.Destination {
  7.    // $FF: synthetic field
  8.    private final RTFReader this$0;
  9.  
  10.    public void deliverText(String var1, AttributeSet var2) {
  11.       try {
  12.          this.this$0.target.insertString(this.this$0.target.getLength(), var1, ((RTFReader.AttributeTrackingDestination)this).currentTextAttributes());
  13.       } catch (BadLocationException var4) {
  14.          throw new InternalError(((Throwable)var4).getMessage());
  15.       }
  16.    }
  17.  
  18.    public void finishParagraph(AttributeSet var1, AttributeSet var2) {
  19.       int var3 = this.this$0.target.getLength();
  20.  
  21.       try {
  22.          this.this$0.target.insertString(var3, "\n", var2);
  23.          this.this$0.target.setParagraphAttributes(var3, 1, var1, true);
  24.       } catch (BadLocationException var5) {
  25.          throw new InternalError(((Throwable)var5).getMessage());
  26.       }
  27.    }
  28.  
  29.    public void endSection() {
  30.    }
  31.  
  32.    RTFReader$DocumentDestination(RTFReader var1) {
  33.       super(var1);
  34.       this.this$0 = var1;
  35.       this.this$0 = var1;
  36.    }
  37. }
  38.