Package javatro.manager.options
Class ViewRunOption
java.lang.Object
javatro.manager.options.ViewRunOption
- All Implemented Interfaces:
Option
A command that loads the run selection screen for a specific saved run.
This command is dynamically created for each saved run and added to a command map. When executed, it transitions the application to the corresponding run's detail screen.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the command to change the screen to the run selection screen.Returns a description of this option, which includes the run number it represents.intvoidsetRunNumber(int runNumber) Sets the run number for this option.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javatro.manager.options.Option
setDescription
-
Constructor Details
-
ViewRunOption
public ViewRunOption()
-
-
Method Details
-
setRunNumber
public void setRunNumber(int runNumber) Sets the run number for this option.- Parameters:
runNumber- The run number to associate with this option.
-
getDescription
Returns a description of this option, which includes the run number it represents.- Specified by:
getDescriptionin interfaceOption- Returns:
- A string describing this option, formatted as "View Run".
-
execute
Executes the command to change the screen to the run selection screen.This method triggers the following actions:
- Sets the run number of the
UI.getRunSelectScreen()instance.
- Specified by:
executein interfaceOption- Throws:
JavatroException- if there is an error during screen transition.
- Sets the run number of the
-
getRunNumber
public int getRunNumber()
-