Example #1
0
 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // 监听事件
   // TODO add your handling code here:
   if (jRadioButton1.isSelected()) {
     jRadioButtonName = jRadioButton1.getText();
   } else if (jRadioButton2.isSelected()) {
     jRadioButtonName = jRadioButton2.getText();
   }
   try {
     fwriter = new FileWriter(filename);
     fwriter.write(jTextField1.getText());
     fwriter.write("\r\n");
     fwriter.write(jTextField2.getText());
     fwriter.write("\r\n");
     fwriter.write(jTextField3.getText());
     fwriter.write("\r\n");
     fwriter.write(jTextField4.getText());
     fwriter.write("\r\n");
     fwriter.write(jRadioButtonName);
     fwriter.write("\r\n");
   } catch (IOException e) {
     e.printStackTrace();
   } finally {
     try {
       fwriter.flush();
       fwriter.close();
     } catch (IOException e) {
       e.printStackTrace();
     }
   }
   this.dispose();
 }
Example #2
0
  /**
   * Clears and focuses the search field if it is not focused. Otherwise, cycles to the next search
   * type.
   */
  public void startSearch() {
    if (increment.isSelected() && incSearch) {
      repeatIncremental();
      return;
    }
    if (!searchField.hasFocus()) {
      // searchField.setText("");
      searchField.selectAll();
      searchField.requestFocus();
    } else {
      if (increment.isSelected()) {
        floatSearch.setSelected(true);
      } else if (floatSearch.isSelected()) {
        hideSearch.setSelected(true);
      } else if (hideSearch.isSelected()) {
        showResultsInDialog.setSelected(true);
      } else if (showResultsInDialog.isSelected()) {
        searchAllBases.setSelected(true);
      } else {
        increment.setSelected(true);
      }
      increment.revalidate();
      increment.repaint();

      searchField.requestFocus();
    }
  }
  private void updateOk() {
    if (myFileRadioButton.isSelected() && isNotBlank(myFileTextField.getText())) {
      myFileString = new File(myFileTextField.getText());
      if (myFileString.exists() && myFileString.isFile() && myFileString.canRead()) {
        myFileTextField.setBackground(ColorUtil.OK_BG);
      } else {
        myFileTextField.setBackground(ColorUtil.ERROR_BG);
      }
    } else {
      myFileString = null;
      myFileTextField.setBackground(ColorUtil.OK_BG);
    }

    if (myUrlRadioButton.isSelected() && isNotBlank(myUrlTextField.getText())) {
      try {
        myUrlString = new URL(myUrlTextField.getText());
        myUrlTextField.setBackground(ColorUtil.OK_BG);
      } catch (MalformedURLException e) {
        myUrlTextField.setBackground(ColorUtil.ERROR_BG);
      }
    } else {
      myUrlString = null;
      myUrlTextField.setBackground(ColorUtil.OK_BG);
    }

    boolean okEnabled = getFileString() != null || getUrlString() != null;
    myOkButton.setEnabled(okEnabled);
  }
 public void okPressed() {
   PersistentBlackboardPlugIn.get(workbenchContext)
       .put(ConstraintManager.CONSTRAIN_LENGTH_ENABLED_KEY, lengthCheckBox.isSelected());
   PersistentBlackboardPlugIn.get(workbenchContext)
       .put(
           ConstraintManager.LENGTH_CONSTRAINT_KEY, Double.parseDouble(lengthTextField.getText()));
   PersistentBlackboardPlugIn.get(workbenchContext)
       .put(
           ConstraintManager.CONSTRAIN_INCREMENTAL_ANGLE_ENABLED_KEY,
           constrainIncrementalAngleCheckBox.isSelected());
   PersistentBlackboardPlugIn.get(workbenchContext)
       .put(
           ConstraintManager.INCREMENTAL_ANGLE_SIZE_KEY,
           Integer.parseInt(numPartsTextField.getText()));
   PersistentBlackboardPlugIn.get(workbenchContext)
       .put(ConstraintManager.CONSTRAIN_ANGLE_ENABLED_KEY, constrainAngleCheckBox.isSelected());
   PersistentBlackboardPlugIn.get(workbenchContext)
       .put(
           ConstraintManager.ANGLE_SIZE_KEY,
           Double.parseDouble(angleConstraintTextField.getText()));
   PersistentBlackboardPlugIn.get(workbenchContext)
       .put(ConstraintManager.RELATIVE_ANGLE_KEY, relativeAngleRadioButton.isSelected());
   PersistentBlackboardPlugIn.get(workbenchContext)
       .put(ConstraintManager.ABSOLUTE_ANGLE_KEY, absoluteAngleRadioButton.isSelected());
 }
 @Override
 public void actionPerformed(ActionEvent e) {
   if (e.getSource() == mComboBoxColumn) {
     updateList(null, false);
   } else if (e.getSource() == mRadioButton || e.getSource() == mComboBoxSortMode) {
     if (!mRadioButton.isSelected() && mDefaultColumn != -1)
       updateList(mTableModel.getCategoryList(mDefaultColumn), true);
     enableItems();
   } else if (e.getSource() == mRadioButtonSort) {
     enableItems();
   } else if (e.getSource() == mRadioButtonIsStructure) {
     updateMacroListEditor(mRadioButtonIsStructure.isSelected());
   } else if (e.getSource() == mButtonSort) {
     mActiveSortMode = mComboBoxSortMode.getSelectedIndex();
     mActiveSortColumn =
         (mActiveSortMode == cSortModeSize)
             ? -1
             : mTableModel.findColumn((String) mComboBoxSortColumn.getSelectedItem());
     mActiveSortIsAscending = (mComboBoxSortOrder.getSelectedIndex() == 0);
     updateList(
         sortCategories(
             mDefaultColumn, mActiveSortMode, mActiveSortColumn, mActiveSortIsAscending),
         true);
   }
 }
 /** Listener to handle button actions */
 public void actionPerformed(ActionEvent e) {
   // Check if the user pressed the ok button
   if (e.getSource() == ok_button) {
     filter_include_list = include_panel.getServiceList();
     filter_exclude_list = exclude_panel.getServiceList();
     if (status_box.isSelected()) {
       filter_active = status_active.isSelected();
       filter_complete = status_complete.isSelected();
     } else {
       filter_active = false;
       filter_complete = false;
     }
     ok_pressed = true;
     dialog.dispose();
   }
   // Check if the user pressed the cancel button
   if (e.getSource() == cancel_button) {
     dialog.dispose();
   }
   // Check if the user changed the status filter option
   if (e.getSource() == status_box) {
     status_active.setEnabled(status_box.isSelected());
     status_complete.setEnabled(status_box.isSelected());
   }
 }
