summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:53:26 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:53:26 +0000
commit7d6879d2f2ad32b79878567438bdb231cbc798d5 (patch)
treec1a284c1549366d9ab4a424fb3528b1ef8f5b19c /pdf-over-gui/src/main/java/at
parent69f82291cd349961cca5d8a65b7f3f2f724ed74f (diff)
downloadmocca-7d6879d2f2ad32b79878567438bdb231cbc798d5.tar.gz
mocca-7d6879d2f2ad32b79878567438bdb231cbc798d5.tar.bz2
mocca-7d6879d2f2ad32b79878567438bdb231cbc798d5.zip
GUIProvider doesn't hand out container composite
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@25 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java3
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java11
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java6
6 files changed, 13 insertions, 23 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java
index ff31ad0d..26bd3e1f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/GUIProvider.java
@@ -25,12 +25,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
* @param style the SWT style
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java
index 38c3d55d..5ad800e9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java
+++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
index fe79c460..6d4fa9fb 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java
+++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
index 1d2b94a8..08212c8f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
+++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
index 2809bd25..1d98ae18 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
+++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
index 186bf447..db251ee6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
+++ b/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;