mars.venus
Class RunClearBreakpointsAction
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--mars.venus.GuiAction
|
+--mars.venus.RunClearBreakpointsAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable, javax.swing.event.TableModelListener
- public class RunClearBreakpointsAction
- extends GuiAction
- implements javax.swing.event.TableModelListener
Action class for the Run menu item to clear execution breakpoints that have been set.
It is a listener and is notified whenever a breakpoint is added or removed, thus will
set its enabled status true or false depending on whether breakpoints remain after that action.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary |
RunClearBreakpointsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create the object and register with text segment window as a listener on its table model. |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
When this option is selected, tell text segment window to clear breakpoints in its table model. |
void |
tableChanged(javax.swing.event.TableModelEvent e)
Required TableModelListener method. |
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 |
RunClearBreakpointsAction
public RunClearBreakpointsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
- Create the object and register with text segment window as a listener on its table model.
The table model has not been created yet, so text segment window will hang onto this
registration info and transfer it to the table model upon creation (which happens with
each successful assembly).
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- When this option is selected, tell text segment window to clear breakpoints in its table model.
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
- Overrides:
actionPerformed
in class GuiAction
tableChanged
public void tableChanged(javax.swing.event.TableModelEvent e)
- Required TableModelListener method. This is response upon editing of text segment table
model. The only editable column is breakpoints so this method is called only when user
adds or removes a breakpoint. Gets new breakpoint count and sets enabled status
accordingly.
- Specified by:
tableChanged
in interface javax.swing.event.TableModelListener