Exemplo n.º 1
0
 private void changeParameNote() {
   if (detailListener == null) return;
   // Wert auf leer zur�cksetzen
   if (txtParamNote.getText() != null && txtParamNote.getText().length() == 0) return;
   if (txtName.getText() != null && txtName.getText().length() == 0) {
     //			MainWindow.message(getShell(),
     // sos.scheduler.editor.app.Messages.getString("tooltip.detail.param.missing_param_name_for_note"), SWT.ICON_WARNING
     MainWindow.message(getShell(), JOE_M_0024.label(), SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
     return;
   }
   if (tableParams.getSelectionCount() == 0
       || (tableParams.getSelectionCount() > 0
           && !txtParamNote
               .getText()
               .equalsIgnoreCase(
                   detailListener.getParamNote(
                       tableParams.getSelection()[0].getText(0), comboLanguage.getText())))) {
     detailListener.setParam(
         txtName.getText(),
         txtValue.getText(),
         txtParamNote.getText(),
         paramText.getText(),
         comboLanguage.getText());
     isEditableParam = true;
     butApplyParam.setEnabled(isEditableParam);
     isEditable = true;
     butApply.setEnabled(isEditable);
     if (gui != null) gui.updateParamNote();
   }
 }
Exemplo n.º 2
0
 private void addParam() {
   if (txtName.getText().length() > 0) {
     detailListener.setParam(
         txtName.getText(),
         txtValue.getText(),
         txtParamNote.getText(),
         paramText.getText(),
         comboLanguage.getText());
     txtParamNote.setText(detailListener.getParamNote(txtName.getText(), comboLanguage.getText()));
     tableParams.removeAll();
     detailListener.fillParams(tableParams);
     butApply.setEnabled(isEditable);
     txtName.setText("");
     txtValue.setText("");
     isEditableParam = false;
     butApplyParam.setEnabled(isEditableParam);
     txtName.setFocus();
     isEditableParam = false;
     butApplyParam.setEnabled(isEditableParam);
     isEditable = true;
     butApply.setEnabled(isEditable);
     butRemove.setEnabled(false);
     txtParamNote.setText("");
     if (gui != null) gui.updateParam();
     paramText.setText("");
     txtParamNote.setEnabled(false);
   }
 }