Package com.storedobject.ui
Class PresentationRunner
java.lang.Object
com.storedobject.ui.PresentationRunner
- All Implemented Interfaces:
Executable
,Runnable
Presentation runner to present multiple UI logic in sequence. Each UI logic will stay for the specified time.
The logic really doesn't have to be UI logic. Instead, you could pass any
Runnable
, too.- Author:
- Syam
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor with default (10 seconds) refresh rate.PresentationRunner
(int refresh) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new UI logic to the presentation.void
Add a new UI logic to the presentation.void
Add a new UI logic to the presentation.void
execute()
The functional interface method specified by this interface.Get the currentApplication
instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.common.Executable
act, run
-
Constructor Details
-
PresentationRunner
public PresentationRunner()Constructor with default (10 seconds) refresh rate. -
PresentationRunner
public PresentationRunner(int refresh) Constructor.- Parameters:
refresh
- Data refresh rate in seconds.
-
-
Method Details
-
getApplication
Get the currentApplication
instance.- Returns:
- Current
Application
instance.
-
execute
public void execute()Description copied from interface:Executable
The functional interface method specified by this interface.- Specified by:
execute
in interfaceExecutable
-
addScreen
Add a new UI logic to the presentation.- Parameters:
uiLogic
- Class name of the UI logic to be added. (For example: "com.storedobject.ui.inventory.LocateItem"). If the logic is an instance ofHasRefresh
, its refresh() method will be invoked at the refresh rate specified. The logic could be just aRunnable
class name.time
- Time duration for which this logic should stay on the screen.
-
addScreen
Add a new UI logic to the presentation.- Parameters:
uiLogicClass
- Class of the UI logic to be added. (For example: com.storedobject.ui.inventory.LocateItem.class). If the logic is an instance ofHasRefresh
, its refresh() method will be invoked at the refresh rate specified. The logic class could be anyRunnable
class.time
- Time duration for which this logic should stay on the screen.
-
addScreen
-