Example #7
0
  public IPredicate getPredicate() {
    IPredicate predicate = null;
    if (myStandardSeach.isSelected()) {
      Enumeration optionsEnum = myOptions.elements();
      while (optionsEnum.hasMoreElements()) {
        TextOption option = (TextOption) optionsEnum.nextElement();
        if (option.isSelected()) {
          IPredicate optionPredicate = option.getPredicate();
          if (predicate == null) {
            predicate = optionPredicate;
          } else {
            predicate = new AndPredicate(predicate, optionPredicate);
          }
        }
      }
    } else if (myAdvancedSearch.isSelected()) {
      try {
        String searchString = myAdvancedTextField.getText();
        PredicateParser predParser = new PredicateParser();
        predicate = predParser.parse(searchString);
      } catch (ParseException e) {
        String error = e.getMessage();
        Debug.handleError(myContext.getFrame(), error, true);
      }
    }

    return predicate;
  }
Example #8
0
  private void updateShipLoadNames() {
    log.debug("Update ship load names");
    panelShipLoads.removeAll();
    if (_track != null) {
      // set radio button
      shipLoadNameAll.setSelected(_track.getShipLoadOption().equals(Track.ALL_LOADS));
      shipLoadNameInclude.setSelected(_track.getShipLoadOption().equals(Track.INCLUDE_LOADS));
      shipLoadNameExclude.setSelected(_track.getShipLoadOption().equals(Track.EXCLUDE_LOADS));

      pShipLoadControls.setVisible(!shipLoadNameAll.isSelected());

      if (!shipLoadNameAll.isSelected()) {
        int x = 0;
        int y = 0; // vertical position in panel

        int numberOfLoads = getNumberOfCheckboxesPerLine() / 2 + 1;
        for (String loadName : _track.getShipLoadNames()) {
          JLabel load = new JLabel();
          load.setText(loadName);
          addItemTop(panelShipLoads, load, x++, y);
          // limit the number of loads per line
          if (x > numberOfLoads) {
            y++;
            x = 0;
          }
        }
        revalidate();
      }
    } else {
      shipLoadNameAll.setSelected(true);
    }
    panelShipLoads.repaint();
    panelShipLoads.revalidate();
  }
  @Nullable
  public LocalChangeList getSelectedList(Project project) {
    ChangeListManager manager = ChangeListManager.getInstance(project);
    if (myRbNew.isSelected()) {
      String newText = myNewListPanel.getChangeListName();
      if (manager.findChangeList(newText) != null) {
        Messages.showErrorDialog(
            project,
            VcsBundle.message("changes.newchangelist.warning.already.exists.text", newText),
            VcsBundle.message("changes.newchangelist.warning.already.exists.title"));
        return null;
      }
    }
    final boolean existingSelected = myRbExisting.isSelected();
    VcsConfiguration.getInstance(myProject).PRESELECT_EXISTING_CHANGELIST = existingSelected;

    if (existingSelected) {
      return (LocalChangeList) myExistingListsCombo.getSelectedItem();
    } else {
      LocalChangeList changeList =
          manager.addChangeList(
              myNewListPanel.getChangeListName(), myNewListPanel.getDescription());
      myNewListPanel.changelistCreatedOrChanged(changeList);
      if (myNewListPanel.getMakeActiveCheckBox().isSelected()) {
        manager.setDefaultChangeList(changeList);
      }
      VcsConfiguration.getInstance(project).MAKE_NEW_CHANGELIST_ACTIVE =
          myNewListPanel.getMakeActiveCheckBox().isSelected();

      return changeList;
    }
  }
  public void storePrefs() {
    Preferences prefs = Preferences.userNodeForPackage(DurationFormatter.class);

    if (radioFormatHHQuarters.isSelected()) {
      prefs.putInt(
          DurationFormatter.PREF_DISPLAY_MODE, DurationFormatter.DISPLAY_DURATION_HH_QUARTER);
    } else if (radioFormatHHMM.isSelected()) {
      prefs.putInt(DurationFormatter.PREF_DISPLAY_MODE, DurationFormatter.DISPLAY_DURATION_HHMM);
    }

    try {
      prefs.flush();
    } catch (BackingStoreException e) {
      LOG.error("Cannot store Prefs: ", e);
    }
    conf.setStorePasswd(storePasswordCheckBox.isSelected());
    conf.setShowTimerOnStartup(showTimerOnStartupCheckBox.isSelected());

    for (Entry<String, JTextField> pt : persistenceFields.entrySet()) {
      conf.setConfigProperty(pt.getKey(), pt.getValue().getText());
    }

    conf.setConfigProperty(
        AnnotatedWorkRecordView.PREF_RESTORE_ON_INIT,
        Boolean.toString(initAnnotatedWorkRecordsOnStartup.isSelected()));

    workDaySettingsPanel.commit();
  }
 private void genderActionPerformed(ActionEvent evt) {
   if (evt.getSource() == radioFemale) {
     radioMale.setEnabled(!radioFemale.isSelected());
   } else {
     radioFemale.setEnabled(!radioMale.isSelected());
   }
 }
  @Override
  public Properties getDialogConfiguration() {
    Properties configuration = new Properties();

    boolean isStructure =
        (mDefaultColumn != -1)
            ? CompoundTableConstants.cColumnTypeIDCode.equals(
                mTableModel.getColumnSpecialType(mDefaultColumn))
            : mRadioButtonIsStructure.isSelected();
    configuration.setProperty(PROPERTY_IS_STRUCTURE, isStructure ? "true" : "false");

    String columnName =
        (mDefaultColumn == -1)
            ? (String) mComboBoxColumn.getSelectedItem()
            : mTableModel.getColumnTitleNoAlias(mDefaultColumn);
    configuration.setProperty(PROPERTY_COLUMN, columnName);
    if (mRadioButton.isSelected()) {
      if (mDefaultColumn != -1) {
        if (mActiveSortMode != -1) {
          configuration.setProperty(PROPERTY_SORT_MODE, SORT_MODE_CODE[mActiveSortMode]);
          configuration.setProperty(
              PROPERTY_SORT_IS_ASCENDING, mActiveSortIsAscending ? "true" : "false");
          if (mActiveSortMode != cSortModeSize)
            configuration.setProperty(
                PROPERTY_SORT_COLUMN, mTableModel.getColumnTitleNoAlias(mActiveSortColumn));
        } else {
          StringBuilder sb = new StringBuilder((String) mListModel.elementAt(0));
          for (int i = 1; i < mListModel.getSize(); i++)
            sb.append('\t').append((String) mListModel.elementAt(i));
          configuration.setProperty(PROPERTY_LIST, sb.toString());
        }
      } else {
        if (mRadioButtonSort.isSelected()) {
          configuration.setProperty(
              PROPERTY_SORT_IS_ASCENDING,
              mComboBoxSortOrder.getSelectedIndex() == 0 ? "true" : "false");
          configuration.setProperty(
              PROPERTY_SORT_MODE, SORT_MODE_CODE[mComboBoxSortMode.getSelectedIndex()]);
          if (mComboBoxSortMode.getSelectedIndex() != cSortModeSize)
            configuration.setProperty(
                PROPERTY_SORT_COLUMN, (String) mComboBoxSortColumn.getSelectedItem());
        } else {
          if (mRadioButtonIsStructure.isSelected()) {
            CompoundCollectionModel<String> model = mStructurePane.getModel();
            if (model.getSize() != 0) {
              StringBuilder sb = new StringBuilder();
              for (int i = 0; i < model.getSize(); i++) {
                sb.append(model.getCompound(i));
                sb.append('\t');
              }
              configuration.put(PROPERTY_LIST, sb.toString());
            }
          } else {
            configuration.put(PROPERTY_LIST, mTextArea.getText().replace('\n', '\t'));
          }
        }
      }
    }
    return configuration;
  }
  private int findNext(int pos, String txt, String value) {
    int ix = forwardButton.isSelected() ? txt.indexOf(value, pos) : txt.lastIndexOf(value, pos);

    if (selectedLinesButton.isSelected()
        && (ix < target.getSelectionStart() || ix > target.getSelectionEnd())) {
      ix = -1;
    }

    if (wholeWordCheck.isSelected()) {
      while (ix != -1
          && ((ix > 0 && Character.isLetterOrDigit(txt.charAt(ix - 1)))
              || (ix < txt.length() - value.length() - 1
                  && Character.isLetterOrDigit(txt.charAt(ix + value.length()))))) {
        ix = forwardButton.isSelected() ? ++ix : --ix;
        ix = forwardButton.isSelected() ? txt.indexOf(value, ix) : txt.lastIndexOf(value, ix);
      }
    }

    if (ix == -1 && wrapCheck.isSelected()) {
      if (forwardButton.isSelected() && pos > 0) {
        return findNext(0, txt, value);
      } else if (backwardButton.isSelected() && pos < txt.length() - 1) {
        return findNext(txt.length() - 1, txt, value);
      }
    }

    return ix;
  }
