Examples of AbstractCommand


Examples of org.springframework.richclient.command.AbstractCommand

    }

    @Override
    protected AbstractCommand createDetailCommand()
    {
        AbstractCommand detail = new ActionCommand("detailrow")
        {

            @Override
            protected void doExecuteCommand()
            {
View Full Code Here

Examples of org.springframework.richclient.command.AbstractCommand

    private void initializeSelectColumnCommands()
    {
        final WritableTableFormat writableTableFormat = (WritableTableFormat) this.tableModel
                .getTableFormat();
        AbstractCommand selectAll = new ActionCommand(SELECT_ALL_ID)
        {

            @Override
            protected void doExecuteCommand()
            {
                shownList.getReadWriteLock().writeLock().lock();
                Iterator i = shownList.iterator();
                while (i.hasNext())
                {
                    writableTableFormat.setColumnValue(i.next(), Boolean.TRUE, 0);
                }
                shownList.getReadWriteLock().writeLock().unlock();
                theTable.repaint();
                fireUserSelectionChangedEvent();
            }
        };
        this.commandConfigurer.configure(selectAll);
        AbstractCommand selectNone = new ActionCommand(SELECT_NONE_ID)
        {

            @Override
            protected void doExecuteCommand()
            {
                shownList.getReadWriteLock().writeLock().lock();
                Iterator i = shownList.iterator();
                while (i.hasNext())
                {
                    writableTableFormat.setColumnValue(i.next(), Boolean.FALSE, 0);
                }
                shownList.getReadWriteLock().writeLock().unlock();
                theTable.repaint();
                fireUserSelectionChangedEvent();
            }
        };
        this.commandConfigurer.configure(selectNone);
        AbstractCommand selectInverse = new ActionCommand(SELECT_INVERSE_ID)
        {

            @Override
            protected void doExecuteCommand()
            {
View Full Code Here

Examples of org.structr.websocket.command.AbstractCommand

      }

      // process message
      try {

        AbstractCommand abstractCommand = (AbstractCommand) type.newInstance();

        abstractCommand.setWebSocket(this);
        abstractCommand.setSession(session);
        abstractCommand.setIdProperty(idProperty);

        // The below blocks allow a websocket command to manage its own
        // transactions in case of bulk processing commands etc.

        if (abstractCommand.requiresEnclosingTransaction()) {

          try (final Tx tx = app.tx()) {

            // store authenticated-Flag in webSocketData
            // so the command can access it
            webSocketData.setSessionValid(isAuthenticated());

            abstractCommand.processMessage(webSocketData);

            // commit transaction
            tx.success();
          }

        } else {

          try (final Tx tx = app.tx()) {

            // store authenticated-Flag in webSocketData
            // so the command can access it
            webSocketData.setSessionValid(isAuthenticated());

            // commit transaction
            tx.success();
          }

          // process message without transaction context!
          abstractCommand.processMessage(webSocketData);

        }

      } catch (FrameworkException | InstantiationException | IllegalAccessException t) {
View Full Code Here

Examples of proto_commands.AbstractCommand

      for(int i = 1; i < cmdNameAndParams.length; i++){
        params.add(cmdNameAndParams[i]);
      }
     
      //get the command
      AbstractCommand command = CommandStore.getInstance().getCommand(cmdName);
      if(command == null){
        result = MessageBox.get().getMessage(Messages.CommandNotFound);
      } else {
        //execute it and get the result
        result = command.executeCommand(params);
      }
     
      //return the result
      return result;
    } catch(NullPointerException e){
View Full Code Here

Examples of proto_commands.AbstractCommand

  public AbstractCommand getCommand(String commandName){
    if(commandName.equals("") || commandName == null)
      return null;
    commandName = commandName.toLowerCase();
   
    AbstractCommand abs_cmd = tree_commands.get(commandName);   
    return abs_cmd;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.