Exemplo n.º 1
0
  /** Initializes this dialog's controls. */
  private void initializeDialog() {
    selectionGroup.addSelectionChangedListener(
        new ISelectionChangedListener() {
          public void selectionChanged(SelectionChangedEvent event) {
            getButton(IDialogConstants.OK_ID)
                .setEnabled(!selectionGroup.getListTableSelection().isEmpty());
          }
        });
    selectionGroup.addDoubleClickListener(
        new IDoubleClickListener() {
          public void doubleClick(DoubleClickEvent event) {
            buttonPressed(IDialogConstants.OK_ID);
          }
        });

    getButton(IDialogConstants.OK_ID).setEnabled(false);
  }
Exemplo n.º 2
0
 protected void buttonPressed(int buttonId) {
   if (buttonId == IDialogConstants.OK_ID) {
     result = selectionGroup.getListTableSelection();
   }
   super.buttonPressed(buttonId);
 }