Method invoked when OK button is clicked.
779305
def accept(self):
        """"""
        output_path = self.output_path_line_edit.text()
        if not output_path:
            display_warning_message_box(
                self,
                tr('Empty Output Path'),
                tr('Output path can not be empty'))
            return
        try:
            self.convert_metadata()
        except MetadataConversionError as e:
            display_warning_message_box(
                self,
                tr('Metadata Conversion Failed'),
                str(e))
            return

        if not os.path.exists(output_path):
            display_warning_message_box(
                self,
                tr('Metadata Conversion Failed'),
                tr('Result file is not found.'))
            return

        display_success_message_bar(
            tr('Metadata Conversion Success'),
            tr('You can find your copied layer with metadata version 3.5 in '
               '%s' % output_path),
            iface_object=self.iface
        )
        super(MetadataConverterDialog, self).accept()
1179501
def on_ok(self):
        
        def popup(thr, add_type, title):
            """
            Start the thread and display a popup of the plugin being cloned
            until the thread is finished
            """
            thr.start()
            tool_str = 'Cloning repository...'
            if add_type == 'image':
                tool_str = 'Pulling image...'
            npyscreen.notify_wait(tool_str, title=title)
            while thr.is_alive():
                time.sleep(1)
            return

        if self.image.value and self.link_name.value:
            api_action = Tools()
            api_image = Image(System().manifest)
            api_system = System()
            thr = threading.Thread(target=api_image.add, args=(),
                                   kwargs={'image': self.image.value,
                                           'link_name': self.link_name.value,
                                           'tag': self.tag.value,
                                           'registry': self.registry.value,
                                           'groups': self.groups.value})
            popup(thr, 'image', 'Please wait, adding image...')
            npyscreen.notify_confirm('Done adding image.', title='Added image')
            editor_args = {'tool_name': self.image.value,
                           'version': self.tag.value,
                           'get_configure': api_system.get_configure,
                           'save_configure': api_system.save_configure,
                           'restart_tools': api_system.restart_tools,
                           'start_tools': api_action.start,
                           'from_registry': True,
                           'just_downloaded': True,
                           'link_name': self.link_name.value,
                           'groups': self.groups.value}
            self.parentApp.addForm('CONFIGUREIMAGE', EditorForm,
                                   name='Specify vent.template settings for '
                                   'image pulled (optional)', **editor_args)
            self.parentApp.change_form('CONFIGUREIMAGE')
        elif self.image.value:
            npyscreen.notify_confirm('A name needs to be supplied for '
                                     'the image being added!',
                                     title='Specify a name for the image',
                                     form_color='CAUTION')
        elif self.repo.value:
            self.parentApp.repo_value['repo'] = self.repo.value.lower()
            api_repo = Repository(System().manifest)
            api_repo.repo = self.repo.value.lower()
            thr = threading.Thread(target=api_repo._clone, args=(),
                                   kwargs={'user': self.user.value,
                                           'pw': self.pw.value})
            popup(thr, 'repository', 'Please wait, adding repository...')
            self.parentApp.addForm('ADDOPTIONS',
                                   AddOptionsForm,
                                   name='Set options for new plugin'
                                        '\t\t\t\t\t\t^Q to quit',
                                   color='CONTROL')
            self.parentApp.change_form('ADDOPTIONS')
        else:
            npyscreen.notify_confirm('Either a repository or an image '
                                     'name must be specified!',
                                     title='Specify plugin to add',
                                     form_color='CAUTION')
        return
446522
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
        // Exit dialogue and send content to main window
        OkapiUI.dataInputField.setText(dataInputArea.getText());
        dispose();
    }
151515
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
        // TODO add your handling code here:
        OkapiUI.compositeInputField.setText(compositeText.getText());
        dispose();
    }
198535
def on_mode_button(self, my_button, state):
        """"""
        if state:
            # The new mode is the label of the button
            self.controller.set_mode(my_button.get_label())
1052191
public void actionPerformed(ActionEvent e)
    {
        if ((m_button != null) && (e.getSource() == m_button))
        {
            JCalendarPopup popup = JCalendarPopup.createCalendarPopup((Date)this.getControlValue(), m_button);
            popup.addPropertyChangeListener(this);
        }
        else if ((m_buttonTime != null) && (e.getSource() == m_buttonTime))
        {
            JTimePopup popup = JTimePopup.createTimePopup((Date)this.getControlValue(), m_buttonTime);
            popup.addPropertyChangeListener(this);
        }
    }