Example #14
0
  /** Store changes to table preferences. This method is called when the user clicks Ok. */
  @Override
  public void storeSettings() {

    prefs.putBoolean(JabRefPreferences.NAMES_AS_IS, namesAsIs.isSelected());
    prefs.putBoolean(JabRefPreferences.NAMES_FIRST_LAST, namesFf.isSelected());
    prefs.putBoolean(JabRefPreferences.NAMES_NATBIB, namesNatbib.isSelected());
    prefs.putBoolean(JabRefPreferences.NAMES_LAST_ONLY, lastNamesOnly.isSelected());
    prefs.putBoolean(JabRefPreferences.ABBR_AUTHOR_NAMES, abbrNames.isSelected());

    prefs.putInt(
        JabRefPreferences.AUTO_RESIZE_MODE,
        autoResizeMode.isSelected() ? JTable.AUTO_RESIZE_ALL_COLUMNS : JTable.AUTO_RESIZE_OFF);
    prefs.putBoolean(JabRefPreferences.PRIMARY_SORT_DESCENDING, priDesc.isSelected());
    prefs.putBoolean(JabRefPreferences.SECONDARY_SORT_DESCENDING, secDesc.isSelected());
    prefs.putBoolean(JabRefPreferences.TERTIARY_SORT_DESCENDING, terDesc.isSelected());
    prefs.put(JabRefPreferences.PRIMARY_SORT_FIELD, priField.getText().toLowerCase().trim());
    prefs.put(JabRefPreferences.SECONDARY_SORT_FIELD, secField.getText().toLowerCase().trim());
    prefs.put(JabRefPreferences.TERTIARY_SORT_FIELD, terField.getText().toLowerCase().trim());

    prefs.putBoolean(JabRefPreferences.FLOAT_MARKED_ENTRIES, floatMarked.isSelected());
    // updatefont

    String oldVal = prefs.get(JabRefPreferences.NUMERIC_FIELDS);
    String newVal = numericFields.getText().trim();
    if (newVal.isEmpty()) {
      newVal = null;
    }
    if (newVal != null && oldVal == null
        || newVal == null && oldVal != null
        || newVal != null && !newVal.equals(oldVal)) {
      prefs.put(JabRefPreferences.NUMERIC_FIELDS, newVal);
      BibtexFields.setNumericFieldsFromPrefs();
    }
  }
  @Override
  public void actionPerformed(ActionEvent arg0) {
    // Pre-creation sanity
    if (gridPanel != null) {
      // Variable declaration
      String name, phone;
      // Make sure the fields have values
      if ((name = nameField.getText()) == "") {
        // Tell the user if not
        JOptionPane.showMessageDialog(null, "Please enter the client's name");
        return;
      }

      if ((phone = phoneField.getText()) == "") {
        JOptionPane.showMessageDialog(null, "Please enter the client's phone number");
        return;
      }

      if (hiddenRadio.isSelected()) {
        JOptionPane.showMessageDialog(null, "Please select the client's smoking preference");
        return;
      }

      // Calculate the party size
      int partySize = partyBox.getSelectedIndex() + 8;

      // Place the reservation
      bookRoom(name, phone, smokingRadio.isSelected(), partySize);
    } else {
      System.out.println("Grid panel is null");
    }
  }
 @Override
 public void actionPerformed(ActionEvent e) {
   texto2 = "Hay espacios en blanco";
   if ((car.getText().length() == 0)
       || (nom.getText().length() == 0)
       || (cre.getText().length() == 0)
       || (!(nacional.isSelected()) && !(extranjero.isSelected()))) {
     JOptionPane.showMessageDialog(this, texto2, "Error", JOptionPane.ERROR_MESSAGE);
   } else {
     this.calcularPago();
     texto =
         "Carnet: "
             + car.getText()
             + "\n"
             + "Nombre: "
             + nom.getText()
             + "\n"
             + "Creditos: "
             + cre.getText()
             + "\n"
             + "Año de ingreso: "
             + n.getSelectedItem()
             + "\n"
             + "Nacionalidad: "
             + this.nacionalidad()
             + "\n"
             + "Total a pagar: "
             + pag.getText();
     JOptionPane.showMessageDialog(null, texto, "Información", JOptionPane.INFORMATION_MESSAGE);
   }
 }
  public void commitValues(final ElementStyleSheet styleSheet) {
    if (centerAlignButton.isSelected()) {
      styleSheet.setStyleProperty(ElementStyleKeys.ALIGNMENT, ElementAlignment.CENTER);
    } else if (rightAlignButton.isSelected()) {
      styleSheet.setStyleProperty(ElementStyleKeys.ALIGNMENT, ElementAlignment.RIGHT);
    } else {
      styleSheet.setStyleProperty(ElementStyleKeys.ALIGNMENT, ElementAlignment.LEFT);
    }

    if (middleAlignButton.isSelected()) {
      styleSheet.setStyleProperty(ElementStyleKeys.VALIGNMENT, ElementAlignment.MIDDLE);
    } else if (bottomAlignButton.isSelected()) {
      styleSheet.setStyleProperty(ElementStyleKeys.VALIGNMENT, ElementAlignment.BOTTOM);
    } else {
      styleSheet.setStyleProperty(ElementStyleKeys.VALIGNMENT, ElementAlignment.TOP);
    }

    styleSheet.setStyleProperty(
        TextStyleKeys.VERTICAL_TEXT_ALIGNMENT, textAlignModel.getSelectedKey());
    styleSheet.setStyleProperty(
        TextStyleKeys.LINEHEIGHT, BorderPropertiesPane.parseLength(lineHeightField.getText()));
    if (wrapTextCheckbox.isSelected()) {
      styleSheet.setStyleProperty(TextStyleKeys.TEXT_WRAP, TextWrap.WRAP);
    } else {
      styleSheet.setStyleProperty(TextStyleKeys.TEXT_WRAP, TextWrap.NONE);
    }

    styleSheet.setStyleProperty(
        TextStyleKeys.WHITE_SPACE_COLLAPSE, whitespaceModel.getSelectedKey());
  }
