diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2016-06-30 13:56:55 +0200 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2016-06-30 13:56:55 +0200 |
commit | d6aa86ff603d7acaba3137cec1484d54bae3731b (patch) | |
tree | 35580c8387c6e2f37e669c1fb78ac343bceb73a1 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java | |
parent | 2f2d383ee57fefab2f0a07d4be2169f4274b49fa (diff) | |
download | mocca-d6aa86ff603d7acaba3137cec1484d54bae3731b.tar.gz mocca-d6aa86ff603d7acaba3137cec1484d54bae3731b.tar.bz2 mocca-d6aa86ff603d7acaba3137cec1484d54bae3731b.zip |
Clicking on Open in Open state opens the file dialog
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java | 14 |
1 files changed, 10 insertions, 4 deletions
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 87792309..b77809ed 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 @@ -57,9 +57,6 @@ public class OpenState extends State { @Override public void run() { - - - Status status = getStateMachine().getStatus(); if (!(status.getPreviousState() instanceof PrepareConfigurationState) && !(status.getPreviousState() instanceof OpenState)) @@ -87,7 +84,15 @@ public class OpenState extends State { log.debug("Got Datasource: " + getStateMachine().getStatus().getDocument().getAbsolutePath()); //$NON-NLS-1$ this.setNextState(new PositioningState(getStateMachine())); } - + + /** + * Open the input document selection dialog + */ + public void openFileDialog() { + if (this.selectionComposite != null) + this.selectionComposite.openFileDialog(); + } + /* (non-Javadoc) * @see at.asit.pdfover.gui.workflow.states.State#cleanUp() */ @@ -105,6 +110,7 @@ public class OpenState extends State { MainWindowBehavior behavior = getStateMachine().getStatus().getBehavior(); behavior.reset(); behavior.setEnabled(Buttons.CONFIG, true); + behavior.setEnabled(Buttons.OPEN, true); behavior.setActive(Buttons.OPEN, true); } |