home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.Component;
- import java.awt.ComponentOrientation;
- import java.beans.PropertyChangeEvent;
- import java.beans.PropertyChangeListener;
- import javax.swing.ComboBoxModel;
- import javax.swing.JList;
-
- public class BasicComboPopup$PropertyChangeHandler implements PropertyChangeListener {
- // $FF: synthetic field
- private final BasicComboPopup this$0;
-
- protected BasicComboPopup$PropertyChangeHandler(BasicComboPopup var1) {
- this.this$0 = var1;
- }
-
- public void propertyChange(PropertyChangeEvent var1) {
- String var2 = var1.getPropertyName();
- if (var2.equals("model")) {
- this.this$0.uninstallComboBoxModelListeners((ComboBoxModel)var1.getOldValue());
- this.this$0.list.setModel((ComboBoxModel)var1.getNewValue());
- this.this$0.installComboBoxModelListeners((ComboBoxModel)var1.getNewValue());
- if (this.this$0.comboBox.getItemCount() > 0) {
- this.this$0.comboBox.setSelectedIndex(0);
- }
-
- if (this.this$0.isVisible()) {
- this.this$0.hide();
- }
- } else if (var2.equals("renderer")) {
- this.this$0.list.setCellRenderer(this.this$0.comboBox.getRenderer());
- if (this.this$0.isVisible()) {
- this.this$0.hide();
- }
- } else if (var2.equals("JComboBox.lightweightKeyboardNavigation")) {
- Object var3 = var1.getNewValue();
- if (var3.equals("Lightweight")) {
- BasicComboPopup.access$002(this.this$0, true);
- } else if (var3.equals("Heavyweight")) {
- BasicComboPopup.access$002(this.this$0, false);
- }
- } else if (var2.equals("componentOrientation")) {
- ComponentOrientation var5 = (ComponentOrientation)var1.getNewValue();
- JList var4 = this.this$0.getList();
- if (var4 != null && ((Component)var4).getComponentOrientation() != var5) {
- ((Component)var4).setComponentOrientation(var5);
- }
-
- if (this.this$0.scroller != null && this.this$0.scroller.getComponentOrientation() != var5) {
- this.this$0.scroller.setComponentOrientation(var5);
- }
-
- if (var5 != this.this$0.getComponentOrientation()) {
- this.this$0.setComponentOrientation(var5);
- }
- }
-
- }
- }
-