EncodedEnumeratedType.java 文件源码

java
阅读 34 收藏 0 点赞 0 评论 0

项目:JavaGraph 作者:
public EnumeratedEditor(GrammarModel grammar, Map<String,String> options) {
    super(grammar, new FlowLayout(FlowLayout.LEFT, 0, 0));
    setBackground(ExplorationDialog.INFO_BG_COLOR);
    this.selector = new JComboBox<>();
    // MdM - line below causes selector not to appear at all
    // this.selector.setMinimumSize(new Dimension(50, 20));
    this.selector.setBackground(ExplorationDialog.INFO_BOX_BG_COLOR);
    this.selector.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            notifyTemplateListeners();
        }
    });
    this.keys = new String[options.size()];
    this.nrKeys = 0;
    if (this.nrKeys == 0) {
        this.selector.addItem("<HTML><FONT color=red>"
            + "Error! No valid options available." + "</FONT></HTML>");
    }
    refresh();
    add(this.selector);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号