Package javax.swing

Examples of javax.swing.DefaultComboBoxModel


  }
 
  public JComboBox getComboBox()
  {
    final ComboBoxModel    model      = getComboBoxModel();
    final ComboBoxModel    emptyCBM    = new DefaultComboBoxModel();
    final MultiStateButton  button      = b;
    final JComboBox      ggBlend      = new JComboBox(); // ( pcbm );
    final ListCellRenderer  blendRenderer  = getComboBoxRenderer();
   
    ggBlend.setEditable( true );
View Full Code Here


                    comp.add(ModPack.getPack(value.trim()).getName());
                }
            }
        }

        compatiblePack.setModel(new DefaultComboBoxModel(comp.toArray(new String[comp.size()])));
        resolution.setModel(new DefaultComboBoxModel(res.toArray(new String[res.size()])));

        compatiblePack.setSelectedItem(instance.compatible);
        resolution.setSelectedItem(instance.resolution);

        apply.addActionListener(new ActionListener() {
View Full Code Here

                mcVersions.add(pack.getMcVersion());
                mcVersion.addItem(pack.getMcVersion());
            }
        }

        mcVersion.setModel(new DefaultComboBoxModel(mcVersions.toArray()));
        availability.setModel(new DefaultComboBoxModel(new String[] { I18N.getLocaleString("MAIN_ALL"), I18N.getLocaleString("FILTER_PUBLIC"), I18N.getLocaleString("FILTER_PRIVATE") }));

        mcVersion.setSelectedItem(pane.mcVersion);
        availability.setSelectedItem(pane.avaliability);

        pack();
View Full Code Here

                    compatiblePack.addItem(ModPack.getPack(compatable.trim()).getName());
                }
            }
        }

        type.setModel(new DefaultComboBoxModel(new String[] { "Client", "Server" }));
        origin.setModel(new DefaultComboBoxModel(new String[] { I18N.getLocaleString("MAIN_ALL"), "FTB", I18N.getLocaleString("FILTER_3THPARTY") }));
        compatiblePack.setModel(new DefaultComboBoxModel(packs.toArray()));

        apply.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed (ActionEvent arg0) {
                pane.compatible = (String) compatiblePack.getSelectedItem();
View Full Code Here

      Vector<String> candidates = new Vector<String>();
      for (int i = 0; i < m_simpleConfig.m_targetHeader.numAttributes(); i++) {
        candidates.add(m_simpleConfig.m_targetHeader.attribute(i).name());
      }
     
      m_graphTargetAtStepsCombo.setModel(new DefaultComboBoxModel(candidates));
      m_outputPredsCombo.setModel(new DefaultComboBoxModel(candidates));
    }
  }
View Full Code Here

        if (m_instances.attribute(i).isNominal()) {
          entries.add(m_instances.attribute(i).name());
        }
      }
    }
    m_primaryPeriodicCombo.setModel(new DefaultComboBoxModel(entries));
  }
View Full Code Here

    } else {
      inequalities.add("<");
      inequalities.add("<=");
    }
   
    m_operator.setModel(new DefaultComboBoxModel(inequalities));
   
    Vector<String> years = new Vector<String>();
    years.add("*");
    for (int i = 1900; i <=2100; i++) {
      years.add("" + i);
    }
    m_year.setModel(new DefaultComboBoxModel(years));
   
    Vector<String> months = new Vector<String>();
    months.add("*");
    months.add("jan"); months.add("feb"); months.add("mar"); months.add("apr");
    months.add("may"); months.add("jun"); months.add("jul"); months.add("aug");
    months.add("sep"); months.add("oct"); months.add("nov"); months.add("dec");
    m_month.setModel(new DefaultComboBoxModel(months));
   
    Vector<String> days = new Vector<String>();
    days.add("*");
    days.add("sun"); days.add("mon"); days.add("tue"); days.add("wed");
    days.add("thu"); days.add("fri"); days.add("sat");
    m_day_of_week.setModel(new DefaultComboBoxModel(days));
   
    Vector<String> week = new Vector<String>();
    week.add("*");
    for (int i = 1; i <= 52; i++) {
      week.add("" + i);
    }
    m_week_of_yr.setModel(new DefaultComboBoxModel(week));
    week = new Vector<String>();
    week.add("*");
    for (int i = 0; i <= 6; i++) {
      week.add("" + i);
    }
    m_week_of_month.setModel(new DefaultComboBoxModel(week));
    days = new Vector<String>();
    days.add("*");
    for (int i = 1; i <= 365; i++) {
      days.add("" + i);
    }
    m_day_of_yr.setModel(new DefaultComboBoxModel(days));
    days = new Vector<String>();
    days.add("*");
    for (int i = 1; i <= 31; i++) {
      days.add("" + i);
    }
    m_day_of_month.setModel(new DefaultComboBoxModel(days));
    Vector<String> hour = new Vector<String>();
    hour.add("*");
    for (int i = 0; i < 24; i++) {
      hour.add("" + i);
    }
    m_hour_of_day.setModel(new DefaultComboBoxModel(hour));
    Vector<String> minute = new Vector<String>();
    minute.add("*");
    for (int i = 0; i < 60; i++) {
      minute.add("" + i);
    }
    m_min_of_hour.setModel(new DefaultComboBoxModel(minute));
    Vector<String> second = new Vector<String>();
    second.add("*");
    for (int i = 0; i < 60; i++) {
      second.add("" + i);
    }
    m_second.setModel(new DefaultComboBoxModel(second));
  }
View Full Code Here

      if (m_instances.attribute(i).isDate() && firstDateName == null) {
        firstDateName = m_instances.attribute(i).name();
      }
    }

    m_timeStampCombo.setModel(new DefaultComboBoxModel(candidateNames));
    if (firstDateName != null) {
      m_timeStampCombo.setSelectedItem(firstDateName);
    }
  }
View Full Code Here

    candidateNames.add("Weekly");
    candidateNames.add("Monthly");
    candidateNames.add("Quarterly");
    candidateNames.add("Yearly");

    m_periodicityCombo.setModel(new DefaultComboBoxModel(candidateNames));

    // check to see if a date is set in the time combo and, if so, select
    // <detect automatically> by default
    String timeSelected = (String) m_timeStampCombo.getSelectedItem();
    System.err.println("Selected " + timeSelected);
View Full Code Here

    add(showTimeOnTrayOption);
  }
 
  private JComponent createThemeOptions() {
    themeLabel = new JLabel();
    themeOptions = new DefaultComboBoxModel();
    themeOptions.addElement(new ThemeOption(BrushedMetal.class));
    themeOptions.addElement(new ThemeOption(Gradient.class));
    themeOptions.addElement(new ThemeOption(Grainy.class));
    themeOptions.addElement(new ThemeOption(Shiny.class));
   
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.