public final class StatusIndicator
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
StatusIndicator.Location
Where the status indicator will appear. 
 | 
static class  | 
StatusIndicator.OkPolicy
Enum of values indicating what to show when the indicator is at Status OK 
 | 
static class  | 
StatusIndicator.Status
Possible status levels that can be displayed. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
PROPERTY_STATUS
Property fired when the status changes 
 | 
static java.lang.String | 
PROPERTY_STATUS_INDICATOR
Components may store a status indicator as a client property: 
 | 
static int | 
SIZE
The size of the status indicator. 
 | 
| Constructor and Description | 
|---|
StatusIndicator()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addPropertyChangeListener(java.beans.PropertyChangeListener listener)  | 
javax.swing.JComponent | 
configureLabel(javax.swing.JLabel label,
              StatusIndicator.Location location)
Add this status indicator to the given label and return a component containing both. 
 | 
javax.swing.JComponent | 
configureStandalone(StatusIndicator.OkPolicy okPolicy)
Get a new standalone component to display status for this indicator. 
 | 
void | 
configureTab(javax.swing.JTabbedPane tabbedPane,
            int tabIndex)
Add this status indicator to the given tab index on a JTabbedPane. 
 | 
javax.swing.Icon | 
getIcon(StatusIndicator.OkPolicy okPolicy)
Return an icon representing the current status. 
 | 
StatusIndicator.Status | 
getStatus()  | 
static void | 
main(java.lang.String[] args)
Test method, do not call. 
 | 
void | 
removePropertyChangeListener(java.beans.PropertyChangeListener listener)  | 
void | 
setInfoTipContent(Template template)
Set the content for the infotip which will appear when the mouse cursor hovers over the status
 component. 
 | 
void | 
setStatus(StatusIndicator.Status status)
Set the status. 
 | 
public static final int SIZE
public static final java.lang.String PROPERTY_STATUS_INDICATOR
comp.putClientProperty(PROPERTY_STATUS_INDICATOR, statusIndicator);
and other components may read this property, e.g. a FlatTabbedPaneUI will look for status indicators in client properties of tab header components in order to display a status icon on the tab header.
public static final java.lang.String PROPERTY_STATUS
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void setStatus(StatusIndicator.Status status)
status - the current statuspublic StatusIndicator.Status getStatus()
public javax.swing.Icon getIcon(StatusIndicator.OkPolicy okPolicy)
public javax.swing.JComponent configureStandalone(StatusIndicator.OkPolicy okPolicy)
Multiple calls to the method will return a new component each call.
This method will also add a client property key: PROPERTY_STATUS_INDICATOR, value: this StatusIndicator into the returned component's client properties.
public void configureTab(javax.swing.JTabbedPane tabbedPane,
                         int tabIndex)
This works for both standard JTabbedPane and FlatTabbedPaneUI
This method will also add a client property key: PROPERTY_STATUS_INDICATOR, value: this StatusIndicator into the JTabbedPane client properties.
tabbedPane - tabIndex - public javax.swing.JComponent configureLabel(javax.swing.JLabel label,
                                             StatusIndicator.Location location)
This method will also add a client property key: PROPERTY_STATUS_INDICATOR, value: this StatusIndicator into the given JLabel adn the returned JComponent's client properties.
label - public void setInfoTipContent(Template template)
The StatusSummaryTemplate was created especially for use in a status indicator, it should be preferred over custom templates.
template - the infotip template, or null for no hover.public static void main(java.lang.String[] args)
args -