From 52edf7dfea3015e807e72e0812d99abbb53e6f9f Mon Sep 17 00:00:00 2001 From: tkellner Date: Fri, 24 Aug 2012 17:04:50 +0000 Subject: State Machine refactoring git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12388 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../at/asit/pdfover/gui/workflow/StateMachine.java | 44 +++++++++++++++------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java') diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java index 92505d19..1298bda8 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachine.java @@ -15,7 +15,7 @@ */ package at.asit.pdfover.gui.workflow; -import org.eclipse.swt.widgets.Composite; +import at.asit.pdfover.gui.workflow.states.State; /** * @@ -28,30 +28,48 @@ public interface StateMachine { public ConfigProvider getConfigProvider(); /** - * Get the container Composite - * @return the container Composite + * Get the PDF Signer + * @return the PDF Signer */ - public Composite getComposite(); - - /** - * Create a new Composite - * @param compositeClass The class of the Composite to create - * @return the new Composite - */ - public T createComposite(Class compositeClass); - - //public void display(Composite composite) + public PDFSigner getPDFSigner(); + /** * Get the Status * @return the Status */ public Status getStatus(); + + /** + * Gets the GUI provider + * @return the GUI provider + */ + public GUIProvider getGUIProvider(); + + /** + * Jump to specific state + * + * Sets the state machine state this method should be used to let the user jump + * around between states. This Method also resets certain properties defined + * by later states then the target state. + * + * Example: Usually the MainWindow allows the user to jump to the states: + * DataSourceSelectionState, PositioningState and BKUSelectionState + * + * @param state the state to jump to + */ + public void jumpToState(State state); /** * Update state machine * Calls the next state. */ public void update(); + + /** + * Update state machine from other thread + * Calls the next state within the main thread + */ + public void InvokeUpdate(); /** * Exit state machine execution -- cgit v1.2.3