Adds an additional action to the {@code ActionListBox} that is to be displayed when the dialog is opened
@param label Label of the new action
@param action Action to perform if the user selects this item
@return Itself
342090
public ActionListDialogBuilder addAction(final String label, final Runnable action) {
        return addAction(new Runnable() {
            @Override
            public String toString() {
                return label;
            }

            @Override
            public void run() {
                action.run();
            }
        });
    }
108474
function _createAction(action) {
  if (_isString(action)) {
    action = {
      destination: action,
    }
  }
  if (_isObject(action)) {
    action = (function() {
      const openNewTab = action.openNewTab
      const destination = action.destination
      return function() {
        if (openNewTab) {
          window.open(destination, '_blank')
        } else {
          window.location.href = destination
        }
      }
    })()
  }

  return action
}
549377
def labelForAction(self, action):
        
        for label in self.actionLabels():
            if label.action() == action:
                return label
        return None
22195
public static Result onBackground(Action action) {
        final HandlerPoster poster = getBackgroundPoster();
        if (Looper.myLooper() == poster.getLooper()) {
            action.call();
            return new ActionAsyncTask(action, true);
        }
        ActionAsyncTask task = new ActionAsyncTask(action);
        poster.async(task);
        return task;
    }
440920
public function addAction(Action $action): Editbox
    {

        switch ($action->getType()) {
            case Action::SAVE:
                $this->actions[0] = $action;
                break;

            case Action::CANCEL:
                $this->actions[1] = $action;
                break;

            case Action::CONTEXT:
            default:
                if (empty($this->actions[2])) {
                    $this->actions[2] = [];
                }

                $this->actions[2][] = $action;

                break;

        }

        return $this;
    }
98259
public final synchronized void setLabel(String label) {
        if(label == null) {
            throw new IllegalArgumentException("null label to a button is not allowed");
        }
        if(label.isEmpty()) {
            label = " ";
        }
        this.label = label;
        invalidate();
    }
622279
public void addCustomTickLabel(final String TICK_LABEL) {
        if (null == TICK_LABEL) return;
        if (!customTickLabels.contains(TICK_LABEL)) customTickLabels.add(TICK_LABEL);
        fireUpdateEvent(REDRAW_EVENT);
    }
920654
@Override
	public void setLabelMessage(String labelMessage)
	{
		myUserInterfaceAction.setLabelMessage(labelMessage);
		putValue(Action.NAME, myMessageProvider.getMessage(getLabelMessage(), getLocale()));
	}
273460
public final void addButton(String label, String className, SimpleCallback callback) {
        addButton(BUTTON_PREFIX + BUTTON_INDEX++, label, className,
            callback != null ? callback : SimpleCallback.DEFAULT_SIMPLE_CALLBACK);
    }
285386
public void setAction(String action)
    {
        ExtendedInfo info = getInfo(action);
        if (info != null)
            info._action = action;
    }
689161
def addAction( self, action ):
        
        if not isinstance(action, QAction):
            action_name = nativestring(action)
            action = QAction(action_name, self)
            action.setObjectName(action_name)
        
        action.setCheckable(True)
        
        if ( not self._actionGroup ):
            self._actionGroup = QActionGroup(self)
            action.setChecked(True)
            
        self._actionGroup.addAction(action)
        self.reset()
        return action
581490
@Override
	public void setLabelDescription(String labelDescription)
	{
		myUserInterfaceAction.setLabelDescription(labelDescription);
		putValue(Action.SHORT_DESCRIPTION, myMessageProvider.getMessage(getLabelDescription(), getLocale()));
	}
551439
public function addAction($action)
    {
        if ($action instanceof Action) {
            $action = $action->getName();
        }
        $this->actionList[] = $action;
        $this->valid = null;

        return $this;
    }
615449
public static Label makeActionLabel (Label label, ClickHandler onClick)
    {
        return makeActionable(label, onClick, null);
    }
133879
public static JButton createActionButton (String label, String command)
    {
        JButton button = new JButton(label);
        configureAction(button, command);
        return button;
    }
916911
public function set_action(moodle_url $url, $label) {
        $this->actionurl    = $url;
        $this->actionlabel  = $label;
    }
1182881
@Override
    public void actionPerformed(final ActionEvent EVENT) {
        if (lcdTextX > (lcdImage.getWidth() + VALUE_BOUNDARY.getWidth())) {
            lcdTextX = -VALUE_BOUNDARY.getBounds().width;
        }
        lcdTextX += 1;
        if (EVENT.getSource().equals(LCD_BLINKING_TIMER)) {
            lcdTextVisible ^= true;
        }
        repaint(getInnerBounds());
    }