summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:34:42 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:34:42 +0000
commit80be05f181f8801b0b53531ddcfc0e7814f4d05e (patch)
treee544ec0febfde2e3e155ba2c6a436e7f7d4f0717 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
parent8aca86f7eb5ff72c201f1029393292088ff5ec55 (diff)
downloadpdf-over-80be05f181f8801b0b53531ddcfc0e7814f4d05e.tar.gz
pdf-over-80be05f181f8801b0b53531ddcfc0e7814f4d05e.tar.bz2
pdf-over-80be05f181f8801b0b53531ddcfc0e7814f4d05e.zip
Grey out config button when disabled
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@391 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java29
1 files changed, 10 insertions, 19 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
index 502c8525..18cabc86 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
@@ -84,29 +84,19 @@ public class MainWindow {
* Main bar Buttons
*/
public enum Buttons {
- /**
- * the configuration button
- */
+ /** the configuration button */
CONFIG,
- /**
- * the open button
- */
+ /** the open button */
OPEN,
- /**
- * the position button
- */
+ /** the position button */
POSITION,
- /**
- * the signature button
- */
+ /** the signature button */
SIGN,
- /**
- * the final button
- */
+ /** the final button */
FINAL
}
@@ -283,7 +273,6 @@ public class MainWindow {
this.btn_config
.setToolTipText(Messages.getString("main.configuration")); //$NON-NLS-1$
this.btn_config.addMouseListener(new MouseAdapter() {
-
@Override
public void mouseUp(MouseEvent e) {
MainWindow.this.stateMachine
@@ -294,9 +283,11 @@ public class MainWindow {
this.buttonMap.put(Buttons.CONFIG, this.btn_config);
InputStream is = this.getClass().getResourceAsStream(Constants.RES_IMG_CONFIG);
-
- this.btn_config.setImage(new Image(Display.getDefault(), new ImageData(
- is)));
+ ((MainBarRectangleButton) this.btn_config).setEnabledImage(
+ new Image(Display.getDefault(), new ImageData(is)));
+ is = this.getClass().getResourceAsStream(Constants.RES_IMG_CONFIG_DISABLED);
+ ((MainBarRectangleButton) this.btn_config).setDisabledImage(
+ new Image(Display.getDefault(), new ImageData(is)));
Composite mainbarContainer = new Composite(this.mainbar, SWT.NONE);
mainbarContainer.setLayout(new FormLayout());