576151
protected void onOk() {

        final String title = m_linkTitle.getFormValueAsString();
        final String link = m_linkContent.getFormValueAsString();
        m_linkTitle.setEnabled(false);
        m_linkContent.setEnabled(false);
        m_okButton.setEnabled(false);
        if (m_isCreateNew) {
            final String fileName = m_fileName.getFormValueAsString();
            CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

                @Override
                public void execute() {

                    CmsCoreProvider.getVfsService().createNewExternalLink(
                        title,
                        link,
                        fileName,
                        m_parentFolderPath,
                        this);
                }

                @Override
                protected void onResponse(Void result) {

                    hide();
                }
            };
            action.execute();
        } else {
            CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

                @Override
                public void execute() {

                    CmsCoreProvider.getVfsService().saveExternalLink(
                        m_structureId,
                        title,
                        link,
                        CmsResource.getName(m_linkInfo.getSitePath()),
                        this);
                }

                @Override
                protected void onResponse(Void result) {

                    if (m_contextMenuHandler != null) {
                        m_contextMenuHandler.refreshResource(m_structureId);
                    }
                    hide();
                }
            };
            action.execute();
        }
    }
852268
void onButtonFired(final ActionEvent event) {

        final Optional<Button> b = getTarget(event, Button.class);

        final Optional<UniqueKey<? extends Model>> data = getUserData(b, StackWaves.PAGE_MODEL_KEY);

        if (data.isPresent()) {
            model().sendWave(StackWaves.SHOW_PAGE_MODEL,
                             WBuilder.waveData(StackWaves.PAGE_MODEL_KEY, data.get()),
                             WBuilder.waveData(StackWaves.STACK_NAME, "DemoStack"));

        }
    }
441131
def OnButtonCell(self, event):
        """"""

        # The button text
        text = event.text

        with undo.group(_("Button")):
            self.grid.actions.set_attr("button_cell", text)

        self.grid.ForceRefresh()

        self.grid.update_attribute_toolbar()

        event.Skip()
344083
function() {
      inputEx.Form.superclass.enable.call(this);
      
      for (var i = 0 ; i < this.buttons.length ; i++) {
 	      this.buttons[i].enable();
      }
   }
335195
private void onSelected(final Event event, final Suggestion<T> suggestion) {
        TypeaheadSelectedEvent.fire(this, suggestion, event);
    }
772178
public void onClick(MenuItemClickEvent event) {
		if (editController.getEditMode() == EditMode.DRAG_MODE) {
			editController.setEditMode(EditMode.INSERT_MODE);
		} else {
			editController.setEditMode(EditMode.DRAG_MODE);
		}
	}
553580
def on_click(self, event):
        
        button = event["button"]
        if button == self.button_toggle:
            self.toggled = True
            if self.mode == "ip":
                self.mode = "status"
            else:
                self.mode = "ip"
        elif button == self.button_refresh:
            self.idle_time = 0
        else:
            self.py3.prevent_refresh()
904007
public void buttonClick(View v) {
        switch (v.getId()) {
            case R.id.show:
                showAppMsg();
                break;
            case R.id.cancel_all:
                AppMsg.cancelAll(this);
                break;
            default:
                return;
        }
    }
170910
public void actionPerformed(ActionEvent ae) {

		Object source = ae.getSource();

		if (source == cancel_button)
			onCancel();
		else if (source == add_button || source == direct_text)
			onAdd();
		else if (source == remove_button)
			onRemove();
		else if (source == dismiss_button)
			onDismiss();
		else if (source == ok_button || source instanceof TextField)
			onOK();
	}
107282
def on_click(self, event):
        
        if event["button"] == self.button_toggle:
            # we only toggle if button was used
            if event.get("index") == "button" and self.py3.is_my_event(event):
                self.urgent = False
                self.open = not self.open
684065
@Override
    public void onButtonClicked(int which, DialogInterface dialogInterface) {
        switch (which){
            case Dialog.BUTTON_POSITIVE:
                if(mListener != null) mListener.onAccepted(getText());
                break;
            case Dialog.BUTTON_NEGATIVE:
                // Do nothing for the negative click
                break;
        }
    }