com.github.croesch.micro_debug.gui.actions
Class AbstractStepAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.github.croesch.micro_debug.gui.actions.AbstractExecuteOnWorkerThreadAction
          extended by com.github.croesch.micro_debug.gui.actions.AbstractStepAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
MicroStepAction, StepAction

public abstract class AbstractStepAction
extends AbstractExecuteOnWorkerThreadAction

Abstract action to let the processor perform steps.

Since:
Date: May 13, 2012
Author:
croesch
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
AbstractStepAction(GuiText txt, MainController cont, WorkerThread thread, ActionProvider provider)
          Constructs this action to let the processor perform steps.
 
Method Summary
protected abstract  void doStep()
          Perform a single step.
protected abstract  void doStep(int count)
          Perform the given number of steps.
 void perform(ActionEvent e)
          The actual action that'll be executed on the thread.
 void setTextComponent(JTextComponent comp)
          Setting the text component that contains information (the number) about how many steps should be done, when performing this action.
 
Methods inherited from class com.github.croesch.micro_debug.gui.actions.AbstractExecuteOnWorkerThreadAction
actionPerformed, getProcessor
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStepAction

public AbstractStepAction(GuiText txt,
                          MainController cont,
                          WorkerThread thread,
                          ActionProvider provider)
Constructs this action to let the processor perform steps.

Parameters:
txt - GuiText that contains the name of the action
cont - the controller of the debugger, having access to the processor and the view
thread - the thread to use for executing the action instead of the EDT.
provider - the ActionProvider holding references to all actions, especially to the AbstractExecuteOnWorkerThreadActions.
Since:
Date: May 13, 2012
Method Detail

perform

public final void perform(ActionEvent e)
Description copied from class: AbstractExecuteOnWorkerThreadAction
The actual action that'll be executed on the thread.

Specified by:
perform in class AbstractExecuteOnWorkerThreadAction
Parameters:
e - the event that caused the action to be performed

doStep

protected abstract void doStep()
Perform a single step.

Since:
Date: May 13, 2012

doStep

protected abstract void doStep(int count)
Perform the given number of steps.

Parameters:
count - the number of steps to perform.
Since:
Date: May 13, 2012

setTextComponent

public final void setTextComponent(JTextComponent comp)
Setting the text component that contains information (the number) about how many steps should be done, when performing this action. If the given text component is null, one step will be done when performing this action.

Parameters:
comp - the text component containing information about how many steps to do when this action is performed
Since:
Date: May 13, 2012


Copyright © 2012. All Rights Reserved.