コード例 #1
0
 /**
  * Returns the entered 2nd key.
  *
  * @return The entered 2nd key
  */
 public String getKey2() {
   if (key2InputComposite.getIsActiveInput().getContent())
     return key2InputComposite
         .getKeyInput()
         .getContent()
         .toUnformattedChars(this.getSelectedAlphabet());
   return ""; //$NON-NLS-1$
 }
コード例 #2
0
  @Override
  protected boolean mayFinish() {
    if ((encryptButton.getSelection()) || (decryptButton.getSelection())) {
      if (key1InputComposite.getKeyInput().getContent().toArray().length > 0
          && (!key2InputComposite.getIsActiveInput().getContent()
              || key2InputComposite.getKeyInput().getContent().toArray().length > 0)) {

        return true;
      }
    }
    return false;
  }