コード例 #1
0
 @Override
 protected void createKeyInputObjects() {
   // input objects were already created in the composites.
   // update them with important information now..
   key1InputComposite.setKeyInputName(Messages.TranspositionWizardPage_inputname_firstkey);
   key2InputComposite.setKeyInputName(Messages.TranspositionWizardPage_inputname_secondkey);
 }
コード例 #2
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$
 }
コード例 #3
0
 @Override
 protected void addPageObserver() {
   operationInput.addObserver(pageObserver);
   alphabetInput.addObserver(pageObserver);
   filterInput.addObserver(pageObserver);
   transformationInput.addObserver(pageObserver);
   key1InputComposite.setObserverToAllInputs(pageObserver);
   key2InputComposite.setObserverToAllInputs(pageObserver);
 }
コード例 #4
0
 @Override
 public void dispose() {
   super.dispose();
   if (key1InputComposite != null && key1InputComposite.getVerificationDisplayHandler() != null) {
     key1InputComposite.getVerificationDisplayHandler().dispose();
   }
   if (key2InputComposite != null && key2InputComposite.getVerificationDisplayHandler() != null) {
     key2InputComposite.getVerificationDisplayHandler().dispose();
   }
 }
コード例 #5
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;
  }
コード例 #6
0
  /** This method initializes keyGroup */
  protected void createKeyGroup(Composite parent) {

    keyGroup = new Group(parent, SWT.NONE);
    GridLayout keyGroupGridLayout = new GridLayout();
    keyGroupGridLayout.makeColumnsEqualWidth = true;
    keyGroupGridLayout.numColumns = 2;
    GridData keyGroupGridData = new GridData();
    keyGroupGridData.horizontalAlignment = GridData.FILL;
    keyGroupGridData.grabExcessHorizontalSpace = true;
    keyGroup.setLayoutData(keyGroupGridData);
    keyGroup.setLayout(keyGroupGridLayout);
    keyGroup.setText(Messages.TranspositionWizardPage_grouptext_keys);

    key1InputComposite = new TranspositionKeyInputComposite(keyGroup, false);
    GridData key1InputCompositeLData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
    key1InputComposite.setLayoutData(key1InputCompositeLData);
    key1InputComposite.setVerificators(getKeyVerificators());

    key1InputComposite.setTitle(Messages.TranspositionWizardPage_firstkey_grouptitle);
    key1InputComposite.setActive(true);

    key2InputComposite = new TranspositionKeyInputComposite(keyGroup, true);
    GridData key2InputCompositeLData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
    key2InputComposite.setLayoutData(key2InputCompositeLData);
    key2InputComposite.setVerificators(getKeyVerificators());

    key2InputComposite.setTitle(Messages.TranspositionWizardPage_secondkey_grouptitle);
    key2InputComposite.setActive(false);
  }
コード例 #7
0
 @Override
 protected void createAlphabetInputObjects() {
   super.createAlphabetInputObjects();
   key1InputComposite.setAlphabetInput(alphabetInput);
   key2InputComposite.setAlphabetInput(alphabetInput);
 }
コード例 #8
0
 public boolean getTransp2OutOrder() {
   return key2InputComposite.getReadOutInput().getContent();
 }
コード例 #9
0
 public boolean getTransp1InOrder() {
   return key1InputComposite.getReadInInput().getContent();
 }
コード例 #10
0
 /**
  * Returns the entered key.
  *
  * @return The entered key
  */
 public String getKey() {
   return key1InputComposite
       .getKeyInput()
       .getContent()
       .toUnformattedChars(this.getSelectedAlphabet());
 }