Package javax.swing

Examples of javax.swing.DefaultListModel


        }
        return sIcons;
    }

    public DefaultListModel initIconList() {
        DefaultListModel list = new DefaultListModel();
        int[] icons = options.getIconList();
        for (int i = 0; i < icons.length; i++)
            addButton(icons[i], list);
        return list;
    }
View Full Code Here


            addButton(icons[i], list);
        return list;
    }

    public DefaultListModel initDeletedIconList() {
        DefaultListModel list = new DefaultListModel();
        if (options.getDeletedIconList() != null) {
            int[] icons = options.getDeletedIconList();
            for (int i = 0; i < icons.length; i++)
                addButton(icons[i], list);
        }
View Full Code Here

    setUnitMeasure(copy.getUnitMeasure());
    setMail(copy.getMail());
    setPhone(copy.getPhone());
    setRole(copy.getRole());
    myManager = copy.myManager;
    DefaultListModel copyDaysOff = copy.getDaysOff();
    for (int i=0; i<copyDaysOff.getSize(); i++) {
      myDaysOffList.addElement(copyDaysOff.get(i));
    }
    customFields = new HashMap(copy.customFields);
    areEventsEnabled = true;
    }
View Full Code Here

        processDaysOff(myResource);
    }

    private void processDaysOff(ProjectResource resource) {
        HumanResource hr = (HumanResource) resource;
        DefaultListModel daysOff = hr.getDaysOff();
        if (daysOff != null) {
            for (int l = 0; l < daysOff.size(); l++) {
                processDayOff((GanttDaysOff) daysOff.get(l));
            }
        }

    }
View Full Code Here

    mainTable.addMouseListener(new TableShowPopupMouseAdapter(popupMenu, mainTable));

    // work in progress list
    workInProgressList.setFocusable(false);
    workInProgressList.setModel(new DefaultListModel());
    workInProgressList.setBackground(this.getBackground());
    wipListScrollPane = new JScrollPane(workInProgressList);
    int wipHeight = 30;
    if (isSingleSelectableFile()) {
      wipHeight = 18;
View Full Code Here

                } else {
                    return null;
                }
            }
        });
        availableColumnsModel = new DefaultListModel();
        columnsToMergeModel = new DefaultListModel();

        columnsToMergeModel.addListDataListener(new ListDataListener() {

            public void intervalAdded(ListDataEvent e) {
                refreshAvailableMergeStrategies();
View Full Code Here

            return column.getTitle() + " -- " + column.getType().getTypeString();
        }
    }

    private void moveElementsFromListToOtherList(JList sourceList, JList targetList) {
        DefaultListModel sourceModel, targetModel;
        sourceModel = (DefaultListModel) sourceList.getModel();
        targetModel = (DefaultListModel) targetList.getModel();
        Object[] selection = sourceList.getSelectedValues();
        for (Object element : selection) {
            sourceModel.removeElement(element);
            targetModel.addElement(element);
        }
    }
View Full Code Here

            refresh(partition, filter.getParts());
        }
    }

    private void refresh(Partition partition, List<Part> currentParts) {
        final DefaultListModel model = new DefaultListModel();

        Set<Part> filterParts = new HashSet<Part>(currentParts);
        Part[] parts = partition.getParts();
        Arrays.sort(parts);
        for (int i = 0; i < parts.length; i++) {
            final Part p = parts[parts.length - 1 - i];
            PartWrapper pw = new PartWrapper(p, p.getColor());
            pw.setEnabled(filterParts.contains(p));
            model.add(i, pw);
        }
        list.setModel(model);
    }
View Full Code Here

    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

{
   
    /** 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

TOP

Related Classes of javax.swing.DefaultListModel

Copyright © 2018 www.massapicom. 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.