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 / BasicTreeUI$PropertyChangeHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  2.8 KB  |  68 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.beans.PropertyChangeEvent;
  4. import java.beans.PropertyChangeListener;
  5. import java.util.EventObject;
  6. import javax.swing.tree.TreeCellEditor;
  7. import javax.swing.tree.TreeCellRenderer;
  8. import javax.swing.tree.TreeModel;
  9. import javax.swing.tree.TreePath;
  10.  
  11. public class BasicTreeUI$PropertyChangeHandler implements PropertyChangeListener {
  12.    // $FF: synthetic field
  13.    private final BasicTreeUI this$0;
  14.  
  15.    public BasicTreeUI$PropertyChangeHandler(BasicTreeUI var1) {
  16.       this.this$0 = var1;
  17.    }
  18.  
  19.    public void propertyChange(PropertyChangeEvent var1) {
  20.       if (((EventObject)var1).getSource() == this.this$0.tree) {
  21.          String var2 = var1.getPropertyName();
  22.          if (var2.equals("leadSelectionPath")) {
  23.             if (!BasicTreeUI.access$1000(this.this$0)) {
  24.                BasicTreeUI.access$400(this.this$0);
  25.                BasicTreeUI.access$1100(this.this$0, (TreePath)var1.getOldValue());
  26.                BasicTreeUI.access$1100(this.this$0, (TreePath)var1.getNewValue());
  27.             }
  28.          } else if (var2.equals("anchorSelectionPath") && !BasicTreeUI.access$1000(this.this$0)) {
  29.             BasicTreeUI.access$1100(this.this$0, (TreePath)var1.getOldValue());
  30.             BasicTreeUI.access$1100(this.this$0, (TreePath)var1.getNewValue());
  31.          }
  32.  
  33.          if (var2.equals("cellRenderer")) {
  34.             this.this$0.setCellRenderer((TreeCellRenderer)var1.getNewValue());
  35.             BasicTreeUI.access$1200(this.this$0);
  36.          } else if (var2.equals("model")) {
  37.             this.this$0.setModel((TreeModel)var1.getNewValue());
  38.          } else if (var2.equals("rootVisible")) {
  39.             this.this$0.setRootVisible((Boolean)var1.getNewValue());
  40.          } else if (var2.equals("showsRootHandles")) {
  41.             this.this$0.setShowsRootHandles((Boolean)var1.getNewValue());
  42.          } else if (var2.equals("rowHeight")) {
  43.             this.this$0.setRowHeight((Integer)var1.getNewValue());
  44.          } else if (var2.equals("cellEditor")) {
  45.             this.this$0.setCellEditor((TreeCellEditor)var1.getNewValue());
  46.          } else if (var2.equals("editable")) {
  47.             this.this$0.setEditable((Boolean)var1.getNewValue());
  48.          } else if (var2.equals("largeModel")) {
  49.             this.this$0.setLargeModel(this.this$0.tree.isLargeModel());
  50.          } else if (var2.equals("selectionModel")) {
  51.             this.this$0.setSelectionModel(this.this$0.tree.getSelectionModel());
  52.          } else if (var2.equals("font")) {
  53.             this.this$0.completeEditing();
  54.             if (this.this$0.treeState != null) {
  55.                this.this$0.treeState.invalidateSizes();
  56.             }
  57.  
  58.             this.this$0.updateSize();
  59.          } else if (var2.equals("componentOrientation") && this.this$0.tree != null) {
  60.             BasicTreeUI.access$802(this.this$0, BasicGraphicsUtils.isLeftToRight(this.this$0.tree));
  61.             BasicTreeUI.access$1200(this.this$0);
  62.             this.this$0.tree.treeDidChange();
  63.          }
  64.       }
  65.  
  66.    }
  67. }
  68.