Examples of JRadioButton


Examples of javax.swing.JRadioButton

    refreshSettings.addSeparator(mLocalizer.msg("titleRefresh", "Startup"), cc.xyw(
        1, 1, 6));

    mAutoDownload = new JCheckBox(mLocalizer.msg("autoUpdate","Update TV listings automatically"));

    mStartDownload = new JRadioButton(mLocalizer.msg("onStartUp", "Only on TV-Browser startup"));
    mRecurrentDownload = new JRadioButton(mLocalizer.msg("recurrent","Recurrent"));

    ButtonGroup bg = new ButtonGroup();

    bg.add(mStartDownload);
    bg.add(mRecurrentDownload);

    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);

    panel.add(mAskBeforeDownloadRadio, cc.xyw(2, 3, 3));

    mAskTimeRadio = new JRadioButton(mLocalizer.msg("autoDownload.duration", "Automatically refresh for"));
    panel.add(mAskTimeRadio, cc.xy(2, 5));
    panel.add(mAutoDownloadPeriodCB, cc.xy(4, 5));

    ButtonGroup group = new ButtonGroup();
    group.add(mAskBeforeDownloadRadio);
View Full Code Here

Examples of javax.swing.JRadioButton

    GridBagConstraints gbc;
    Dimension curScaleDim;

    OptionsPanel(JList list) {
      // set up components
      formatPng = new JRadioButton("PNG");
      formatGif = new JRadioButton("GIF");
      formatJpg = new JRadioButton("JPEG");
      ButtonGroup bgroup = new ButtonGroup();
      bgroup.add(formatPng);
      bgroup.add(formatGif);
      bgroup.add(formatJpg);
      formatPng.setSelected(true);
View Full Code Here

Examples of javax.swing.JRadioButton

          "pref,5dlu,pref,3dlu,pref"),this);
      pb.setDefaultDialogBorder();

      pb.addSeparator(mLocalizer.msg("What", "What to start"), cc.xyw(1,1,7));
     
      JRadioButton application = new JRadioButton(mLocalizer.msg("Application", "Application"));
       
      pb.add(application, cc.xy(2,3));
       
      mPathTextField.setText(mData.getProgramPath());
      mPathTextField.addFocusListener(new FocusAdapter() {
        public void focusLost(FocusEvent e) {
          mData.setProgramPath(mPathTextField.getText());
        }
      });

      pb.add(mPathTextField, cc.xy(4,3));

      mFileButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          pathButtonPressed(e);
        }
      });

      pb.add(mFileButton, cc.xy(6,3));
       
      JRadioButton url = new JRadioButton(mLocalizer.msg("URL", "URL"));
       
      pb.add(url, cc.xy(2,5));
       
      mUrl.setText(mData.getWebUrl());
       
      mUrl.addFocusListener(new FocusAdapter() {
        public void focusLost(FocusEvent e) {
          mData.setWebUrl(mUrl.getText());
        }
      });

      pb.add(mUrl, cc.xyw(4,5,3));
       
      ButtonGroup group = new ButtonGroup();
       
      group.add(application);
      group.add(url);
       
      url.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          setUrlMode(true);
        }
      });
       
      application.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          setUrlMode(false);
        }
      });
       
      if (mData.getUseWebUrl()) {
        url.setSelected(true);
      } else {
        application.setSelected(true);
      }
     
      setUrlMode(mData.getUseWebUrl());
View Full Code Here

Examples of javax.swing.JRadioButton

   
    mIsEnabled = new JCheckBox(mLocalizer.msg("onTimeEnabled","Show programs at..."),Settings.propTrayOnTimeProgramsEnabled.getBoolean());
   
    ButtonGroup bg = new ButtonGroup();
   
    mShowInSubMenu = new JRadioButton(mLocalizer.msg("inSubMenu","in a sub menu"),Settings.propTrayOnTimeProgramsInSubMenu.getBoolean());
    mShowInTray = new JRadioButton(mLocalizer.msg("inTray","in the tray menu"), !mShowInSubMenu.isSelected());
   
    bg.add(mShowInSubMenu);
    bg.add(mShowInTray);
   
    mShowIconAndName = new JRadioButton(mLocalizer.msg("showIconName","Show channel icon and channel name"),Settings.propTrayOnTimeProgramsContainsName.getBoolean() && Settings.propTrayOnTimeProgramsContainsIcon.getBoolean());
    mShowIcon = new JRadioButton(mLocalizer.msg("showIcon","Show channel icon"),Settings.propTrayOnTimeProgramsContainsIcon.getBoolean() && !Settings.propTrayOnTimeProgramsContainsName.getBoolean());
    mShowName = new JRadioButton(mLocalizer.msg("showName","Show channel name"),!Settings.propTrayOnTimeProgramsContainsIcon.getBoolean() && Settings.propTrayOnTimeProgramsContainsName.getBoolean());
   
    ButtonGroup bg1 = new ButtonGroup();
    bg1.add(mShowIconAndName);
    bg1.add(mShowIcon);
    bg1.add(mShowName);
