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

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

public abstract class AbstractExecuteOnWorkerThreadAction
extends AbstractAction

Action that shouldn't be executed on the EDT because of long running methods.

Since:
Date: May 26, 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
AbstractExecuteOnWorkerThreadAction(GuiText text, MainController cont, WorkerThread thread, ActionProvider provider)
          Constructs the Action that shouldn't be executed on the EDT because of long running methods.
 
Method Summary
 void actionPerformed(ActionEvent e)
          
protected  com.github.croesch.micro_debug.mic1.Mic1 getProcessor()
          Returns the processor being debugged.
protected abstract  void perform(ActionEvent e)
          The actual action that'll be executed on the thread.
 
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

AbstractExecuteOnWorkerThreadAction

public AbstractExecuteOnWorkerThreadAction(GuiText text,
                                           MainController cont,
                                           WorkerThread thread,
                                           ActionProvider provider)
Constructs the Action that shouldn't be executed on the EDT because of long running methods.

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

actionPerformed

public final void actionPerformed(ActionEvent e)


perform

protected abstract void perform(ActionEvent e)
The actual action that'll be executed on the thread.

Parameters:
e - the event that caused the action to be performed
Since:
Date: May 26, 2012

getProcessor

@NotNull
protected final com.github.croesch.micro_debug.mic1.Mic1 getProcessor()
Returns the processor being debugged.

Returns:
the processor that is being debugged by this debugger.
Since:
Date: May 27, 2012


Copyright © 2012. All Rights Reserved.