Package javax.swing

Examples of javax.swing.DefaultComboBoxModel


   
    m_StartBut.setEnabled(m_RunThread == null);
    m_StopBut.setEnabled(m_RunThread != null);
    m_ignoreBut.setEnabled(true);
    m_ClassCombo.setModel(new DefaultComboBoxModel(attribNames));
    if (inst.classIndex() == -1)
      m_ClassCombo.setSelectedIndex(attribNames.length - 1);
    else
      m_ClassCombo.setSelectedIndex(inst.classIndex());
    updateRadioLinks();
View Full Code Here


  private JComboBox mLayoutCB;
  private DefaultComboBoxModel mLayoutCBModel;

  public LayoutTab() {
    CellConstraints cc = new CellConstraints();
    mLayoutCBModel = new DefaultComboBoxModel();
   
    PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,pref,10dlu,pref:grow",
        "pref,5dlu,pref,2dlu,pref,10dlu"), this);
    pb.setDefaultDialogBorder();
   
View Full Code Here

    attribNames[0] = "NO CLASS";
    for (int i = 1; i < attribNames.length; i++) {
      String type = "(" + Attribute.typeToStringShort(format.attribute(i-1)) + ") ";
      attribNames[i] = type + format.attribute(i-1).name();
    }
    m_ClassCombo.setModel(new DefaultComboBoxModel(attribNames));
    if (attribNames.length > 0) {
      m_ClassCombo.setSelectedIndex(existingClassCol+1);
    }
    if (m_displayColNames == false) {
      add(m_holderP, BorderLayout.CENTER);
View Full Code Here

    String [] attribNames = new String [m_Instances.numAttributes()];
    for (int i = 0; i < attribNames.length; i++) {
      String type = "(" + Attribute.typeToStringShort(m_Instances.attribute(i)) + ") ";
      attribNames[i] = type + m_Instances.attribute(i).name();
    }
    m_ClassCombo.setModel(new DefaultComboBoxModel(attribNames));
    if (attribNames.length > 0) {
      if (inst.classIndex() == -1)
  m_ClassCombo.setSelectedIndex(attribNames.length - 1);
      else
  m_ClassCombo.setSelectedIndex(inst.classIndex());
View Full Code Here

        atts.add("(" + Attribute.typeToStringShort(m_visualizeDataSet.attribute(i)) + ") "
            + m_visualizeDataSet.attribute(i).name());
      }
     
      final JComboBox classCombo = new JComboBox();
      classCombo.setModel(new DefaultComboBoxModel(atts));     
     
      if (atts.size() > 0) {
        if (m_visualizeDataSet.classIndex() < 0) {
          classCombo.setSelectedIndex(atts.size() - 1);
        } else {
View Full Code Here

    int existingClassVal = m_classValuePicker.getClassValueIndex();
    String [] attribValNames = new String [format.classAttribute().numValues()];
    for (int i = 0; i < attribValNames.length; i++) {
      attribValNames[i] = format.classAttribute().value(i);
    }
    m_ClassValueCombo.setModel(new DefaultComboBoxModel(attribValNames));
    if (attribValNames.length > 0) {
      if (existingClassVal < attribValNames.length) {
  m_ClassValueCombo.setSelectedIndex(existingClassVal);
      }
    }
View Full Code Here

    settings.setExporterProperty(GoogleExporter.STORE_SETTINGS,   mReminderStore.isSelected());
  }

  private void loadingFailed() {
    DefaultComboBoxModel model = (DefaultComboBoxModel) mCalendarChooser.getModel();
    model.removeAllElements();
    model.addElement(mLocalizer.msg("errorLoading", "Error while loading calendars"));
  }
View Full Code Here

    // Send the request and print the response
    URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/owncalendars/full");
    CalendarFeed resultFeed = myService.getFeed(feedUrl, CalendarFeed.class);

    DefaultComboBoxModel model = (DefaultComboBoxModel) mCalendarChooser.getModel();
    model.removeAllElements();

    for (int i = 0; i < resultFeed.getEntries().size(); i++) {
      CalendarEntry entry = resultFeed.getEntries().get(i);

      String id = entry.getId();
      id = StringUtils.substringAfterLast(id, "/");

      model.addElement(new GoogleComboboxItem(id, entry.getTitle().getPlainText()));

      if (id.equals(settings.getExporterProperty(GoogleExporter.SELECTED_CALENDAR))) {
        mCalendarChooser.setSelectedIndex(model.getSize() - 1);
      }
    }

    mCalendarChooser.setEnabled(true);
View Full Code Here

    * Sets the log level combo box to the specified log level.
    *
    * @param  logLevel   the log level in question.
    */
    private void setLogLevelComboBoxSetting(LogLevel logLevel) {
        DefaultComboBoxModel model = (DefaultComboBoxModel) logLevelComboBox.getModel();
        for (int index = 0; index < model.getSize(); index++) {
            LogLevelWrapper wrapper = (LogLevelWrapper) model.getElementAt(index);
            if (wrapper.logLevel == logLevel) {
                logLevelComboBox.setSelectedIndex(index);
                return;
            }
        }
View Full Code Here

            monthBox = ComponentFactory.getComboBox();
            monthBox.addActionListener(this);
            monthBox.setActionCommand("monthChanged");
        }
       
        monthBox.setModel(new DefaultComboBoxModel(months));
        monthBox.setSelectedIndex(c.get(Calendar.MONTH));
    }
View Full Code Here

TOP

Related Classes of javax.swing.DefaultComboBoxModel

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.