|
JComponentPack 1.5.0 | |||||||||
| 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
com.zfqjava.swing.JClock
public class JClock
JClock provides a clock component.
| Nested Class Summary | |
|---|---|
protected class |
JClock.AccessibleJClock
This class implements accessibility support for the JClock class. |
| 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 | |
|---|---|
JClock()
Constructs a JClock. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener to the JCalendar component. |
protected void |
fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JClock. |
Calendar |
getCalendar()
Returns the calendar object used by this JClock. |
ChangeListener[] |
getChangeListeners()
Returns an array of all the ChangeListeners added
to this JCalendar with addChangeListener(). |
int |
getHours()
Returns the hour represented by this JClock object. |
int |
getMinutes()
Returns the number of minutes past the hour represented by this JClock. |
int |
getSeconds()
Returns the number of seconds past the minute represented by this JClock. |
Date |
getTime()
Gets this Calendar's current time. |
ClockUI |
getUI()
Returns the look and feel (L&F) object that renders this component. |
String |
getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component. |
protected String |
paramString()
Returns a string representation of this JClock. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the JCalendar component. |
void |
setCalendar(Calendar cal)
Sets the calendar object used by this JClock. |
void |
setHours(int hours)
Sets the hour of this Date object to the specified value. |
void |
setMinutes(int minutes)
Sets the minutes of this JClock object to the specified value. |
void |
setSeconds(int seconds)
Sets the seconds of this JClock to the specified value. |
void |
setTime(Date time)
Sets this Calendar's current time with the given Date. |
void |
setUI(ClockUI ui)
Sets the look and feel (L&F) object that renders this component. |
void |
updateUI()
Resets the UI property with a value from the current look and feel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JClock()
JClock.
| Method Detail |
|---|
public void updateUI()
updateUI in class JComponentJComponent.updateUI()public ClockUI getUI()
public void setUI(ClockUI ui)
ui - the ClockUI L&F objectUIDefaults.getUI(javax.swing.JComponent)public String getUIClassID()
getUIClassID in class JComponentJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)public void setCalendar(Calendar cal)
JClock.
cal - the calendar object used by this JClockgetCalendar()public Calendar getCalendar()
JClock.
JClocksetCalendar(java.util.Calendar)public void setTime(Date time)
Note: Calling setTime() with
Date(Long.MAX_VALUE) or Date(Long.MIN_VALUE)
may yield incorrect field values from get().
time - the given Date.getTime()public Date getTime()
setTime(java.util.Date)public int getHours()
setHours(int)public void setHours(int hours)
hours - the hour value.public int getMinutes()
setMinutes(int)public void setMinutes(int minutes)
minutes - the value of the minutes.getMinutes()public int getSeconds()
setSeconds(int)public void setSeconds(int seconds)
seconds - the seconds value.getSeconds()public void addChangeListener(ChangeListener l)
JCalendar component.
Note: Fires ChangeEvent when month or year or date selection has
changed. If only interesting date changed event, attach a
PropertyChangeListener and listen date property,
about month or year you can use the same style.
l - the listener to addpublic void removeChangeListener(ChangeListener l)
JCalendar component.
Note: Fires ChangeEvent when month or year or date selection has
changed. If only interesting date changed event, attach a
PropertyChangeListener and listen date property,
about month or year you can use the same style.
l - the listener to removepublic ChangeListener[] getChangeListeners()
ChangeListeners added
to this JCalendar with addChangeListener().
Note: Fires ChangeEvent when month or year or date selection has
changed. If only interesting date changed event, attach a
PropertyChangeListener and listen date property,
about month or year you can use the same style.
ChangeListeners added or an empty
array if no listeners have been addedprotected void fireStateChanged()
EventListenerListprotected String paramString()
null.
paramString in class JComponentpublic AccessibleContext getAccessibleContext()
getAccessibleContext in interface AccessiblegetAccessibleContext in class JComponent
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||