From 6d81b2dfa1a2ddb9192b864cc8f4585469bddadd Mon Sep 17 00:00:00 2001 From: tkellner Date: Mon, 1 Oct 2012 08:30:40 +0000 Subject: Configuration and Main Bar Buttons git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12534 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../at/asit/pdfover/gui/MainWindowBehavior.java | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java') diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java index 1d0094c9..a2f53e63 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java +++ b/trunk/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