From e24c0e89cdd46006fc33ca565e0b3cc6639f2cb6 Mon Sep 17 00:00:00 2001 From: tkellner Date: Fri, 24 Aug 2012 17:04:52 +0000 Subject: GUIProvider doesn't hand out container composite git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12390 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../main/java/at/asit/pdfover/gui/workflow/GUIProvider.java | 6 ------ .../java/at/asit/pdfover/gui/workflow/StateMachineImpl.java | 3 +-- .../asit/pdfover/gui/workflow/states/BKUSelectionState.java | 6 +++--- .../java/at/asit/pdfover/gui/workflow/states/OpenState.java | 4 +--- .../at/asit/pdfover/gui/workflow/states/PositioningState.java | 11 +++++------ .../asit/pdfover/gui/workflow/states/PrepareSigningState.java | 6 +++--- 6 files changed, 13 insertions(+), 23 deletions(-) (limited to 'trunk') diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java index ff31ad0d..26bd3e1f 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java @@ -24,12 +24,6 @@ import at.asit.pdfover.gui.workflow.states.State; * */ public interface GUIProvider { - /** - * Get the container Composite - * @return the container Composite - */ - public Composite getComposite(); - /** * Create a new Composite * @param compositeClass The class of the Composite to create diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java index 38c3d55d..5ad800e9 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java @@ -173,9 +173,8 @@ public class StateMachineImpl implements StateMachine, GUIProvider { * * @return Composite */ - @Override public Composite getComposite() { - // Main window will be build on first call + // Main window will be built on first call // returns SWT Composite container for states to draw their GUI if (this.container == null) { diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java index fe79c460..6d4fa9fb 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java @@ -20,8 +20,8 @@ import org.eclipse.swt.SWT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.MainWindow.Buttons; +import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.composites.BKUSelectionComposite; import at.asit.pdfover.gui.workflow.ConfigProvider; import at.asit.pdfover.gui.workflow.StateMachine; @@ -69,8 +69,8 @@ public class BKUSelectionState extends State { private BKUSelectionComposite getSelectionComposite() { if (this.selectionComposite == null) { - this.selectionComposite = new BKUSelectionComposite( - this.stateMachine.getGUIProvider().getComposite(), SWT.RESIZE, this); + this.selectionComposite = + this.stateMachine.getGUIProvider().createComposite(BKUSelectionComposite.class, SWT.RESIZE, this); } return this.selectionComposite; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java index 1d2b94a8..08212c8f 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java @@ -20,8 +20,8 @@ import org.eclipse.swt.SWT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.MainWindow.Buttons; +import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.composites.DataSourceSelectComposite; import at.asit.pdfover.gui.workflow.ConfigProvider; import at.asit.pdfover.gui.workflow.StateMachine; @@ -51,8 +51,6 @@ public class OpenState extends State { if (this.selectionComposite == null) { this.selectionComposite = this.stateMachine.getGUIProvider().createComposite(DataSourceSelectComposite.class, SWT.RESIZE, this); - //this.selectionComposite = new DataSourceSelectComposite( - // this.stateMachine.getGUIProvider().getComposite(), SWT.RESIZE, this); } return this.selectionComposite; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index 2809bd25..1d98ae18 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java @@ -20,10 +20,9 @@ import org.eclipse.swt.SWT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.MainWindow.Buttons; +import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.composites.PositioningComposite; -import at.asit.pdfover.gui.workflow.ConfigProvider; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; @@ -48,10 +47,10 @@ public class PositioningState extends State { private PositioningComposite positionComposite = null; - private PositioningComposite getPositioningComosite() { + private PositioningComposite getPositioningComposite() { if (this.positionComposite == null) { - this.positionComposite = new PositioningComposite( - this.stateMachine.getGUIProvider().getComposite(), SWT.NONE, this); + this.positionComposite = + this.stateMachine.getGUIProvider().createComposite(PositioningComposite.class, SWT.RESIZE, this); } return this.positionComposite; @@ -68,7 +67,7 @@ public class PositioningState extends State { if(status.getSignaturePosition() == null) { - PositioningComposite position = this.getPositioningComosite(); + PositioningComposite position = this.getPositioningComposite(); this.stateMachine.getGUIProvider().display(position); diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java index 186bf447..db251ee6 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java @@ -20,8 +20,8 @@ import org.eclipse.swt.SWT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.MainWindow.Buttons; +import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.composites.WaitingComposite; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.states.BKUSelectionState.BKUs; @@ -104,8 +104,8 @@ public class PrepareSigningState extends State { private WaitingComposite getSelectionComposite() { if (this.waitingComposite == null) { - this.waitingComposite = new WaitingComposite( - this.stateMachine.getGUIProvider().getComposite(), SWT.RESIZE, this); + this.waitingComposite = + this.stateMachine.getGUIProvider().createComposite(WaitingComposite.class, SWT.RESIZE, this); } return this.waitingComposite; -- cgit v1.2.3