home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 144 / DPCS0200.iso / Internet / Supanet / system / swing.jar / javax / swing / plaf / basic / BasicListUI$PropertyChangeHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-05  |  2.2 KB  |  78 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.beans.PropertyChangeEvent;
  4. import java.beans.PropertyChangeListener;
  5. import javax.swing.ListModel;
  6. import javax.swing.ListSelectionModel;
  7.  
  8. public class BasicListUI$PropertyChangeHandler implements PropertyChangeListener {
  9.    // $FF: synthetic field
  10.    private final BasicListUI this$0;
  11.  
  12.    public BasicListUI$PropertyChangeHandler(BasicListUI var1) {
  13.       this.this$0 = var1;
  14.    }
  15.  
  16.    public void propertyChange(PropertyChangeEvent var1) {
  17.       String var2 = var1.getPropertyName();
  18.       if (var2.equals("model")) {
  19.          ListModel var3 = (ListModel)var1.getOldValue();
  20.          ListModel var4 = (ListModel)var1.getNewValue();
  21.          if (var3 != null) {
  22.             var3.removeListDataListener(this.this$0.listDataListener);
  23.          }
  24.  
  25.          if (var4 != null) {
  26.             var4.addListDataListener(this.this$0.listDataListener);
  27.          }
  28.  
  29.          BasicListUI var10000 = this.this$0;
  30.          var10000.updateLayoutStateNeeded |= 1;
  31.          BasicListUI.access$0(this.this$0);
  32.       } else if (var2.equals("selectionModel")) {
  33.          ListSelectionModel var5 = (ListSelectionModel)var1.getOldValue();
  34.          ListSelectionModel var6 = (ListSelectionModel)var1.getNewValue();
  35.          if (var5 != null) {
  36.             var5.removeListSelectionListener(this.this$0.listSelectionListener);
  37.          }
  38.  
  39.          if (var6 != null) {
  40.             var6.addListSelectionListener(this.this$0.listSelectionListener);
  41.          }
  42.  
  43.          BasicListUI var7 = this.this$0;
  44.          var7.updateLayoutStateNeeded |= 1;
  45.          BasicListUI.access$0(this.this$0);
  46.       } else if (var2.equals("cellRenderer")) {
  47.          BasicListUI var8 = this.this$0;
  48.          var8.updateLayoutStateNeeded |= 64;
  49.          BasicListUI.access$0(this.this$0);
  50.       } else if (var2.equals("font")) {
  51.          BasicListUI var9 = this.this$0;
  52.          var9.updateLayoutStateNeeded |= 4;
  53.          BasicListUI.access$0(this.this$0);
  54.       } else if (var2.equals("prototypeCellValue")) {
  55.          BasicListUI var10 = this.this$0;
  56.          var10.updateLayoutStateNeeded |= 32;
  57.          BasicListUI.access$0(this.this$0);
  58.       } else if (var2.equals("fixedCellHeight")) {
  59.          BasicListUI var11 = this.this$0;
  60.          var11.updateLayoutStateNeeded |= 16;
  61.          BasicListUI.access$0(this.this$0);
  62.       } else if (var2.equals("fixedCellWidth")) {
  63.          BasicListUI var12 = this.this$0;
  64.          var12.updateLayoutStateNeeded |= 8;
  65.          BasicListUI.access$0(this.this$0);
  66.       } else if (var2.equals("cellRenderer")) {
  67.          BasicListUI var13 = this.this$0;
  68.          var13.updateLayoutStateNeeded |= 64;
  69.          BasicListUI.access$0(this.this$0);
  70.       } else if (var2.equals("selectionForeground")) {
  71.          this.this$0.list.repaint();
  72.       } else if (var2.equals("selectionBackground")) {
  73.          this.this$0.list.repaint();
  74.       }
  75.  
  76.    }
  77. }
  78.