|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
kiwi.ui.KPanel
kiwi.ui.StatusBar
This class represents a status bar that includes a message area and an
optional progress meter (see Thermometer
). Status bars are
typically placed at the bottom of an application window. Status messages
disappear after a fixed number of seconds, unless they are specified as
non-expiring; the delay is adjustable.
Thermometer
,
Serialized FormNested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
private static javax.swing.border.Border |
border
|
private boolean |
busy
|
private java.awt.GridBagConstraints |
gbc
|
private static java.awt.Insets |
insets
|
private javax.swing.JTextField |
label
|
private boolean |
labelOnly
|
private Thermometer |
meter
|
private javax.swing.Timer |
timer
|
Fields inherited from class kiwi.ui.KPanel |
|
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
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()
Construct a new StatusBar . |
|
StatusBar(boolean showMeter)
Construct a new StatusBar . |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
This method is public as an implementation side-effect. |
void |
addStatusComponent(javax.swing.JComponent c)
Add a component to the status bar. |
boolean |
isBusy()
Determine if the meter slider is currently active. |
void |
removeStatusComponent(javax.swing.JComponent c)
Remove a component from the status bar. |
void |
setBusy(boolean flag)
Start or stop the slider. |
void |
setDelay(int seconds)
Set the delay on status bar messages. |
void |
setFont(java.awt.Font font)
Set the message font. |
void |
setMeterColor(java.awt.Color color)
Set the meter color. |
void |
setProgress(int percent)
Set a percentage on the meter. |
void |
setText(java.lang.String text)
Set the text to be displayed in the status bar. |
void |
setText(java.lang.String text,
boolean expires)
Set the text to be displayed in the status bar. |
void |
setTextColor(java.awt.Color color)
Set the text color. |
Methods inherited from class kiwi.ui.KPanel |
getComponentByName, paintComponent, setFocusOrder, setTexture |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private javax.swing.JTextField label
private Thermometer meter
private boolean labelOnly
private static final javax.swing.border.Border border
private javax.swing.Timer timer
private java.awt.GridBagConstraints gbc
private boolean busy
private static final java.awt.Insets insets
Constructor Detail |
public StatusBar()
StatusBar
. Constructs a new status bar
without a progress meter.
public StatusBar(boolean showMeter)
StatusBar
.
showMeter
- A flag specifying whether the status bar should include
a progress meter.Method Detail |
public void removeStatusComponent(javax.swing.JComponent c)
c
- The component to remove.
java.lang.IllegalArgumentException
- If an attempt was made to
remove the text status field or tje progress meter.public void addStatusComponent(javax.swing.JComponent c)
c
- The component to add.public void setBusy(boolean flag)
flag
- A flag specifying whether the slider should be started or
stopped.public boolean isBusy()
true
if the slider is active, and false
otherwise.public void setFont(java.awt.Font font)
font
- The new font.public void setTextColor(java.awt.Color color)
color
- The text new color.public void setMeterColor(java.awt.Color color)
color
- The new forground color for the thermometer.public void setProgress(int percent)
percent
value, which must
be between 0 and 100 inclusive, specifies how much of the meter should be
filled in with the foreground color.
setProgress
in interface ProgressObserver
percent
- The percentage, a value between 0 and 100 inclusive. If
the value is out of range, it is clipped.public void setText(java.lang.String text)
text
- The text to display in the status bar.public void setText(java.lang.String text, boolean expires)
text
- The text to display in the status bar.expires
- A flag specifying whether the message "expires." If
true
, the status bar will be cleared after the message has
been in the status bar for a specified number of seconds. The default
delay is 10 seconds, but can be adjusted via the setDelay()
method.setDelay(int)
public void setDelay(int seconds)
seconds
- The number of seconds before a message disappears from the
status bar.public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |