Examples of ComboBoxModel


Examples of com.nexirius.framework.datamodel.ComboBoxModel

        if (c == null) {
            throw new ParserException("Enum " + name + " is not defined");
        }

        ComboBoxModel ret = (ComboBoxModel) c.newInstance(this);

        ret.setFieldName(name);

        if (init != null) {
            try {
                ret.setText(init);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
View Full Code Here

Examples of com.nexirius.framework.datamodel.ComboBoxModel

        values = new HashSet();
    }

    public DataModel newInstance(DataModelClasses classes)
            throws ParserException {
        return new ComboBoxModel(0, new SimpleArrayModel(values.toArray()), getName());
    }
View Full Code Here

Examples of com.nexirius.framework.datamodel.ComboBoxModel

        append(mailList = new MailListModel());
        append(html = new BooleanModel(false, "html"));
        append(sendAll = new BooleanModel(false, "sendAll"));
        append(interrupt = new BooleanModel(false, "interrupt"));
        append(progress = new ProgressModel(0, "progress"));
        append(separator = new ComboBoxModel(0, new SimpleArrayModel(SEPARATOR), "separator"));
        append(replaceStrings = new ReplaceStringsModel("ReplaceStrings"));
        append(attachmentList = new AttachmentListModel());
        append(listSorting = new ListSortingModel());
        listSorting.addDataModelListener(new SortingListener());
        license = new LicenseModel();
View Full Code Here

Examples of com.nexirius.framework.datamodel.ComboBoxModel

        append(showEnvironmentSelector);

        environments = new SimpleArrayModel(manager.getEnvironments().toArray(), FIELDNAME_ENVIRONMENTS);
        append(environments);

        currentEnvironment = new ComboBoxModel(0, environments, FIELDNAME_CURRENT_ENVIRONMENT);
        append(currentEnvironment);
        try {
            currentEnvironment.setText(initialEnvironment);
        } catch (Exception e) {
            //ignore
View Full Code Here

Examples of hudson.util.ComboBoxModel

         * of the combo box changes depending on the currently selected album.
         */
        public ComboBoxModel doFillTitleItems(@QueryParameter int album) {
            switch (album) {
            case 1:
                return new ComboBoxModel("Yellow Submarine","Only a Northern Song","All You Need Is Love");
            case 2:
                return new ComboBoxModel("Come Together","Something","I Want You");
            case 3:
                return new ComboBoxModel("The One After 909","Rocker","Get Back");
            default:
                // if no value is selected in the album, we'll get 0
                return new ComboBoxModel();
            }
        }
View Full Code Here

Examples of javax.swing.ComboBoxModel

   * @param lpi the lines per inch.
   */
  public void setLinesPerInch(final float lpi)
  {
    final Float lpiObj = new Float(lpi);
    final ComboBoxModel model = cbLinesPerInch.getModel();
    for (int i = 0; i < model.getSize(); i++)
    {
      if (lpiObj.equals(model.getElementAt(i)))
      {
        cbLinesPerInch.setSelectedIndex(i);
        return;
      }
    }
View Full Code Here

Examples of javax.swing.ComboBoxModel

   * @param cpi the characters per inch.
   */
  public void setCharsPerInch(final float cpi)
  {
    final Float cpiObj = new Float(cpi);
    final ComboBoxModel model = cbCharsPerInch.getModel();
    for (int i = 0; i < model.getSize(); i++)
    {
      if (cpiObj.equals(model.getElementAt(i)))
      {
        cbCharsPerInch.setSelectedIndex(i);
        return;
      }
    }
View Full Code Here

Examples of javax.swing.ComboBoxModel

      }
    }  
   }
  
   private void setModel(JComboBox box, ArtifactAction... actions) {
     ComboBoxModel oldModel = box.getModel();
     box.setModel(getComboBoxModel(actions));
     if (oldModel.getSize() != actions.length) {
       box.firePropertyChange("itemCount", oldModel.getSize(), actions.length);
     }
   }
View Full Code Here

Examples of javax.swing.ComboBoxModel

       box.firePropertyChange("itemCount", oldModel.getSize(), actions.length);
     }
   }
  
   private ComboBoxModel getComboBoxModel(ArtifactAction... actions) {
     ComboBoxModel result = new DefaultComboBoxModel(actions);
     result.setSelectedItem(actions[0]);
     return result;
   }
View Full Code Here

Examples of javax.swing.ComboBoxModel

        result.setComponentOrientation(componentOrientation);
        return result;
    }

    private JComboBox createEnumerationComponent(EnumerationOption option) {
        ComboBoxModel model = new EnumerationOptionComboBoxModel(option);
        JComboBox result = new JComboBox(model);
        return result;
    }
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.