⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 accessiblecomboboxmodeleditor.java

📁 SWING的界面UI包 SWING的界面UI包
💻 JAVA
字号:
/* * AccessibleComboBoxModelEditor.java * * Created on 2007-8-28, 0:45:25 * * To change this template, choose Tools | Templates * and open the template in the editor. */package dyno.swing.designer.properties.editors.accessibles;import dyno.swing.designer.properties.editors.*;import dyno.swing.designer.properties.wrappers.ComboBoxModelWrapper;import java.awt.Frame;import java.awt.Window;import javax.swing.MutableComboBoxModel;import javax.swing.SwingUtilities;/** * * @author William Chen */public class AccessibleComboBoxModelEditor extends UneditableAccessibleEditor {    private ComboBoxModelDialog dialog;    /** Creates a new instance of AccessibleColorEditor */    public AccessibleComboBoxModelEditor() {        super(new ComboBoxModelWrapper());    }    protected void popupDialog() {        if (dialog == null) {            Frame frame;            Window win = SwingUtilities.getWindowAncestor(this);            if (win instanceof Frame) {                frame = (Frame) win;            } else {                frame = new Frame();            }            dialog = new ComboBoxModelDialog(frame, true);            dialog.setElementWrapper(((ComboBoxModelWrapper) encoder).getElementEncoder());            dialog.setLocationRelativeTo(this);        }        dialog.setModel((MutableComboBoxModel) getValue());        dialog.setVisible(true);        if(dialog.isOK()){            setValue(dialog.getModel());            fireStateChanged();        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -