Examples of DefaultListModel


Examples of javax.swing.DefaultListModel

    public String getCurrentSpigot() {
        return spigotList.getSelectedValue().toString();
    }

    private ListModel getCategoryListModel() {
        DefaultListModel model = new DefaultListModel();
        for (ImporterWizardUI wizardUi : Lookup.getDefault().lookupAll(ImporterWizardUI.class)) {
            if (!model.contains(wizardUi.getCategory())) {
                model.addElement(wizardUi.getCategory());
            }
        }
        return model;
    }
View Full Code Here

Examples of javax.swing.DefaultListModel

{
   
    /** Creates a new instance of JCheckList */
    public JCheckList()
    {
        super (new DefaultListModel());
        setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        setCellRenderer(new JCheckListCellRenderer());
        JCheckListListener checkListener = new JCheckListListener(this);
        addMouseListener(checkListener);
        addKeyListener(checkListener);
View Full Code Here

Examples of javax.swing.DefaultListModel

        return wrapper;
    }

    private Component createTemplates() {
        DefaultListModel model = new DefaultListModel();
        model.addElement(createTemplate(0.0, 0.0, 1.0, 1.0));
        model.addElement(createTemplate(0.0, 1.0, 0.0, 1.0));
        model.addElement(createTemplate(0.0, 1.0, 1.0, 1.0));
        model.addElement(createTemplate(0.0, 1.0, 1.0, 0.0));
        model.addElement(createTemplate(1.0, 0.0, 0.0, 1.0));
        model.addElement(createTemplate(1.0, 0.0, 1.0, 1.0));
        model.addElement(createTemplate(1.0, 0.0, 1.0, 0.0));

        JList list = new JList(model);
        list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        list.setCellRenderer(new TemplateCellRenderer());
        list.addListSelectionListener(new TemplateSelectionHandler());
View Full Code Here

Examples of nextapp.echo2.app.list.DefaultListModel

       
        controlsColumn.addButton("Empty ListModel", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator(){
                    public void apply(AbstractListComponent listComponent) {
                        listComponent.setModel(new DefaultListModel());
                    }
                });
            }
        });
       
        controlsColumn.addButton("Set ListModel = Numbers", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator(){
                    public void apply(AbstractListComponent listComponent) {
                        listComponent.setModel(new DefaultListModel(NUMBERS));
                    }
                });
            }
        });
        controlsColumn.addButton("Focus SelectField1", new ActionListener() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.