|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.ultraswing.StatusBar
Frame's status bar.
Usage exampe:
CFrame frame = ...; StatusBar status = new StatusBar( new JComponent[] {StatusBar.INDICATOR_STATUS, StatusBar.SEPARATOR, StatusBar.INDICATOR_DATE, StatusBar.SEPARATOR, StatusBar.INDICATOR_TIME, StatusBar.SEPARATOR, StatusBar.INDICATOR_JVM }, true); frame.addStatusBar(status);
Nested Class Summary | |
protected static class |
StatusBar.Separator
|
Field Summary | |
static JLabel |
INDICATOR_DATE
Date pane |
static JLabel |
INDICATOR_JVM
JVM pane which shows JVM memory usage and a garbage collector icon |
static JProgressBar |
INDICATOR_PROGRESS_BAR
Progress bar pane |
static JLabel |
INDICATOR_STATUS
Status pane |
static JLabel |
INDICATOR_TIME
Time pane |
static StatusBar.Separator |
SEPARATOR
Separator object |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
StatusBar()
Creates a status bar object |
|
StatusBar(JComponent[] indicators)
Creates a non-flat status bar with passed components |
|
StatusBar(JComponent[] indicators,
boolean isFlat)
Creates a status bar with passed components |
|
StatusBar(JComponent[] indicators,
boolean isFlat,
Color borderColor)
Creates a status bar with passed components |
Method Summary | |
void |
addSeparator()
Adds a separator |
int |
getHeight()
Returns the status bar's height |
Dimension |
getPreferredSize()
|
JProgressBar |
getProgressBar()
Returns the progress bar |
void |
setDateFormat(String format)
Sets date format |
void |
setHeight(int height)
Sets status bar's height |
void |
setPane(int index,
JComponent comp)
Applys passed comp at specified index |
void |
setPanes(JComponent[] indicators)
Sets each pane's component |
void |
setStatusMessage(String str)
Sets the text of status pane |
void |
setTimeFormat(String format)
Sets time format |
void |
setToolTipText(JComponent comp,
String tooltip)
Sets tooltip text for the passed comp |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final StatusBar.Separator SEPARATOR
public static final JLabel INDICATOR_STATUS
public static final JLabel INDICATOR_DATE
public static final JLabel INDICATOR_TIME
public static final JLabel INDICATOR_JVM
public static final JProgressBar INDICATOR_PROGRESS_BAR
Constructor Detail |
public StatusBar()
public StatusBar(JComponent[] indicators)
indicators
- components on status bar, one of them must be StatusBar.INDICATOR_STATUS. Separators are
not added automatically. You can use StatusBar.SEPARATOR to add separators.
Example:
StatusBar bar = new StatusBar(new JComponent[]{StatusBar.INDICATOR_STATUS, StatusBar.SEPARATOR, StatusBar.INDICATOR_TIME});
It creates a statusbar with two panes, status and time panes, and one separator between them.
public StatusBar(JComponent[] indicators, boolean isFlat)
indicators
- components on status bar, one of them must be StatusBar.INDICATOR_STATUS. Separators are
not added automatically. You can use StatusBar.SEPARATOR to add separators.
Example:
StatusBar bar = new StatusBar(new JComponent[]{StatusBar.INDICATOR_STATUS, StatusBar.SEPARATOR, StatusBar.INDICATOR_TIME});
It creates a statusbar with two panes, status and time panes, and one separator between them.
isFlat
- if true, creates a flat status barpublic StatusBar(JComponent[] indicators, boolean isFlat, Color borderColor)
isFlat
- if true, creates a flat status barborderColor
- the border color of each paneindicators
- components on status bar, one of them must be StatusBar.INDICATOR_STATUS. Separators are
not added automatically. You can use StatusBar.SEPARATOR to add separators.
Example:
StatusBar bar = new StatusBar(new JComponent[]{StatusBar.INDICATOR_STATUS, StatusBar.SEPARATOR, StatusBar.INDICATOR_TIME});
It creates a statusbar with two panes, status and time panes, and one separator between them.
Method Detail |
public void setPanes(JComponent[] indicators)
public void setToolTipText(JComponent comp, String tooltip)
comp
public void setHeight(int height)
public int getHeight()
getHeight
in class JComponent
public void addSeparator()
public void setStatusMessage(String str)
public JProgressBar getProgressBar()
public void setPane(int index, JComponent comp)
index
- component index, separator also countspublic void setDateFormat(String format)
format
- refer to the format in java.text.SimpleDateFormatpublic void setTimeFormat(String format)
format
- refer to the format in java.text.SimpleDateFormatpublic Dimension getPreferredSize()
getPreferredSize
in class JComponent
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |