home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &… the Search for Life CD 3 / 0_CD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / plaf / basic / BasicScrollBarUI$PropertyChangeHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.8 KB  |  42 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.ComponentOrientation;
  4. import java.beans.PropertyChangeEvent;
  5. import java.beans.PropertyChangeListener;
  6. import javax.swing.BoundedRangeModel;
  7.  
  8. public class BasicScrollBarUI$PropertyChangeHandler implements PropertyChangeListener {
  9.    // $FF: synthetic field
  10.    private final BasicScrollBarUI this$0;
  11.  
  12.    public BasicScrollBarUI$PropertyChangeHandler(BasicScrollBarUI var1) {
  13.       this.this$0 = var1;
  14.    }
  15.  
  16.    public void propertyChange(PropertyChangeEvent var1) {
  17.       String var2 = var1.getPropertyName();
  18.       if ("model".equals(var2)) {
  19.          BoundedRangeModel var3 = (BoundedRangeModel)var1.getOldValue();
  20.          BoundedRangeModel var4 = (BoundedRangeModel)var1.getNewValue();
  21.          var3.removeChangeListener(this.this$0.modelListener);
  22.          var4.addChangeListener(this.this$0.modelListener);
  23.          this.this$0.scrollbar.repaint();
  24.          this.this$0.scrollbar.revalidate();
  25.       } else if ("orientation".equals(var2)) {
  26.          Integer var5 = (Integer)var1.getNewValue();
  27.          if (this.this$0.incrButton instanceof BasicArrowButton) {
  28.             ((BasicArrowButton)this.this$0.incrButton).setDirection(var5 == 0 ? 3 : 5);
  29.          }
  30.  
  31.          if (this.this$0.decrButton instanceof BasicArrowButton) {
  32.             ((BasicArrowButton)this.this$0.decrButton).setDirection(var5 == 0 ? 7 : 1);
  33.          }
  34.       } else if ("componentOrientation".equals(var2)) {
  35.          ComponentOrientation var6 = this.this$0.scrollbar.getComponentOrientation();
  36.          this.this$0.incrButton.setComponentOrientation(var6);
  37.          this.this$0.decrButton.setComponentOrientation(var6);
  38.       }
  39.  
  40.    }
  41. }
  42.