Example #18
0
  private void onOK() {
    if (!isValidInput()) {
      return;
    }
    dispose();
    String firstName = firstNameField.getText().trim();
    String lastName = lastNameField.getText().trim();
    String emailAddress = emailAddressField.getText().trim();
    SexOfPerson sexOfPerson;
    if (femaleRadioButton.isSelected()) {
      sexOfPerson = SexOfPerson.FEMALE;
    } else {
      sexOfPerson = SexOfPerson.MALE;
    }
    String country = (String) countryComboBox.getSelectedObject();
    Integer birthdayYear = (Integer) birthdayYearComboBox.getSelectedItem();
    Month birthdayMonth = (Month) birthdayMonthComboBox.getSelectedItem();
    Integer birthdayDay = (Integer) birthdayDayComboBox.getSelectedItem();
    char[] passwordArr = passwordField.getPassword();
    String password = new String(passwordArr);
    Arrays.fill(passwordArr, (char) 0);
    Image profilePicture = null;
    if (imageFromFileRadioButton.isSelected()) {
      if (fileSelector.getFilePath() != null) {
        profilePicture = new FileImage(fileSelector.getFilePath());
      }
    }
    Request request =
        new CreateUserRequest(
            communicator.getHttpClient(),
            frame,
            firstName,
            lastName,
            emailAddress,
            sexOfPerson,
            country,
            birthdayYear,
            birthdayMonth,
            birthdayDay,
            password,
            profilePicture) {

          @Override
          protected void onCreateUser(String status, Person person) {
            if (status.equals("INVALID_PROFILE_PICTURE")) {
              communicator.promptForCreateAccount("Invalid profile picture");
            } else if (status.equals("ERROR_CREATING_USER")) {
              communicator.promptForCreateAccount("Error creating user");
            } else if (status.equals("CONNECTION_ERROR")) {
              communicator.promptForCreateAccount("Error connecting to Modeling Commons");
            } else if (status.equals("SUCCESS")) {
              communicator.setPerson(person);
              communicator.promptForUpload();
            } else {
              communicator.promptForCreateAccount("Unknown server error");
            }
          }
        };
    request.execute();
  }
  @Override
  public void actionPerformed(ActionEvent e) {
    if (e.getSource() == reset) {
      fn.setText(null);
      vn.setText(null);
      m.setSelected(false);
      w.setSelected(false);
    }
    if (e.getSource() == ok) {
      String s = fn.getText();
      System.out.println(s);
      String s1 = vn.getText();
      System.out.println(s1);
    }

    if (m.isSelected()) {
      System.out.println("männlich");
      System.out.println(" ");
    } else {
      if (w.isSelected()) {
        System.out.println("weiblich");
        System.out.println(" ");
      }
      if (e.getSource() == exit) {
        System.exit(0);
      }
      repaint();
    }
  }
 public String getValue() {
   return (enable.isSelected() ? "1" : "0")
       + ","
       + (radioCut.isSelected() ? OPTION_CUT : OPTION_LEAVE)
       + ","
       + (radioCut.isSelected() ? cutNumber.getValue() : leaveNumber.getValue());
 }
Example #21
0
 private String getDelimiter() {
   if (commaRadio.isSelected()) return ",";
   else if (semicolonRadio.isSelected()) return ";";
   else if (tabRadio.isSelected()) return "\t";
   else if (spaceRadio.isSelected()) return " ";
   else if (barRadio.isSelected()) return "|";
   else return ",";
 }
  private void updateEnabledState() {
    myLabelEditor.setEnabled(myRbExpressionLabel.isSelected());

    final boolean isChildrenExpression = myRbExpressionChildrenRenderer.isSelected();
    myChildrenExpandedEditor.setEnabled(isChildrenExpression);
    myExpandedLabel.setEnabled(isChildrenExpression);
    myChildrenEditor.setEnabled(isChildrenExpression);
    myChildrenListEditor.setEnabled(myRbListChildrenRenderer.isSelected());
  }
 private CompilerKind getSelectedCompilerKind() {
   if (fcshRadioButton.isSelected()) {
     return CompilerKind.FCSH;
   } else if (mxmlcRadioButton.isSelected()) {
     return CompilerKind.MXMCL_COMPC;
   } else {
     return CompilerKind.FALCON;
   }
 }
 /** @return the provider type */
 private PasswordSafeSettings.ProviderType getProviderType() {
   if (myDoNotRememberPasswordsRadioButton.isSelected()) {
     return PasswordSafeSettings.ProviderType.DO_NOT_STORE;
   }
   if (myRememberPasswordsUntilClosingRadioButton.isSelected()) {
     return PasswordSafeSettings.ProviderType.MEMORY_ONLY;
   }
   return PasswordSafeSettings.ProviderType.MASTER_PASSWORD;
 }
 private int getTracingLevel() {
   return myTraceTypes.isSelected()
       ? GenerationOptions.TRACE_TYPES
       : myTraceLanguages.isSelected()
           ? GenerationOptions.TRACE_LANGS
           : myTraceSteps.isSelected()
               ? GenerationOptions.TRACE_STEPS
               : GenerationOptions.TRACE_OFF;
 }
Example #26
0
 private void setShape() {
   if (jRadioButtonRectangle.isSelected()) {
     shape = "Rectangle";
   } else if (jRadioButtonCircle.isSelected()) {
     shape = "Circle";
   } else {
     shape = "Rectangle";
   }
 }
  /**
   * Retorna o texto do botão de rádio que está selecionado
   *
   * @return <code>String</code> com o texto do botão de rádio que está selecionado
   */
  private String obterRadioBtnSelecionado() {
    String radioBtnTxt;

    if (rdbtnAdministrador.isSelected()) radioBtnTxt = rdbtnAdministrador.getText();
    else if (rdbtnCaixa.isSelected()) radioBtnTxt = rdbtnCaixa.getText();
    else radioBtnTxt = rdbtnGerente.getText();

    return radioBtnTxt;
  }
Example #28
0
 /** Change the polling mode */
 void checkMode() {
   if (bscMode.isSelected()) {
     Engine.instance().setBscPollMode();
   } else if (throttleMode.isSelected()) {
     Engine.instance().setThrottlePollMode();
   } else {
     Engine.instance().setDirectPollMode();
   }
 }
 private void updateControlsEnabled() {
   myClassPackageChooser.setEnabled(myToPackageRadioButton.isSelected());
   myInnerClassChooser.setEnabled(myMakeInnerClassOfRadioButton.isSelected());
   UIUtil.setEnabled(
       myTargetPanel,
       isMoveToPackage() && getSourceRoots().length > 1 && !myTargetDirectoryFixed,
       true);
   validateButtons();
 }
Example #30
0
  @Override
  public void storeSettings() {
    prefs.putBoolean(
        JabRefPreferences.EXPORT_IN_ORIGINAL_ORDER, exportInOriginalOrder.isSelected());
    prefs.putBoolean(
        JabRefPreferences.EXPORT_IN_SPECIFIED_ORDER, exportInSpecifiedOrder.isSelected());

    exportOrderPanel.getSaveOrderConfig().storeAsExportSaveOrderInPreferences(prefs);
  }