Package javax.swing

Examples of javax.swing.JComboBox$AccessibleJComboBox$EditorAccessibleContext


    panel.setBorder(Borders.DLU4_BORDER);

    panel.add(new JLabel(mLocalizer.msg("time", "Time zone correction")), cc.xy(1, 1));

    mCorrectionCB = new JComboBox(new String[] { "-1:00", "-0:45", "-0:30", "-0:15", "0:00", "+0:15", "+0:30", "+0:45", "+1:00" });
    mCorrectionCB.setSelectedIndex(mChannel[0].getTimeZoneCorrectionMinutes() / 15 + 4);

    panel.add(mCorrectionCB, cc.xy(3, 1));

    JTextArea txt = UiUtilities.createHelpTextArea(mLocalizer.msg("DLSTNote", ""));
View Full Code Here


    private volatile boolean fireFurther = true;

    public EventStartBinding(FormModel formModel, DataPoolSettings settings) {
        super(formModel, "start", Integer.class);
        this.settings = settings;
        slotCombo = new JComboBox(createList(0, settings.getTimeslotsPerDay()));
        dayCombo = new JComboBox(createList(0, settings.getNumberOfDays()));

        /* if the internal value changes */
        slotCombo.addActionListener(new ActionListener() {

            @Override
View Full Code Here

    mSettingsPn.add(DefaultComponentFactory.getInstance().createSeparator(mLocalizer.msg("titleLanguage", "Locale")), cc.xyw(1,1,5));

    mSettingsPn.add(new JLabel(mLocalizer.msg("language", "Language:")), cc.xy(2,3));
    Locale[] allLocales = mLocalizer.getAllAvailableLocales();
    ArrayList<Locale> localesList = new ArrayList<Locale>(Arrays.asList(allLocales));
    mSettingsPn.add(mLanguageCB = new JComboBox(allLocales), cc.xy(4,3));

    mLanguageCB.setRenderer(new DefaultListCellRenderer() {
      @Override
      public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        return super.getListCellRendererComponent(list, ((Locale)value).getDisplayName(), index, isSelected, cellHasFocus);
      }
    });

    String language = Settings.propLanguage.getString();
    String country = Settings.propCountry.getString();
    String variant = Settings.propVariant.getString();

    Locale loc = new Locale(language, country, variant);
    if (localesList.contains(loc)) {
      mLanguageCB.setSelectedItem(loc);
    }
    else {
      loc = new Locale(language, country);
      if (localesList.contains(loc)) {
        mLanguageCB.setSelectedItem(loc);
      }
      else {
        loc = new Locale(language);
        if (localesList.contains(loc)) {
          mLanguageCB.setSelectedItem(loc);
        }
      }
    }

    // time zone data may not be accessible, therefore use try-catch everywhere
    String[] zoneIds = new String[0];
    try {
      zoneIds = TimeZone.getAvailableIDs();
      Arrays.sort(zoneIds);
    } catch (Exception e) {
      e.printStackTrace();
    }
    mTimezoneCB = new JComboBox(zoneIds);
    String zone = Settings.propTimezone.getString();
    if (zone == null) {
      try {
        zone = TimeZone.getDefault().getID();
      } catch (Exception e) {
View Full Code Here

    String temp = Settings.propSkinLFThemepack.getString();
    temp = StringUtils.substringAfterLast(temp, File.separator);

    String[] skins = getThemePacks();

    mThemePack = new JComboBox(skins);
    mThemePack.setSelectedItem(temp);

    content.add(DefaultComponentFactory.getInstance().createSeparator(mLocalizer.msg("chooseThemepack", "Choose Themepack")), cc.xyw(1,5,3));
    content.add(mThemePack, cc.xy(2,7));
View Full Code Here

    refreshSettings.add(mAutoDownload, cc.xyw(2, 3, 5));

    refreshSettings.add(mStartDownload, cc.xyw(3, 5, 4));
    refreshSettings.add(mRecurrentDownload, cc.xyw(3, 6, 4));

    mAutoDownloadCombo = new JComboBox(AUTO_DOWNLOAD_MSG_ARR);
    String dlType = Settings.propAutoDownloadType.getString();
    if (dlType.equals("daily")) {
      mAutoDownloadCombo.setSelectedIndex(0);
    } else if (dlType.equals("every3days")) {
      mAutoDownloadCombo.setSelectedIndex(1);
    } else if (dlType.equals("weekly")) {
      mAutoDownloadCombo.setSelectedIndex(2);
    }

    JPanel panel = new JPanel(new FormLayout("10dlu, pref, 3dlu, pref", "pref, 3dlu, pref, 3dlu, pref, 5dlu, pref"));

    mStartDownload.setSelected(!dlType.equals("never") && !Settings.propAutoDataDownloadEnabled.getBoolean());
    mRecurrentDownload.setSelected(Settings.propAutoDataDownloadEnabled.getBoolean());

    mAutoDownload.setSelected(mStartDownload.isSelected() || mRecurrentDownload.isSelected());
    mStartDownload.setSelected(!mAutoDownload.isSelected() || mStartDownload.isSelected());

    mStartDownload.setEnabled(mAutoDownload.isSelected());
    mRecurrentDownload.setEnabled(mAutoDownload.isSelected());

    mHowOften = new JLabel(mLocalizer.msg("autoDownload.howOften", "How often?"));
    panel.add(mHowOften, cc.xy(2, 1));
    panel.add(mAutoDownloadCombo, cc.xy(4, 1));

    mAskBeforeDownloadRadio = new JRadioButton(mLocalizer.msg("autoDownload.ask", "Ask before downloading"));
    mAutoDownloadPeriodCB = new JComboBox(PeriodItem.getPeriodItems());

    int autoDLPeriod = Settings.propAutoDownloadPeriod.getInt();
    PeriodItem pi = new PeriodItem(autoDLPeriod);
    mAutoDownloadPeriodCB.setSelectedItem(pi);
View Full Code Here

   
    CellConstraints cc = new CellConstraints();
   
    content.add(new JLabel(mLocalizer.msg("colorTheme", "Color-Theme") ":"), cc.xy(1,1));
   
    mColorScheme = new JComboBox(themes);
    mColorScheme.setRenderer(new DefaultListCellRenderer() {
      public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        label.setText(((PlasticTheme)value).getName());
        return label;
View Full Code Here

      PrefOption[] options) {
    this.pref = pref;
    this.labelStr = labelStr;
   
    label = new JLabel(labelStr.get() + " ");
    combo = new JComboBox();
    for (PrefOption opt : options) {
      combo.addItem(opt);
    }
   
    combo.addActionListener(this);
View Full Code Here

        + FormFactory.PREF_COLSPEC.encode() + "," + FormFactory.RELATED_GAP_COLSPEC.encode() + ","
        + FormFactory.PREF_COLSPEC.encode() + ", fill:pref:grow");

    String[] services = { "", "Blogger.com", "Wordpress", "b2evolution" };

    mServiceCombo = new JComboBox(services);

    if (mSettings.getBlogService() == BlogService.Blogger) {
      mServiceCombo.setSelectedIndex(1);
    } else if (mSettings.getBlogService() == BlogService.WordPress) {
      mServiceCombo.setSelectedIndex(2);
View Full Code Here

            "pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, fill:3dlu:grow ,pref, 3dlu,pref"));

    content.add(DefaultComponentFactory.getInstance().createSeparator(mLocalizer.msg("calendar", "Calendar")), cc.xyw(1,1,5));

    content.add(new JLabel(mLocalizer.msg("select", "Select Calendar:")), cc.xyw(2,3,2));
    mCalendarChooser = new JComboBox(new String[] {mLocalizer.msg("loading", "Loading list...")});
    mCalendarChooser.setEnabled(false);
    content.add(mCalendarChooser, cc.xy(5,3));

    content.add(DefaultComponentFactory.getInstance().createSeparator(mLocalizer.msg("reminder", "Reminder")), cc.xyw(1,5,5));

    mReminderCheckBox = new JCheckBox(mLocalizer.msg("reminderCheckbox", "Reminder"));
    mReminderCheckBox.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent event) {
        refreshEnabledElements();
      }
    });

    content.add(mReminderCheckBox, cc.xyw(2,7,4));

    mReminderText = new JLabel(mLocalizer.msg("minutesBefore", "Remind how many minutes before?"));
    content.add(mReminderText, cc.xy(3,9));

    Vector<GoogleComboboxItem> v = new Vector<GoogleComboboxItem>();
    v.add(new GoogleComboboxItem(    5, mLocalizer.msg("5_minutes", "5 minutes")));
    v.add(new GoogleComboboxItem(   10, mLocalizer.msg("10_minutes","10 minutes")));
    v.add(new GoogleComboboxItem(   15, mLocalizer.msg("15_minutes","15 minutes")));
    v.add(new GoogleComboboxItem(   20, mLocalizer.msg("20_minutes","20 minutes")));
    v.add(new GoogleComboboxItem(   25, mLocalizer.msg("25_minutes","25 minutes")));
    v.add(new GoogleComboboxItem(   30, mLocalizer.msg("30_minutes","30 minutes")));
    v.add(new GoogleComboboxItem(   45, mLocalizer.msg("45_minutes", "45 minutes")));
    v.add(new GoogleComboboxItem(   60, mLocalizer.msg("60_minutes","1 hour")));
    v.add(new GoogleComboboxItem120, mLocalizer.msg("120_minutes","2 hours")));
    v.add(new GoogleComboboxItem180, mLocalizer.msg("180_minutes","3 hours")));
    v.add(new GoogleComboboxItem720, mLocalizer.msg("720_minutes","12 hours")));
    v.add(new GoogleComboboxItem( 1440, mLocalizer.msg("1440_minutes","1 day")));
    v.add(new GoogleComboboxItem( 2880, mLocalizer.msg("2880_minutes","2 days")));
    v.add(new GoogleComboboxItem(10080, mLocalizer.msg("10080_minutes","1 week")));
    mRemindMinutes = new JComboBox(v);

    String minutes = settings.getExporterProperty(GoogleExporter.REMINDER_MINUTES);
    for (GoogleComboboxItem item : v) {
      if (item.getKey().equals(minutes)) {
        mRemindMinutes.setSelectedItem(item);
View Full Code Here

    else
      english.setSelected(true);
    languagePanel.setBorder(new TitledBorder(propertiesMgr.getValue("languageBorder")));

    //Construct proxy panel.
    proxyType = new JComboBox();
    proxyType.addItem("No Proxy");
    proxyType.addItem("HTTP");
    proxyType.addItem("Socks 4");
    proxyType.addItem("Socks 5");
    proxyType.setSelectedIndex(Integer.parseInt(genProp.getValue("proxyType")));
View Full Code Here

TOP

Related Classes of javax.swing.JComboBox$AccessibleJComboBox$EditorAccessibleContext

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.