Package javax.swing

Examples of javax.swing.JComboBox.addItem()


      JComboBox mcombo = new JComboBox();
      mcombo.addItemListener(this);
      transformCombos.add(mcombo);
      mtransformPanel.add(mcombo, BorderLayout.NORTH);
      for(int j=0;j<TransformData.FULL;j++){
        mcombo.addItem(items[j]);
      }
      mcombo.setSelectedItem(items[newTransform.getKind()-1]);
     
      JTable mtable = createTableDataPanel(newTransform);
     
View Full Code Here


        JComboBox box = new JComboBox();
        String current = Settings.getInstance().getProperty("statusTheme");
        if (current == null) {
            current = "default";
        }
        box.addItem(current);

        // user defined themes
        File path = new File(JBother.settingsDir + File.separatorChar
                + "themes" + File.separatorChar + "statusicons");
View Full Code Here

                    .debug("Could not create user defined settings directories.");
        } else {
            userThemes = path.list();
            for (int i = 0; i < userThemes.length; i++) {
                if (!current.equals(userThemes[i])) {
                    box.addItem(userThemes[i]);
                }
            }
        }

        // default themes in the jar
View Full Code Here

                        userTheme = true;
                        break;
                    }
                }
                if (!userTheme && !line.equals(current)) {
                    box.addItem(line);
                }
            }
        } catch (IOException e) {
        }
View Full Code Here

        JComboBox box = new JComboBox();
        String current = Settings.getInstance().getProperty("emoticonTheme");
        if (current == null) {
            current = "default";
        }
        box.addItem(current);

        // default themes in the jar
        InputStream stream = getClass().getClassLoader().getResourceAsStream(
                "imagethemes/emoticons/index.dat");
        if (stream == null) {
View Full Code Here

        BufferedReader reader = new BufferedReader(in);
        String line;
        try {
            while ((line = reader.readLine()) != null) {
                if (!line.equals(current)) {
                    box.addItem(line);
                }
            }
        } catch (IOException e) {
        }
View Full Code Here

    private void setUpResourcesComboColumn(final JTable resourceTable) {
        List resources = myHRManager.getResources();
        final JComboBox comboBox = new JComboBox();
        for (int i = 0; i < resources.size(); i++) {
            comboBox.addItem(resources.get(i));
        }

        TableColumn resourcesColumn = resourceTable.getColumnModel().getColumn(
                1);
        comboBox.setEditable(false);
View Full Code Here

        final Role[] roles = myRoleManager.getEnabledRoles();
        final JComboBox comboBox = new JComboBox();

        for (int i = 0; i < roles.length; i++) {
            Role role = (Role) roles[i];
            comboBox.addItem(role);
        }

        TableColumn rolesColumn = resourceTable.getColumnModel().getColumn(4);
        comboBox.setEditable(false);
        rolesColumn.setCellEditor(new DefaultCellEditor(comboBox));
View Full Code Here

        final JComboBox comboBox = new JComboBox();
        Task[] possiblePredecessors = myTaskManager.getAlgorithmCollection()
                .getFindPossibleDependeesAlgorithm().run(getTask());
        for (int i = 0; i < possiblePredecessors.length; i++) {
            Task next = possiblePredecessors[i];
            comboBox.addItem(new DependencyTableModel.TaskComboItem(next));

        }

        comboBox.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

   
    void setUpRolesRenderer() {
        Role roles[] = getRoleManager().getEnabledRoles();
        final JComboBox comboBox = new JComboBox();
        for (int i = 0; i < roles.length; i++)
            comboBox.addItem(roles[i]);

        try {
            TableColumn roleColumn = this
                    .getColumn(ResourceTreeTableModel.strResourceRole);
            comboBox.setEditable(false);
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.