home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.text;
-
- import com.sun.java.swing.event.DocumentEvent;
- import com.sun.java.swing.event.DocumentListener;
- import java.awt.Rectangle;
- import java.beans.PropertyChangeEvent;
- import java.beans.PropertyChangeListener;
-
- class DefaultTextUI$UpdateHandler implements PropertyChangeListener, DocumentListener {
- // $FF: synthetic field
- private final DefaultTextUI this$0;
-
- public final void propertyChange(PropertyChangeEvent var1) {
- Object var2 = var1.getOldValue();
- Object var3 = var1.getNewValue();
- if (var2 instanceof Document || var3 instanceof Document) {
- if (var2 != null) {
- ((Document)var2).removeDocumentListener(this);
- }
-
- if (var3 != null) {
- ((Document)var3).addDocumentListener(this);
- }
-
- this.this$0.modelChanged();
- }
-
- this.this$0.propertyChange(var1);
- }
-
- public final void insertUpdate(DocumentEvent var1) {
- Rectangle var2 = this.this$0.painted ? new Rectangle(this.this$0.editor.getSize()) : null;
- this.this$0.rootView.insertUpdate(var1, var2, this.this$0.rootView.getViewFactory());
- }
-
- public final void removeUpdate(DocumentEvent var1) {
- Rectangle var2 = this.this$0.painted ? new Rectangle(this.this$0.editor.getSize()) : null;
- this.this$0.rootView.removeUpdate(var1, var2, this.this$0.rootView.getViewFactory());
- }
-
- public final void changedUpdate(DocumentEvent var1) {
- Rectangle var2 = this.this$0.painted ? new Rectangle(this.this$0.editor.getSize()) : null;
- this.this$0.rootView.changedUpdate(var1, var2, this.this$0.rootView.getViewFactory());
- }
-
- DefaultTextUI$UpdateHandler(DefaultTextUI var1) {
- this.this$0 = var1;
- this.this$0 = var1;
- }
- }
-