summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindowBehavior.java39
1 files changed, 39 insertions, 0 deletions
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<Buttons, Boolean> buttonsEnabled;
+
+ /**
+ * active buttons map
+ */
protected Map<Buttons, Boolean> 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;
}