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 a default (10 seconds) refresh rate.PresentationRunner(int refresh) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new UI logic to the presentation.voidAdd a new UI logic to the presentation.voidAdd a new UI logic to the presentation.voidexecute()The functional interface method specified by this interface.Get the currentApplicationinstance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.common.Executable
act, run
-
Constructor Details
-
PresentationRunner
public PresentationRunner()Constructor with a default (10 seconds) refresh rate. -
PresentationRunner
public PresentationRunner(int refresh) Constructor.- Parameters:
refresh- Data refresh rate in seconds.
-
-
Method Details
-
getApplication
Get the currentApplicationinstance.- Returns:
- Current
Applicationinstance.
-
execute
public void execute()Description copied from interface:ExecutableThe functional interface method specified by this interface.- Specified by:
executein 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 aRunnableclass 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 anyRunnableclass.time- Time duration for which this logic should stay on the screen.
-
addScreen
-