Associates a UI component with a command and action.

@param commandName Name of the command.
@param component Component to be associated.
@param action Action to be executed when the command is invoked.
334038
public static void associateCommand(String commandName, BaseUIComponent component, IAction action) {
        getCommand(commandName, true).bind(component, action);
    }
64858
def __view_add_actions(self):
        

        self.Components_Manager_Ui_treeView.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.ComponentsManagerUi|Activate Component(s)",
            slot=self.__view_activate_components_action__triggered))
        self.Components_Manager_Ui_treeView.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.ComponentsManagerUi|Deactivate Component(s)",
            slot=self.__view_deactivate_components_action__triggered))

        separator_action = QAction(self.Components_Manager_Ui_treeView)
        separator_action.setSeparator(True)
        self.Components_Manager_Ui_treeView.addAction(separator_action)

        self.Components_Manager_Ui_treeView.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.ComponentsManagerUi|Reload Component(s)",
            slot=self.__view_reload_components_action__triggered))

        separator_action = QAction(self.Components_Manager_Ui_treeView)
        separator_action.setSeparator(True)
        self.Components_Manager_Ui_treeView.addAction(separator_action)
807830
public final void usage(String commandName) {
        StringBuilder sb = new StringBuilder();
        usage(commandName, sb);
        commander.getConsole().println(sb.toString());
    }
149222
@Override
    public void addAction(final LifecycleStage stage, final LifecycleAction<T> action)
    {
        stageEvents.add(new StageEvent(stage, action));
    }
1128910
public void extendComponent( Component component ) {

		if( this.extendedComponent != null )
			this.extendedComponent.extendingComponents.remove( this );

		component.extendingComponents.add( this );
		this.extendedComponent = component;
	}
601523
@Override
    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        if (cmd.equals("Cut")) {
            consoleTextArea.cut();
        } else if (cmd.equals("Copy")) {
            consoleTextArea.copy();
        } else if (cmd.equals("Paste")) {
            consoleTextArea.paste();
        }
    }
133879
public static JButton createActionButton (String label, String command)
    {
        JButton button = new JButton(label);
        configureAction(button, command);
        return button;
    }
346077
@Action(
            semantics = SemanticsOf.IDEMPOTENT,
            command = CommandReification.ENABLED,
            commandExecuteIn = CommandExecuteIn.BACKGROUND
    )
    @ActionLayout(
            describedAs = "invoke from UI, will create a command implicitly (returned) to change the name in the background"
    )
    public SomeCommandAnnotatedObject changeNameImplicitlyInBackground(
            @ParameterLayout(named = "New name")
            final String newName) {
        setName(newName);
        return this;
    }
285386
public void setAction(String action)
    {
        ExtendedInfo info = getInfo(action);
        if (info != null)
            info._action = action;
    }
15478
public void sendComponent(Component componentRequest) throws TCAPSendException {

        if (this.previewMode)
            return;

        if (this.provider.getStack().getStatisticsEnabled()) {
            switch (componentRequest.getType()) {
                case InvokeNotLast:
                    this.provider.getStack().getCounterProviderImpl().updateInvokeNotLastSentCount(this,
                            (Invoke) componentRequest);

                    Invoke inv = (Invoke) componentRequest;
                    OperationCodeImpl oc = (OperationCodeImpl) inv.getOperationCode();
                    if (oc != null) {
                        this.provider.getStack().getCounterProviderImpl()
                                .updateOutgoingInvokesPerOperationCode(oc.getStringValue());
                    }
                    break;
                case InvokeLast:
                    this.provider.getStack().getCounterProviderImpl().updateInvokeLastSentCount(this,
                            (Invoke) componentRequest);

                    inv = (Invoke) componentRequest;
                    oc = (OperationCodeImpl) inv.getOperationCode();
                    if (oc != null) {
                        this.provider.getStack().getCounterProviderImpl()
                                .updateOutgoingInvokesPerOperationCode(oc.getStringValue());
                    }
                    break;
                case ReturnResultNotLast:
                    this.provider.getStack().getCounterProviderImpl().updateReturnResultNotLastSentCount(this);
                    break;
                case ReturnResultLast:
                    this.provider.getStack().getCounterProviderImpl().updateReturnResultLastSentCount(this);
                    break;
                case ReturnError:
                    this.provider.getStack().getCounterProviderImpl().updateReturnErrorSentCount(this);

                    ReturnError re = (ReturnError) componentRequest;
                    ErrorCodeImpl ec = (ErrorCodeImpl) re.getErrorCode();
                    if (ec != null) {
                        this.provider.getStack().getCounterProviderImpl().updateOutgoingErrorsPerErrorCode(ec.getStringValue());
                    }
                    break;
                case Reject:
                    this.provider.getStack().getCounterProviderImpl().updateRejectSentCount(this);

                    Reject rej = (Reject) componentRequest;
                    RejectProblem prob = (RejectProblem) rej.getProblem();
                    if (prob != null) {
                        this.provider.getStack().getCounterProviderImpl().updateOutgoingRejectPerProblem(prob.toString());
                    }
                    break;
            }
        }

        try {
            this.dialogLock.lock();
            if (componentRequest.getType() == ComponentType.InvokeNotLast
                    || componentRequest.getType() == ComponentType.InvokeLast) {
                InvokeImpl invoke = (InvokeImpl) componentRequest;

                // check if its taken!
                int invokeIndex = getIndexFromInvokeId(invoke.getInvokeId());
                if (this.operationsSent[invokeIndex] != null) {
                    throw new TCAPSendException("There is already operation with such invoke id!");
                }

                invoke.setState(OperationState.Pending);
                invoke.setDialog(this);

                // if the Invoke timeout value has not be reset by TCAP-User
                // for this invocation we are setting it to the the TCAP stack
                // default value
                if (invoke.getTimeout() == TCAPStackImpl._EMPTY_INVOKE_TIMEOUT)
                    invoke.setTimeout(this.provider.getStack().getInvokeTimeout());
            } else {
                if (componentRequest.getType() != ComponentType.ReturnResultNotLast) {
                    // we are sending a response and removing invokeId from
                    // incomingInvokeList
                    this.removeIncomingInvokeId(componentRequest.getCorrelationId());
                }
            }
            this.scheduledComponentList.add(componentRequest);
        } finally {
            this.dialogLock.unlock();
        }
    }
