From a8222b9d16145d8b2f8803d13e5afe2b99d47fc0 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 18:57:07 +0000 Subject: Configuration and Main Bar Buttons git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@53 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../at/asit/pdfover/gui/MainWindowBehavior.java | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java index 1d0094c9..a2f53e63 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java @@ -24,8 +24,19 @@ import at.asit.pdfover.gui.MainWindow.Buttons; * Behavior manipulation for Main Window */ public class MainWindowBehavior { + /** + * Enabled buttons map + */ protected Map buttonsEnabled; + + /** + * active buttons map + */ protected Map buttonsActive; + + /** + * Main bar visible + */ protected boolean mainBarVisible; /** @@ -37,18 +48,38 @@ public class MainWindowBehavior { reset(); } + /** + * set active buttons + * @param button + * @param active + */ public void setActive(Buttons button, boolean active) { this.buttonsActive.put(button, active); } + /** + * Gets the active state of a button from main bar + * @param button the button + * @return the active state + */ public boolean getActive(Buttons button) { return this.buttonsActive.get(button); } + /** + * Sets the enabled buttons in the main bar + * @param button + * @param enabled + */ public void setEnabled(Buttons button, boolean enabled) { this.buttonsEnabled.put(button, enabled); } + /** + * Get the enabled state of a button in main bar + * @param button the button + * @return the enabled state + */ public boolean getEnabled(Buttons button) { return this.buttonsEnabled.get(button); } @@ -67,10 +98,18 @@ public class MainWindowBehavior { setMainBarVisible(true); } + /** + * Sets the main bar visible + * @param visible + */ public void setMainBarVisible(boolean visible) { this.mainBarVisible = visible; } + /** + * Gets wether the main bar is visible + * @return the visibility of the main bar + */ public boolean getMainBarVisible() { return this.mainBarVisible; } -- cgit v1.2.3