Package nz.ac.waikato.modeljunit.command

Examples of nz.ac.waikato.modeljunit.command.Command


        super("Add CalcTable");
     }
    
     public void actionPerformed(ActionEvent e)
     {
       Command command = new CreateCalcTableCommand(mStory,
                                                    new CalcTable());
       getUndoInterface().execute(command);
     }
View Full Code Here


         super("Add Suggestion");
      }
     
      public void actionPerformed(ActionEvent e)
      {
         Command command = new AddSuggestionCommand(mCalc,
                                                    mModel.getSuggestion(mRow));
         mParent.getUndoInterface().execute(command);
      }
View Full Code Here

     }
     public Object getCellEditorValue() {
        if (mPrevious.equals(mComponent.getText())) {return mPrevious;}
        // System.out.println("DEBUG: getCellEditorValue " + mComponent.getText());
        Command command;
        if (mRow == 0) {
          command = new SetColumnNameCommand(mCalc, mColumn,
                                             mComponent.getText(),
                                             mPrevious);
        } else if (mRow == 1) {
View Full Code Here

         int scol = mTable.getSelectedColumn();
         int row = srow == -1 ? mRow : srow;
         row = row == -1 ? mCalc.rows() : row;
         row--;
         row = row < 0 ? 0 : row;
         Command command = new AddRowCommand(mCalc, row);
         getUndoInterface().execute(command);
         if (srow != -1 && scol != -1) {
            mTable.changeSelection(srow + 1, scol, false, false);
         }
      }
View Full Code Here

         super.actionPerformed(e);
         int srow = mTable.getSelectedRow();
         int scol = mTable.getSelectedColumn();
         int column = scol == -1 ? mColumn : scol;
         column = column == -1 ? mCalc.columns() : column;
         Command command = new DeleteColumnCommand(mCalc, column);
         getUndoInterface().execute(command);
         if (srow != -1 && scol != -1) {
            mTable.changeSelection(srow, scol + 1, false, false);
         }
      }
View Full Code Here

         row = row == -1 ? mCalc.columns() : row;
         row--;
         row--;
         row = row < 0 ? 0 : row;
         if (row == -1) {System.out.println("can't delete header"); return;}
         Command command = new DeleteRowCommand(mCalc, row);
         getUndoInterface().execute(command);
         if (srow != -1 && scol != -1) {
            mTable.changeSelection(srow, scol, false, false);
         }
      }
View Full Code Here

         int srow = mTable.getSelectedRow();
         int scol = mTable.getSelectedColumn();
         int column = scol == -1 ? mColumn : scol;
         column = column == -1 ? mCalc.columns() : column;
         column++;
         Command command = new AddColumnCommand(mCalc, column);
         getUndoInterface().execute(command);
         if (srow != -1 && scol != -1) {
            mTable.changeSelection(srow, scol + 1, false, false);
         }
      }
View Full Code Here

TOP

Related Classes of nz.ac.waikato.modeljunit.command.Command

Copyright © 2018 www.massapicom. 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.