/** * Register and perform the command * * @param operations_manager OperationsManager where command will be reg'ed * @param item Model item to configure * @param new_index New value */ public ChangeWaveformIndexCommand( final OperationsManager operations_manager, final ModelItem item, final int new_index) { this.item = item; this.old_index = item.getWaveformIndex(); this.new_index = new_index; operations_manager.addCommand(this); redo(); }
/** * Register and perform the command * * @param model Model to configure * @param operations_manager OperationsManager where command will be reg'ed * @param new_color New value */ public ChangePlotBackgroundCommand( final Model model, final OperationsManager operations_manager, final RGB new_color) { this.model = model; this.old_color = model.getPlotBackground(); this.new_color = new_color; operations_manager.addCommand(this); redo(); }