/* (non-Javadoc)
  * @see org.eclipse.jface.dialogs.Dialog#okPressed()
  */
 protected void okPressed() {
   okPressed = true;
   if (type == TYPE_SAVE) {
     if (nameText.getText() == null || nameText.getText().trim().length() == 0) {
       messageLabel.setText(
           Messages.getString("dialogs.OrganizeTestTextDialog.messageLabel.text7")); // $NON-NLS-1$
       messageLabel.redraw();
       return;
     } else {
       this.nameToSave = nameText.getText();
     }
   } else if (type == TYPE_LOAD) {
     if (this.selectedPath != null) {
       try {
         this.selectedText = getFileContents(this.selectedPath);
       } catch (Exception e) {
         messageLabel.setText(e.getMessage());
         messageLabel.redraw();
         return;
       }
     } else if (nameList.getSelection() == null || nameList.getSelection().length == 0) {
       messageLabel.setText(
           Messages.getString("dialogs.OrganizeTestTextDialog.messageLabel.text8")); // $NON-NLS-1$
       messageLabel.redraw();
       return;
     } else {
       this.selectedText =
           QuickRExPlugin.getDefault().getTestTextByName(nameList.getSelection()[0]);
     }
   }
   this.close();
 }
 private void deletePressed() {
   if (nameList.getSelection() == null || nameList.getSelection().length == 0) {
     messageLabel.setText(
         Messages.getString("dialogs.OrganizeTestTextDialog.messageLabel.text5")); // $NON-NLS-1$
     messageLabel.redraw();
     return;
   } else {
     QuickRExPlugin.getDefault().deleteTestTextByName(nameList.getSelection()[0]);
     testTextField.setText(""); // $NON-NLS-1$
     nameList.setItems(QuickRExPlugin.getDefault().getTestTextNames());
     messageLabel.setText(
         Messages.getString("dialogs.OrganizeTestTextDialog.messageLabel.text6")); // $NON-NLS-1$
     messageLabel.redraw();
   }
 }
Example #3
0
 private void updateCurrentBand() {
   if (bandLabel != null) {
     bandLabel.setText("FM"); // $NON-NLS-1$
     bandLabel.redraw();
   }
   controller.setDisplayed(true);
 }
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.jface.viewers.StructuredViewer#internalRefresh(java.lang.Object)
  */
 protected void internalRefresh(Object element) {
   displayedItems = getSortedChildren(getRoot());
   // RAP [bm]:
   updateLabel();
   // RAPEND: [bm]
   canvas.redraw();
 }
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.jface.viewers.StructuredViewer#doUpdateItem(org.eclipse.swt.widgets.Widget,
  *      java.lang.Object, boolean)
  */
 protected void doUpdateItem(Widget item, Object element, boolean fullMap) {
   // RAP [bm]:
   // RAP [bm]:
   updateLabel();
   // RAPEND: [bm]
   canvas.redraw();
 }
 private void browsePressed() {
   nameList.deselectAll();
   FileDialog subDlg = new FileDialog(getShell(), SWT.OPEN);
   selectedPath = subDlg.open();
   if (selectedPath != null) {
     try {
       selectedText = getFileContents(this.selectedPath);
       testTextField.setText(this.selectedText.getText());
       testTextField.redraw();
     } catch (Exception e) {
       messageLabel.setText(e.getMessage());
       messageLabel.redraw();
     }
   }
 }
Example #7
0
 public static void showItem(Item item) {
   if (null != imageLabel && !imageLabel.isDisposed()) {
     fullImage = item.getImage();
     imageLabel.redraw();
   }
 }
Example #8
0
  /**
   * Sets the values for the ADFGVX matrix.
   *
   * @param cAlph The character array containing the new matrix values
   */
  public void labelsSetText(char[] cAlph) {
    int y = cAlph.length;
    int i = 0;
    if (cAlph.length != 36) {
      throw new IllegalArgumentException(
          "Alphabet is not ADFGVX-compatible (must be 36 characters)"); //$NON-NLS-1$
    }
    if (i < y) {

      rc11.setText(Character.valueOf(cAlph[i]).toString());
      rc11.redraw();
      i++;
    }
    if (i < y) {

      rc12.setText(Character.valueOf(cAlph[i]).toString());
      rc12.redraw();
      i++;
    }
    if (i < y) {

      rc13.setText(Character.valueOf(cAlph[i]).toString());
      rc13.redraw();
      i++;
    }
    if (i < y) {

      rc14.setText(Character.valueOf(cAlph[i]).toString());
      rc14.redraw();
      i++;
    }
    if (i < y) {

      rc15.setText(Character.valueOf(cAlph[i]).toString());
      rc15.redraw();
      i++;
    }
    if (i < y) {

      rc16.setText(Character.valueOf(cAlph[i]).toString());
      rc16.redraw();
      i++;
    }
    if (i < y) {

      rc21.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc22.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc23.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc24.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc25.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc26.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc31.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc32.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc33.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc34.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc35.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc36.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc41.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc42.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc43.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc44.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc45.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc46.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc51.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc52.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc53.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc54.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc55.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc56.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc61.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc62.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc63.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc64.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc65.setText(Character.valueOf(cAlph[i]).toString());
      i++;
    }
    if (i < y) {

      rc66.setText(String.valueOf(cAlph[i]));
    }
  }