|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bigzip.plugin.support.ui.StatusBarHelper
StatusBarHelper gives control over the status bar located on bottom of the GUI. It allows for changing modes and information within the status bar.
Further,access is given to the right hand side corner so that a JComponent object may be placed into it. This typically is a button so that an actionListener may be attached to it ad allow for aborting and so on.
When BiGZiP is first executed, the status bar enters into the information mode by default, the developer has no access to this mode. Once an acrchive is successfuly opened, the status bar the upgrades to Table Mode and once again the developer does not have access to this either. The table mode has the ArchiveProperties action tied to it so that by clicking on the component in the right hand corner fires the "Properties" menu item.
Once the Open or New action has been instantiated, the developer has the ability to change the status bar mode to either "Information Mode" or "Progress Mode" and naturally, return to the default mode, being "Table Mode".
As a different mode is called, the previous mode is pushed onto a stack. Once the current mode is exited, the previous mode is popped off the stack and restored.
Constructor Summary | |
StatusBarHelper()
|
Method Summary | |
static javax.swing.JButton |
createDefaultAbortButton()
Creates a default button with an abort image and tool tip that can be placed into the status bar. |
static javax.swing.JButton |
createDefaultInfoButton()
Creates a default button with an information image and tool tip that can be placed into the status bar. |
static void |
enterInformationMode(java.lang.String text)
Replaces the current mode with an Information Style status bar. |
static void |
enterInformationMode(java.lang.String text,
javax.swing.JComponent component)
Replaces the current mode with an Information Style status bar. |
static void |
enterProgressMode()
Replaces the current mode with a Progress Style status bar. |
static void |
enterProgressMode(float maxProgressValue)
Replaces the current mode with a Progress Style status bar. |
static void |
enterProgressMode(float maxProgressValue,
javax.swing.JComponent component)
Replaces the current mode with a Progress Style status bar. |
static void |
enterProgressMode(int maxProgressValue)
Replaces the current mode with a Progress Style status bar. |
static void |
enterProgressMode(int maxProgressValue,
javax.swing.JComponent component)
Replaces the current mode with a Progress Style status bar. |
static void |
exitMode()
Ends the current status mode session and restores the previous session. |
static void |
incrementProgressIndicatorValue()
Increments the progress bar by 1. |
static void |
incrementProgressIndicatorValue(int offset)
Increments the progress bar by a specified value. |
static void |
ReturnToTableMode()
Ends all sessions stored in the buffer and returns to the original mode, which is the Table Mode. |
static void |
setFrame(com.bigzip.ui.BiGZiPFrame frame)
Used by BiGZiP's GUI subsystem. |
static void |
setInformationText(java.lang.String text)
Sets the text with in the Information status bar. |
static void |
setProgressIndicatorLargeLimit(float limit)
Sets the maximum value of the progress bar. |
static void |
setProgressIndicatorLargeValue(float value)
Sets the current value of the progress bar. |
static void |
setProgressIndicatorText(java.lang.String text)
Sets the text within the actual prograss bar component. |
static void |
setProgressIndicatorValue(int value)
Sets the progress bar to the specified value. |
static void |
setProgressText(java.lang.String text)
Sets the text field on the left side of the status bar to the specified text. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StatusBarHelper()
Method Detail |
public static void enterInformationMode(java.lang.String text)
text
- the string to occupy the text field.public static void enterInformationMode(java.lang.String text, javax.swing.JComponent component)
Note that the current mode will be stored in a session buffer before the new mode is entered.
text
- the string to occupy the text field in the status bar.component
- the Swing Component to occupy the right hand corner.public static void setInformationText(java.lang.String text)
This will only work when the status bar has entered into the Information Mode.
text
- the string to occupy the text field.public static void enterProgressMode()
This method assume the maximum limit of the bar is 100.
Note that the current mode will be stored in a session buffer before the new mode is entered.
public static void enterProgressMode(int maxProgressValue)
Note that the current mode will be stored in a session buffer before the new mode is entered.
maxProgressValue
- the maximum limit of the progress bar.public static void enterProgressMode(int maxProgressValue, javax.swing.JComponent component)
Note that the current mode will be stored in a session buffer before the new mode is entered.
maxProgressValue
- the maximum limit of the progress bar.component
- the Swing Component to occupy the right hand corner.public static void enterProgressMode(float maxProgressValue)
Note that the current mode will be stored in a session buffer before the new mode is entered.
maxProgressValue
- the maximum limit of the progress bar.
this is to allow for either decimals or values large than
the capacity of an int.public static void enterProgressMode(float maxProgressValue, javax.swing.JComponent component)
Note that the current mode will be stored in a session buffer before the new mode is entered.
maxProgressValue
- the maximum limit of the progress bar.
this is to allow for either decimals or values large than
the capacity of an int.component
- the Swing Component to occupy the right hand corner.public static void setProgressIndicatorText(java.lang.String text)
This will only work when the status bar has entered into the Progress Mode.
text
- the string to occupy the progress bar in the status bar.public static void incrementProgressIndicatorValue()
This will only work when the status bar has entered into the Progress Mode.
public static void incrementProgressIndicatorValue(int offset)
This will only work when the status bar has entered into the Progress Mode.
offset
- the value to increment current vlaue by.public static void setProgressIndicatorValue(int value)
This will only work when the status bar has entered into the Progress Mode.
value
- the value to set the progress bar to.public static void setProgressIndicatorLargeLimit(float limit)
This will only work when the status bar has entered into the Progress Mode.
limit
- the maximum value of the progress.public static void setProgressIndicatorLargeValue(float value)
This will only work when the status bar has entered into the Progress Mode.
value
- the value to set the progress bar to.public static void setProgressText(java.lang.String text)
This will only work when the status bar has entered into the Progress Mode.
text
- the string to occupy the text field.public static void exitMode()
public static void ReturnToTableMode()
public static void setFrame(com.bigzip.ui.BiGZiPFrame frame)
frame
- parent frame.public static javax.swing.JButton createDefaultAbortButton()
public static javax.swing.JButton createDefaultInfoButton()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |