|
JIDE 3.5.15 | ||||||||
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.jidesoft.swing.NullPanel com.jidesoft.status.StatusBarItem com.jidesoft.status.LabelStatusBarItem com.jidesoft.status.TimeStatusBarItem
public class TimeStatusBarItem
TimeStatusBarItem is used to display a clock or calendar on the status bar. You can customize the format of how to display the time and date.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
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 | |
---|---|
TimeStatusBarItem()
Construct a TimeStatusBarItem. |
Method Summary | |
---|---|
void |
addNotify()
|
protected JLabel |
createLabel()
Overrides to create a special label that doesn't invalidate() and validate() so that changing time won't cause the whole application to relayout. |
protected Thread |
createUpdateThread()
Create the clock update thread. |
protected Date |
getDisplayTime()
Gets the time to be displayed on the time status bar. |
int |
getUpdateInterval()
Gets the update interval in mini-second. |
void |
removeNotify()
|
void |
setTextFormat(DateFormat format)
Sets the DateFormat that format the text. |
void |
setTooltipFormat(DateFormat format)
Sets the DateFormat that format the tooltip. |
void |
setUpdateInterval(int interval)
Sets update interval, in mini-second. |
void |
start()
Starts the timer. |
void |
stop()
Stops the timer. |
protected void |
updateTime()
This method is called when time is updated. |
Methods inherited from class com.jidesoft.status.LabelStatusBarItem |
---|
addMouseListener, configureLabel, getComponent, getHorizontalAlignment, getIcon, getItemName, getPreferredSize, getText, getToolTipLocation, getToolTipText, setAlignment, setEnabled, setHorizontalAlignment, setIcon, setText, setToolTip, setToolTipText |
Methods inherited from class com.jidesoft.status.StatusBarItem |
---|
getPreferredWidth, setPreferredWidth, updateUI |
Methods inherited from class com.jidesoft.swing.NullPanel |
---|
setBackground, setFont, setForeground |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeStatusBarItem()
Method Detail |
---|
protected Thread createUpdateThread()
protected JLabel createLabel()
createLabel
in class LabelStatusBarItem
protected void updateTime()
protected Date getDisplayTime()
public void setUpdateInterval(int interval)
interval
- interval in mini-secondpublic int getUpdateInterval()
public void setTextFormat(DateFormat format)
format
- DateFormat. If it is null, default time format will be used.public void setTooltipFormat(DateFormat format)
format
- DateFormat. If it's null, there will be no tooltip.public void stop()
public void start()
public void addNotify()
addNotify
in class JComponent
public void removeNotify()
removeNotify
in class JComponent
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |