コード例 #1
0
 public String getValueForVisualization() {
   if (typeSelection.getSelectedItem().equals(MappingTypes.DATA_FIELD)) {
     return fieldSelection.getSelectedItem().toString();
   } else {
     return literalEntry.getText() + " (literal)";
   }
 }
コード例 #2
0
  public void actionPerformed(ActionEvent e) {
    Object src = e.getSource();

    if (src == add) {
      // Selection has been made, or add button pressed:
      if ((sel != null) && (sel.getSelectedItem() != null)) {
        String s = sel.getSelectedItem().toString();
        addField(s);
      } else if ((input != null) && !input.getText().equals("")) {
        addField(input.getText());
      }
    } else if (src == input) {
      addField(input.getText());
    } else if (src == remove) {
      // Remove button pressed:
      removeSelected();
    } else if (src == sel) {
      if (e.getActionCommand().equals("comboBoxChanged") && (e.getModifiers() == 0))
        // These conditions signify arrow key navigation in the dropdown list, so we should
        // not react to it. I'm not sure if this is well defined enough to be guaranteed to work
        // everywhere.
        return;
      String s = sel.getSelectedItem().toString();
      addField(s);
      sel.getEditor().selectAll();
    } else if (src == up) {
      move(-1);
    } else if (src == down) {
      move(1);
    }
  }
コード例 #3
0
  /**
   * Method performed when button clicked.
   *
   * @param event event that triggers action, here clicking of the button.
   */
  public void actionPerformed(ActionEvent event) {

    if (choiceBox.getSelectedItem().equals(CUSTOM)) {
      JFileChooser chooser = new JFileChooser(System.getProperty("user.home"));
      int returnVal = chooser.showOpenDialog(settingsPanel);
      if (returnVal == JFileChooser.APPROVE_OPTION) {
        specifiedOntology = CUSTOM;
        openFile = chooser.getSelectedFile();
        choiceBox.setEditable(true);
        choiceBox.setSelectedItem(openFile.toString());
        choiceBox.setEditable(false);
        def = false;
        if (((String) choiceBox.getSelectedItem()).endsWith(".obo")) {
          settingsPanel.getNamespacePanel().choiceBox.setEnabled(true);
        } else {
          settingsPanel.getNamespacePanel().choiceBox.setEnabled(false);
        }
      }
      if (returnVal == JFileChooser.CANCEL_OPTION) {
        choiceBox.setSelectedItem(NONE);
        specifiedOntology = NONE;
        def = true;
        settingsPanel.getNamespacePanel().choiceBox.setEnabled(false);
      }
    } else if (choiceBox.getSelectedItem().equals(NONE)) {
      specifiedOntology = NONE;
      def = true;
      settingsPanel.getNamespacePanel().choiceBox.setEnabled(false);
    } else {
      specifiedOntology = (String) choiceBox.getSelectedItem();
      def = true;
      settingsPanel.getNamespacePanel().choiceBox.setEnabled(false);
    }
  }
コード例 #4
0
  private void resetFromFile(@NotNull VirtualFile file, @NotNull Project project) {
    final Module moduleForFile = ModuleUtilCore.findModuleForFile(file, project);
    if (moduleForFile == null) {
      return;
    }

    final VirtualFile parent = file.getParent();
    if (parent == null) {
      return;
    }

    if (myModule == null) {
      final Object prev = myModuleCombo.getSelectedItem();
      myModuleCombo.setSelectedItem(moduleForFile);

      if (!moduleForFile.equals(myModuleCombo.getSelectedItem())) {
        myModuleCombo.setSelectedItem(prev);
        return;
      }
    } else if (!myModule.equals(moduleForFile)) {
      return;
    }

    final JCheckBox checkBox = myCheckBoxes.get(parent.getName());
    if (checkBox == null) {
      return;
    }

    for (JCheckBox checkBox1 : myCheckBoxes.values()) {
      checkBox1.setSelected(false);
    }
    checkBox.setSelected(true);
    myFileNameCombo.getEditor().setItem(file.getName());
  }
コード例 #5
0
ファイル: TextEdit.java プロジェクト: gaurinicky/Paint
    @Override
    public void actionPerformed(ActionEvent e) {
      // TODO Auto-generated method stub

      Object source = e.getSource();
      if (source == ok) {
        response = APPLY_OPTION;
        this.setVisible(false);
      } else if (source == cancel) {
        response = CANCEL_OPTION;
        this.setVisible(false);
      } else if (source == sizeCombo) {
        // get the number from the source
        JComboBox number = (JComboBox) source;
        String numberItem = (String) number.getSelectedItem();
        Font temp = example.getFont();
        // then set the font
        int newSize = Integer.parseInt(numberItem);
        example.setFont(new Font(temp.getFamily(), temp.getStyle(), newSize));
      } else if (source == fontCombo) {
        JComboBox font = (JComboBox) source;
        String s = (String) font.getSelectedItem();
        Font tmp = example.getFont();
        example.setFont(new Font(s, tmp.getStyle(), tmp.getSize()));
      } else if (source == foreground) {
        Color tmp = JColorChooser.showDialog(this, "Choose text color", example.getForeground());
        MenuBar.shapeLBG.setBackground(tmp);
        if (tmp != null) example.setForeground(tmp);
      }
    }
 /**
  * This method sets the status of debug option based on the user input.If user checks the debug
  * check box first time then it will add a debugging end point otherwise it will prompt the user
  * for removal of associated end point for debugging if user already has some debug end point
  * associated and unchecked the debug check box.
  */
 private void debugOptionStatus() {
   if (debugCheck.isSelected()) {
     makeDebugEnable();
     try {
       waRole.setDebuggingEndpoint(dbgSelEndpoint);
       waRole.setStartSuspended(jvmCheck.isSelected());
     } catch (WindowsAzureInvalidProjectOperationException e1) {
       PluginUtil.displayErrorDialogAndLog(message("adRolErrTitle"), message("dlgDbgErr"), e1);
     }
   } else {
     if (isDebugChecked && !"".equals(comboEndPoint.getSelectedItem())) {
       String msg =
           String.format("%s%s", message("dlgDbgEdPtAscMsg"), comboEndPoint.getSelectedItem());
       int choice =
           Messages.showOkCancelDialog(
               msg, message("dlgDbgEndPtErrTtl"), Messages.getQuestionIcon());
       if (choice == Messages.OK) {
         removeDebugAssociatedEndpoint();
       } else {
         makeAllDisable();
         try {
           waRole.setDebuggingEndpoint(null);
         } catch (WindowsAzureInvalidProjectOperationException e) {
           PluginUtil.displayErrorDialogAndLog(message("adRolErrTitle"), message("dlgDbgErr"), e);
         }
       }
     } else {
       removeDebugAssociatedEndpoint();
     }
   }
 }
コード例 #7
0
ファイル: AddeChooser.java プロジェクト: suvarchal/IDV
  /**
   * return the String id of the chosen server name
   *
   * @return the server name
   */
  public String getServer() {
    Object selected = serverSelector.getSelectedItem();
    if (selected == null) {
      return null;
    }
    AddeServer server;
    if (selected instanceof AddeServer) {
      server = (AddeServer) selected;
      return server.getName();
    }
    String serverName = selected.toString();
    server = getIdv().getIdvChooserManager().addAddeServer(serverName);
    addeServers = getIdv().getIdvChooserManager().getAddeServers(getGroupType());

    Object selectedGroup = groupSelector.getSelectedItem();
    AddeServer.Group group = null;
    if (selectedGroup != null) {
      group =
          getIdv()
              .getIdvChooserManager()
              .addAddeServerGroup(server, selectedGroup.toString(), getGroupType());
    }

    boolean old = ignoreStateChangedEvents;
    ignoreStateChangedEvents = true;
    GuiUtils.setListData(serverSelector, addeServers);
    serverSelector.setSelectedItem(server);
    setGroups();
    if (group != null) {
      groupSelector.setSelectedItem(group);
    }
    ignoreStateChangedEvents = old;
    return server.getName();
  }
コード例 #8
0
  /*
   * Gets the user choice for font, style and size and redraws the text
   *     accordingly.
   */
  public void setSampleFont() {
    // Get the font name from the JComboBox
    fontName = (String) facenameCombo.getSelectedItem();

    sampleField.setText(textField.getText());

    // Get the font style from the JCheckBoxes
    fontStyle = 0;
    if (italicCheckBox.isSelected()) fontStyle += Font.ITALIC;
    if (boldCheckBox.isSelected()) fontStyle += Font.BOLD;

    // Get the font size
    fontSize = 0;

    fontSize = Integer.parseInt((String) sizeCombo.getSelectedItem());

    // THE FOLLOWING IS NO LONGER NEEDED
    //            if(smallButton.isSelected())
    //                  fontSize=SMALL;
    //            else if(mediumButton.isSelected())
    //                  fontSize=MEDIUM;
    //            else if(largeButton.isSelected())
    //                  fontSize=LARGE;

    // Set the font of the text field
    sampleField.setFont(new Font(fontName, fontStyle, fontSize));
    sampleField.setForeground(fontColor);
    sampleField.repaint();

    pack();
  } // end setSampleFont method
コード例 #9
0
 public void bind() {
   viewModel.setAddMode(addCheckBox.isSelected());
   viewModel.fromUnitText = fromUnit.getSelectedItem().toString();
   viewModel.toUnitText = toUnit.getSelectedItem().toString();
   viewModel.fromValueText = fromValue.getText();
   viewModel.toValueText = toValue.getText();
 }
コード例 #10
0
  @Override
  public void actionPerformed(ActionEvent e) {
    // TODO Auto-generated method stub
    Object source = e.getSource();

    if (source == ok) {
      userResponse = APPLY_OPTION;
      this.setVisible(false);
    } else if (source == cancel) {
      userResponse = CANCEL_OPTION;
      this.setVisible(false);
    } else if (source == fontCombo) {
      @SuppressWarnings("unchecked")
      JComboBox<String> cb = (JComboBox<String>) source;
      String s = (String) cb.getSelectedItem();
      Font tmp = example.getFont();
      example.setFont(new Font(s, tmp.getStyle(), tmp.getSize()));
    } else if (source == sizeCombo) {
      @SuppressWarnings("unchecked")
      JComboBox<String> cb = (JComboBox<String>) source;
      String s = (String) cb.getSelectedItem();
      int newSize = Integer.parseInt(s);
      Font tmp = example.getFont();
      example.setFont(new Font(tmp.getFamily(), tmp.getStyle(), newSize));
    } else if (source == foreground) {
      Color tmp = JColorChooser.showDialog(this, "Choose text color", example.getForeground());
      if (tmp != null) example.setForeground(tmp);
    }
  }
コード例 #11
0
 private SettingConfig generateSetting() {
   SettingConfig s = new SettingConfig();
   s.dir = TEXT_dir.getText();
   s.logBuffer = SizeType.get((String) SELECT_logBuffer.getSelectedItem()).getSize();
   try {
     s.delay = Integer.parseInt((String) SELECT_delay.getSelectedItem());
     if (s.delay < 100) s.delay = 100;
   } catch (Exception e) {
   }
   s.seek = CHK_seek.isSelected();
   if (s.seek) {
     try {
       s.seekType = SeekType.get((String) SELECT_seekType.getSelectedItem());
     } catch (Exception e) {
     }
     try {
       s.seekPos = Long.parseLong(TEXT_seekPos.getText());
     } catch (Exception e) {
     }
   }
   s.charset = CharsetType.get((String) SELECT_charset.getSelectedItem());
   try {
     s.overflowNum = Integer.parseInt(TEXT_limit.getText());
   } catch (Exception e) {
   }
   s.showLineNumber = CHK_showLineNumber.isSelected();
   s.softWrap = CHK_softWrap.isSelected();
   return s;
 }
コード例 #12
0
ファイル: GUI.java プロジェクト: Sieluton/el-classico
 public String[] getPuolustaja() {
   String[] pelaajat = new String[3];
   pelaajat[0] = (String) puolustaja1.getSelectedItem();
   pelaajat[1] = (String) puolustaja2.getSelectedItem();
   pelaajat[2] = (String) puolustaja3.getSelectedItem();
   return pelaajat;
 }
コード例 #13
0
 public void actionPerformed(ActionEvent e) {
   if (cyear.getSelectedItem() != null) {
     String b = cyear.getSelectedItem().toString();
     currentYear = Integer.parseInt(b);
     refreshCalendar(currentMonth, currentYear);
   }
 }
コード例 #14
0
ファイル: VizieRPanel.java プロジェクト: jankotek/asterope
  /**
   * submit
   *
   * @param a
   * @param b
   * @return boolean
   */
  public boolean submit(String a, String b) {
    int selected[];
    int i;
    StringBuffer extra = new StringBuffer();

    waitCursor();

    for (int j = 0; j < nSection; j++) {
      selected = lk[j].getSelectedIndices();
      for (i = 0; i < selected.length; i++)
        CDSMethods.append(
            extra,
            (String) vq.getNameKey().elementAt(j),
            (String) lk[j].getModel().getElementAt(selected[i]));
    }

    boolean res =
        vq.submit(
            a,
            b,
            (String) unit.getSelectedItem(),
            (String) coordinate.getSelectedItem(),
            tauthor.getText(),
            extra.toString(),
            outputMode,
            resList.getList());
    defaultCursor();
    return res;
  }
コード例 #15
0
 /**
  * Disables the debugging if debug endpoint's type is changed to 'Internal', and if private port
  * is modified then assigns the new debugging port by setting the modified endpoint as a debugging
  * endpoint.
  *
  * @param oldType : old type of the endpoint.
  * @return retVal : false if any error occurs.
  * @throws WindowsAzureInvalidProjectOperationException
  */
 private boolean handleChangeForDebugEndpt(WindowsAzureEndpointType oldType, String privatePort)
     throws WindowsAzureInvalidProjectOperationException {
   boolean retVal = true;
   if (oldType.equals(WindowsAzureEndpointType.Input)
       && comboType.getSelectedItem().equals(WindowsAzureEndpointType.Internal.toString())) {
     int choice =
         Messages.showYesNoDialog(
             String.format(
                 "%s%s%s", message("dlgEPDel"), message("dlgEPChangeType"), message("dlgEPDel2")),
             message("dlgTypeTitle"),
             Messages.getQuestionIcon());
     if (choice == Messages.YES) {
       waEndpt.setEndPointType((WindowsAzureEndpointType) comboType.getSelectedItem());
       waRole.setDebuggingEndpoint(null);
     } else {
       retVal = false;
     }
   } else if (privatePort == null) {
     PluginUtil.displayErrorDialog(message("dlgInvldPort"), message("dbgPort"));
     retVal = false;
   } else if (!waEndpt.getPrivatePort().equalsIgnoreCase(privatePort)) {
     boolean isSuspended = waRole.getStartSuspended();
     waRole.setDebuggingEndpoint(null);
     waEndpt.setPrivatePort(privatePort);
     waRole.setDebuggingEndpoint(waEndpt);
     waRole.setStartSuspended(isSuspended);
   }
   return retVal;
 }
コード例 #16
0
ファイル: Panel_Rooms.java プロジェクト: MKD225/hotellinuxdp
 @Override
 public void actionPerformed(ActionEvent e) {
   ID = (Integer) hashRoomType.get(boxRoomTypeID.getSelectedItem().toString());
   IDSTATUS = (Integer) hashRoomStatus.get(boxRoomStatusID.getSelectedItem().toString());
   if (e.getSource() == buttonInsert) {
     try {
       Rooms rooms = new Rooms(txtRoomNumber.getText(), txtDescription.getText(), ID, IDSTATUS);
       RoomsController.roomsController.save(rooms);
       int c = model.getRowCount();
       for (int i = c - 1; i >= 0; i--) {
         model.removeRow(i);
         jRoom.revalidate();
       }
       all();
       JOptionPane.showMessageDialog(this, "ok");
     } catch (Exception ex) {
       ex.printStackTrace();
     }
   }
   if (e.getSource() == buttonUpdate) {
     try {
       Rooms rooms = new Rooms(txtRoomNumber.getText(), txtDescription.getText(), ID, IDSTATUS);
       rooms.setRoomID(IDROOM);
       RoomsController.roomsController.update(rooms);
       int c = model.getRowCount();
       for (int i = c - 1; i >= 0; i--) {
         model.removeRow(i);
         jRoom.revalidate();
       }
       all();
       JOptionPane.showMessageDialog(this, "Update to succeed !");
     } catch (Exception ex) {
       ex.printStackTrace();
     }
   }
   if (e.getSource() == buttonDelete) {
     try {
       List<CheckIn> temp = CheckInController.checkInController.all();
       for (int i = 0; i < temp.size(); i++) {
         if (IDROOM == temp.get(i).getRoomID()) {
           this.error = 0;
         } else {
           this.error = 0;
           RoomsController.roomsController.delete(IDROOM);
           int c = model.getRowCount();
           for (int ii = c - 1; ii >= 0; ii--) {
             model.removeRow(ii);
             jRoom.revalidate();
           }
           all();
         }
       }
       JOptionPane.showMessageDialog(this, "Delete to succeed !");
     } catch (Exception ex) {
       JOptionPane.showMessageDialog(this, "can't delete row bcause check still !");
     }
   }
   if (e.getSource() == buttonRefresh) {}
 }
コード例 #17
0
ファイル: GUI.java プロジェクト: Sieluton/el-classico
 public String[] getKeskikentta() {
   String[] pelaajat = new String[4];
   pelaajat[0] = (String) keskikentta1.getSelectedItem();
   pelaajat[1] = (String) keskikentta2.getSelectedItem();
   pelaajat[2] = (String) keskikentta3.getSelectedItem();
   pelaajat[3] = (String) keskikentta4.getSelectedItem();
   return pelaajat;
 }
コード例 #18
0
 public Renderer renderer() {
   if (renderers.getSelectedItem().equals("Serial")) {
     return new SerialRenderer();
   } else if (renderers.getSelectedItem().equals("Parallel")) {
     return new ForkJoinRenderer();
   } else {
     throw new RuntimeException("Unknown renderer selected: " + renderers.getSelectedItem());
   }
 }
コード例 #19
0
ファイル: ReviewDialog.java プロジェクト: rokstrnisa/RokClock
 /**
  * Create a default filename given the current date selection. If custom dates are selected, use
  * those dates; otherwise, use year and week numbers.
  *
  * @return The default filename.
  */
 private String getDefaultFilename() {
   if (yearCB.getSelectedIndex() == 0 || weekCB.getSelectedIndex() == 0)
     return "timesheet-"
         + dateFormat.format(fromDate.getDate()).replaceAll("/", "")
         + "-"
         + dateFormat.format(toDate.getDate()).replaceAll("/", "")
         + ".txt";
   return "timesheet-" + yearCB.getSelectedItem() + "wk" + weekCB.getSelectedItem() + ".txt";
 }
コード例 #20
0
  protected void GetFields() {
    if (_PreviousPersonnel == null) return;

    _PreviousPersonnel.setName(_NameTextField.getText());
    _PreviousPersonnel.setCallsign(_CallsignTextField.getText());
    _PreviousPersonnel.setRank((Rank) _RankCombo.getSelectedItem());
    _PreviousPersonnel.setRating((Rating) _RatingCombo.getSelectedItem());
    _PreviousPersonnel.setNotes(_NotesTextArea.getText());
  }
コード例 #21
0
  @NotNull
  public AnalysisScope getScope(
      @NotNull AnalysisUIOptions uiOptions,
      @NotNull AnalysisScope defaultScope,
      @NotNull Project project,
      Module module) {
    AnalysisScope scope;
    if (isProjectScopeSelected()) {
      scope = new AnalysisScope(project);
      uiOptions.SCOPE_TYPE = AnalysisScope.PROJECT;
    } else {
      final SearchScope customScope = getCustomScope();
      if (customScope != null) {
        scope = new AnalysisScope(customScope, project);
        uiOptions.SCOPE_TYPE = AnalysisScope.CUSTOM;
        uiOptions.CUSTOM_SCOPE_NAME = customScope.getDisplayName();
      } else if (isModuleScopeSelected()) {
        scope = new AnalysisScope(module);
        uiOptions.SCOPE_TYPE = AnalysisScope.MODULE;
      } else if (isUncommitedFilesSelected()) {
        final ChangeListManager changeListManager = ChangeListManager.getInstance(project);
        List<VirtualFile> files;
        if (myChangeLists.getSelectedItem() == ALL) {
          files = changeListManager.getAffectedFiles();
        } else {
          files = new ArrayList<VirtualFile>();
          for (ChangeList list : changeListManager.getChangeListsCopy()) {
            if (!Comparing.strEqual(list.getName(), (String) myChangeLists.getSelectedItem()))
              continue;
            final Collection<Change> changes = list.getChanges();
            for (Change change : changes) {
              final ContentRevision afterRevision = change.getAfterRevision();
              if (afterRevision != null) {
                final VirtualFile vFile = afterRevision.getFile().getVirtualFile();
                if (vFile != null) {
                  files.add(vFile);
                }
              }
            }
          }
        }
        scope = new AnalysisScope(project, new HashSet<VirtualFile>(files));
        uiOptions.SCOPE_TYPE = AnalysisScope.UNCOMMITTED_FILES;
      } else {
        scope = defaultScope;
        uiOptions.SCOPE_TYPE = defaultScope.getScopeType(); // just not project scope
      }
    }
    uiOptions.ANALYZE_TEST_SOURCES = isInspectTestSources();
    scope.setIncludeTestSource(isInspectTestSources());
    scope.setScope(getCustomScope());

    FindSettings.getInstance().setDefaultScopeName(scope.getDisplayName());
    return scope;
  }
コード例 #22
0
 @Override
 public void actionPerformed(ActionEvent arg0) {
   if (version.getItemCount() > 0) {
     Settings.getSettings()
         .setPackVer(
             (String.valueOf(version.getSelectedItem()).equalsIgnoreCase("recommended")
                 ? "Recommended Version"
                 : String.valueOf(version.getSelectedItem())));
     Settings.getSettings().save();
   }
 }
コード例 #23
0
  /**
   * This method is used to create the ISAField for use in creating the xml when saving the mappings
   * out to file
   *
   * @return ISAField
   */
  public ISAField createISAField() {
    String mappingValue;

    if (typeSelection.getSelectedItem() == MappingTypes.DATA_FIELD) {
      mappingValue = fieldSelection.getSelectedItem().toString();
    } else {
      mappingValue = literalEntry.getText();
    }

    return new ISAField(
        MappingTypes.resolveTypeFromString(typeSelection.getSelectedItem().toString()),
        mappingValue);
  }
コード例 #24
0
 private void novaTransicao() {
   if (atual == null) {
     return; // n_o executa se o estado atual for nulo
   }
   Character c = (Character) cbAlfabeto.getSelectedItem(); // pega o simbolo a ser usado
   String estadoDestino =
       ((Estado) cbEstadosDestinos.getSelectedItem())
           .getNome(); // pega o nome do estado a ser usado
   if (a.newTransicao(atual.getNome(), c + "", estadoDestino)) { // cria a nova transi__o
     refresh();
     refreshTrans();
   }
 }
  private void onOK() {

    if (nameTextField.getText().length() < 3
        || nameTextField.getText().length() > 24
        || !nameTextField.getText().matches("[a-z0-9]+")) {
      JOptionPane.showMessageDialog(
          this,
          "Invalid storage account name. The name should be between 3 and 24 characters long and \n"
              + "can contain only lowercase letters and numbers.",
          "Error creating the storage account",
          JOptionPane.ERROR_MESSAGE);
      return;
    }

    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    createProgressBar.setVisible(true);

    try {
      String name = nameTextField.getText();
      String region =
          (regionOrAffinityGroupComboBox.getSelectedItem() instanceof Location)
              ? regionOrAffinityGroupComboBox.getSelectedItem().toString()
              : "";
      String affinityGroup =
          (regionOrAffinityGroupComboBox.getSelectedItem() instanceof AffinityGroup)
              ? regionOrAffinityGroupComboBox.getSelectedItem().toString()
              : "";
      String replication = replicationComboBox.getSelectedItem().toString();

      storageAccount =
          new StorageAccount(
              name, replication, region, affinityGroup, "", subscription.getId().toString());
      AzureSDKManagerImpl.getManager().createStorageAccount(storageAccount);
      AzureSDKManagerImpl.getManager().refreshStorageAccountInformation(storageAccount);

      onCreate.run();
    } catch (AzureCmdException e) {
      storageAccount = null;
      UIHelper.showException(
          "An error occurred while trying to create the specified storage account.",
          e,
          "Error Creating Storage Account",
          false,
          true);
    }

    setCursor(Cursor.getDefaultCursor());

    this.setVisible(false);
    dispose();
  }
コード例 #26
0
 public boolean isModified(Settings settings) {
   SettingConfig configSaved = settings.getSettingConfig();
   return (!TEXT_dir.getText().equals(configSaved.dir) && configSaved.dir != null)
       || (configSaved.dir == null && !TEXT_dir.getText().equals(""))
       || !(SizeType.get((String) SELECT_logBuffer.getSelectedItem()).getSize()
           == configSaved.logBuffer)
       || !(SELECT_delay.getSelectedItem()).equals(configSaved.delay + "")
       || !(SELECT_charset.getSelectedItem()).equals(configSaved.charset.getName() + "")
       || !(CHK_seek.isSelected() == configSaved.seek)
       || !(CHK_showLineNumber.isSelected() == configSaved.showLineNumber)
       || !(CHK_softWrap.isSelected() == configSaved.softWrap)
       || !(SELECT_seekType.getSelectedItem().equals(configSaved.seekType.name()))
       || !(TEXT_seekPos.getText().equals(configSaved.seekPos + ""))
       || !(TEXT_limit.getText().equals(configSaved.overflowNum + ""));
 }
コード例 #27
0
 /*
  * Checks if the preferences have changed from the cached preferences.
  */
 private boolean prefsChanged() {
   return (prefs.getResolution() != resolution.getSelectedItem())
       || (prefs.getFullscreen() != fullscreen.isSelected())
       || (prefs.getBitrate() != bitrate.getValue())
       || (prefs.getUseOpenGlRenderer() != openGlRenderer.isSelected())
       || (prefs.getLocalAudio() != localAudio.isSelected());
 }
コード例 #28
0
ファイル: FoodEditor.java プロジェクト: kba/neon
 protected void save() {
   data.name = nameField.getText();
   try {
     costField.commitEdit();
     data.cost = ((Long) costField.getValue()).intValue();
   } catch (ParseException e) {
     data.cost = 0;
   }
   data.color = colorBox.getSelectedItem().toString();
   data.text = charField.getText();
   data.weight = Float.parseFloat(weightField.getText());
   if (spellBox.getSelectedItem() != null) {
     data.spell = spellBox.getSelectedItem().toString();
   }
   data.setPath(Editor.getStore().getActive().get("id"));
 }
コード例 #29
0
ファイル: PersonController.java プロジェクト: marschraner/svm
 private void onAnredeSelected() {
   LOGGER.trace("PersonController Event Anrede selected=" + comboBoxAnrede.getSelectedItem());
   boolean equalFieldAndModelValue =
       equalsNullSafe(comboBoxAnrede.getSelectedItem(), personModel.getAnrede());
   try {
     setModelAnrede();
   } catch (SvmRequiredException e) {
     return;
   }
   if (equalFieldAndModelValue && isModelValidationMode()) {
     // Wenn Field und Model den gleichen Wert haben, erfolgt kein PropertyChangeEvent. Deshalb
     // muss hier die Validierung angestossen werden.
     LOGGER.trace("Validierung wegen equalFieldAndModelValue");
     validate();
   }
 }
コード例 #30
0
 public String getValueEntered() {
   if (typeSelection.getSelectedItem().equals(MappingTypes.DATA_FIELD)) {
     return "<<" + fieldSelection.getSelectedIndex() + ">>";
   } else {
     return literalEntry.getText();
   }
 }