View Full Code Here

Examples of javax.swing.JRadioButton

      }
    } catch (Exception exc) {
      // ignore
    }
   
    mCloseOnEnd = new JRadioButton(mLocalizer.msg("autoCloseReminderAtProgramEnd","Program end"), mSettings.getProperty("autoCloseBehaviour","onEnd").equals("onEnd"));
    mCloseOnEnd.setEnabled(mReminderWindowChB.isSelected());
   
    mCloseNever = new JRadioButton(mLocalizer.msg("autoCloseNever","Never close"), mSettings.getProperty("autoCloseBehaviour","onEnd").equals("never"));
    mCloseNever.setEnabled(mReminderWindowChB.isSelected());
   
    mCloseOnTime = new JRadioButton(mLocalizer.ellipsisMsg("autoCloseAfterTime","After time"), mSettings.getProperty("autoCloseBehaviour","onEnd").equals("onTime"));
    mCloseOnTime.setEnabled(mReminderWindowChB.isSelected());
   
    ButtonGroup bg = new ButtonGroup();
   
    bg.add(mCloseOnEnd);
View Full Code Here

Examples of javax.swing.JRadioButton

        private ButtonGroup _group;
        private AbstractButton _dummy;
       
        public ButtonGroupWrapper() {
            _group = new ButtonGroup();
            _dummy = new JRadioButton();

            // We need a dummy button to have the appearance of all of
            // the radio buttons being in an unselected state.
            //
            // From:
View Full Code Here

Examples of javax.swing.JRadioButton

    final TitledBorder tb =
        new TitledBorder(getResources().getString(
            "csvexportdialog.separatorchar")); //$NON-NLS-1$
    separatorPanel.setBorder(tb);

    rbSeparatorTab = new JRadioButton(getResources().getString(
        "csvexportdialog.separator.tab")); //$NON-NLS-1$
    rbSeparatorColon = new JRadioButton(getResources().getString(
        "csvexportdialog.separator.colon")); //$NON-NLS-1$
    rbSeparatorSemicolon = new JRadioButton(getResources().getString(
        "csvexportdialog.separator.semicolon")); //$NON-NLS-1$
    rbSeparatorOther = new JRadioButton(getResources().getString(
        "csvexportdialog.separator.other")); //$NON-NLS-1$

    getFormValidator().registerButton(rbSeparatorColon);
    getFormValidator().registerButton(rbSeparatorOther);
    getFormValidator().registerButton(rbSeparatorSemicolon);
View Full Code Here

Examples of javax.swing.JRadioButton

    radioButtonInfo.addProperty("value", "string", "");
  };
 
  public RadioButton(Widget parent, String name) throws GUIException {
    super(parent, name);
    radioButton = new JRadioButton();
  }
View Full Code Here

Examples of javax.swing.JRadioButton

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        panel.setBorder(BorderFactory.createTitledBorder("Stack Trace Output"));

        showNoStackTraceRadioButton = new JRadioButton("Exceptions Only");
        showStackTrackRadioButton = new JRadioButton("Standard Stack Trace (-" + DefaultCommandLineConverter.STACKTRACE + ")")//add the command line character to the end (so if an error message says use a stack trace level, you can easily translate)
        showFullStackTrackRadioButton = new JRadioButton("Full Stack Trace (-" + DefaultCommandLineConverter.FULL_STACKTRACE + ")" );

        showNoStackTraceRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS);
        showStackTrackRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.ALWAYS);
        showFullStackTrackRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.ALWAYS_FULL);
View Full Code Here

Examples of javax.swing.JRadioButton

    @param  newStackTraceLevel   the new stack trace level.
    */
    private void setSelectedStackTraceLevel(StartParameter.ShowStacktrace newStackTraceLevel) {
        Enumeration<AbstractButton> buttonEnumeration = stackTraceButtonGroup.getElements();
        while (buttonEnumeration.hasMoreElements()) {
            JRadioButton radioButton = (JRadioButton) buttonEnumeration.nextElement();
            StartParameter.ShowStacktrace level = (StartParameter.ShowStacktrace) radioButton.getClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY);
            if (newStackTraceLevel == level) {
                radioButton.setSelected(true);
                return;
            }
        }
    }
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.