Browse Source

MOBILE-24561 通过箭头按钮触发下拉框,进行修改,会导致保存失败

feature/big-screen
hades 5 years ago
parent
commit
445de1471b
  1. 18
      designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java

18
designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java

@ -15,6 +15,8 @@ import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
@ -149,6 +151,22 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam
attributeChange();
}
});
UIComboCheckBox.this.popup.addPopupMenuListener(new PopupMenuListener() {
@Override
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
// do nothing
}
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
attributeChange();
}
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
// do nothing
}
});
}
};
editor.setEditable(false);

Loading…
Cancel
Save