820907
private static IAction createAction(String action) {
        IAction actn = null;
        
        if (!StringUtils.isEmpty(action)) {
            if ((actn = ActionRegistry.getRegisteredAction(action)) == null) {
                actn = ActionUtil.createAction(null, action);
            }
        }
        
        return actn;
    }
100575
public void setAction(final Action action) {
		MenuItemModel model = getOrCreateComponentModel();
		model.action = action;
		model.url = null;
	}
1195339
public static void initPartialValidationAndModelUpdate(
            UIComponent component, FacesContext facesContext)
    {
        String actionFor = (String) component.getAttributes().get("actionFor");

        if (actionFor != null)
        {
            List li = convertIdsToClientIds(actionFor, facesContext, component);

            facesContext.getExternalContext().getRequestMap()
                    .put(ACTION_FOR_LIST, li);

            String actionForPhase = (String) component.getAttributes().get(
                    "actionForPhase");

            if (actionForPhase != null)
            {
                List phaseList = convertPhasesToPhasesIds(actionForPhase);

                facesContext.getExternalContext().getRequestMap()
                        .put(ACTION_FOR_PHASE_LIST, phaseList);
            }
        }
    }
228391
public void actionPerformed(java.awt.event.ActionEvent e)
    {
        System.out.println("Action Command: " + e.getActionCommand());
        System.out.println("Action Params : " + e.paramString());
        System.out.println("Action Source : " + e.getSource());
        System.out.println("Action SrcCls : " + e.getSource().getClass().getName());
        org.apache.ojb.broker.metadata.ClassDescriptor cld =
            new org.apache.ojb.broker.metadata.ClassDescriptor(rootNode.getRepository());
        // cld.setClassNameOfObject("New Class");
        cld.setTableName("New Table");
        rootNode.addClassDescriptor(cld);
    }
940852
@Override
    public Boolean executeCommand(int timeout, String componentName, Object... data) throws QTasteException {
        setData(data);
        long maxTime = System.currentTimeMillis() + 1000 * timeout;
        String buttonText = mData[0].toString();
        component = null;

        while (System.currentTimeMillis() < maxTime) {
            DialogPane targetPopup = null;
            List<Stage> popups = findPopups();
            Collections.reverse(popups);
            for (Stage popup : popups) {
                DialogPane dialogPane = getDialogPane(popup);
                if (!dialogPane.isVisible() || dialogPane.isDisabled()) {
                    String msg = "Ignore the dialog '" + popup.getTitle() + "' cause:\n ";
                    if (!dialogPane.isVisible()) {
                        msg += "\t is not visible";
                    }
                    if (dialogPane.isDisabled()) {
                        msg += "\t is disabled";
                    }
                    LOGGER.info(msg);
                    continue;
                }
                if (activateAndFocusWindow(popup)) {
                    targetPopup = dialogPane;
                    break;
                } else {
                    LOGGER.info("Ignore the dialog '" + popup.getTitle() + "' cause:\n  \t is not focused");
                }
            }

            component = findButton(targetPopup, buttonText);

            if ( component != null && !component.isDisabled() && checkComponentIsVisible(component) )
                break;

            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                LOGGER.warn("Exception during the component search sleep...");
            }
        }

        if (component == null) {
            throw new QTasteTestFailException("The button with the text \"" + buttonText + "\" is not found.");
        }
        if (component.isDisabled()) {
            throw new QTasteTestFailException("The button with the text \"" + buttonText + "\" is disabled.");
        }
        if (!checkComponentIsVisible(component)) {
            throw new QTasteTestFailException("The button with the text \"" + buttonText + "\" is not visible!");
        }

        prepareActions();
        Platform.runLater(this);
        return true;
    }
562003
@Override
    public void doAction(Action action) {
        BaseComponent parent = getParent();
        
        switch (action) {
            case REMOVE:
                ActionListener.unbindActionListeners(this, actionListeners);
                detach();
                break;
            
            case HIDE:
            case COLLAPSE:
                setVisible(false);
                break;
            
            case SHOW:
            case EXPAND:
                setVisible(true);
                break;
            
            case TOP:
                parent.addChild(this, 0);
                break;
        }
        
        if (parent != null) {
            EventUtil.post(MainController.ALERT_ACTION_EVENT, parent, action);
        }
    }
875060
function DisplayOTronCommand(component, command) {
    if (!(this instanceof DisplayOTronCommand)) {
        return new DisplayOTronCommand(component, command);
    }
    
    this.component = component;
    this.command = command;
    this.parameters = {};
}