|
||||||||
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
org.rapla.components.calendar.RaplaComboBox
org.rapla.components.calendar.RaplaTime
public final class RaplaTime
A ComboBox like time chooser. It is localizable and it uses swing-components.
The combobox editor is a TimeField
. If the ComboBox-Button
is pressed a TimeSelectionList will drop down.
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.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Collection |
m_listenerList
|
protected TimeField |
m_timeField
|
protected org.rapla.components.calendar.TimeList |
m_timeList
|
protected org.rapla.components.calendar.TimeModel |
m_timeModel
|
Fields inherited from class org.rapla.components.calendar.RaplaComboBox |
---|
jLabel, m_editorComponent, m_popupButton |
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 | |
---|---|
RaplaTime()
Create a new TimeBox with the default locale. |
|
RaplaTime(Locale locale)
Create a new TimeBox with the specified locale. |
|
RaplaTime(Locale locale,
boolean isDropDown)
Deprecated. replaced with #RaplaTime(Locale,TimeZone,boolean) |
|
RaplaTime(Locale locale,
TimeZone timeZone)
Create a new TimeBox with the specified locale and timeZone. |
|
RaplaTime(Locale locale,
TimeZone timeZone,
boolean isDropDown,
boolean showClock)
Create a new TimeBox with the specified locale and timeZone. |
Method Summary | |
---|---|
void |
addDateChangeListener(DateChangeListener listener)
registers new DateChangedListener for this component. |
protected Image |
createClockImage()
|
protected void |
fireTimeChanged(Date date)
|
DateChangeListener[] |
getDateChangeListeners()
|
JComponent |
getPopupComponent()
The popup-component will be created lazily. |
int |
getRowsPerHour()
|
Date |
getTime()
Parse this date with a calendar-object set to the correct time-zone to get the hour,minute and second. |
TimeZone |
getTimeZone()
|
void |
removeDateChangeListener(DateChangeListener listener)
removes a listener from this component. |
void |
setFont(Font font)
|
void |
setLocale(Locale locale)
|
void |
setRowsPerHour(int rowsPerHour)
The granularity of the selection rows: 1: 1 rows per hour = 1 Hour 2: 2 rows per hour = 1/2 Hour 2: 3 rows per hour = 20 Minutes 4: 4 rows per hour = 15 Minutes 6: 6 rows per hour = 10 Minutes 12: 12 rows per hour = 5 Minutes |
void |
setTime(Date time)
Set the time relative to the given timezone. |
void |
setTimeRenderer(TimeRenderer renderer)
|
void |
setTimeZone(TimeZone zone)
|
void |
setVisibleRowCount(int count)
the number of visble rows in the drop-down menu. |
protected void |
showPopup()
|
protected void |
validateEditor()
|
Methods inherited from class org.rapla.components.calendar.RaplaComboBox |
---|
closePopup, getLabel, setEnabled |
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 |
---|
protected TimeField m_timeField
protected org.rapla.components.calendar.TimeList m_timeList
protected org.rapla.components.calendar.TimeModel m_timeModel
protected Collection m_listenerList
Constructor Detail |
---|
public RaplaTime()
public RaplaTime(Locale locale)
public RaplaTime(Locale locale, TimeZone timeZone)
public RaplaTime(Locale locale, boolean isDropDown)
public RaplaTime(Locale locale, TimeZone timeZone, boolean isDropDown, boolean showClock)
Method Detail |
---|
protected Image createClockImage()
public void setRowsPerHour(int rowsPerHour)
public int getRowsPerHour()
setRowsPerHour(int)
protected void validateEditor()
public void setVisibleRowCount(int count)
public void setFont(Font font)
setFont
in class RaplaComboBox
public void setLocale(Locale locale)
setLocale
in class Component
public void setTimeZone(TimeZone zone)
public TimeZone getTimeZone()
public void setTime(Date time)
public Date getTime()
protected void showPopup()
showPopup
in class RaplaComboBox
public void addDateChangeListener(DateChangeListener listener)
DateChangeListener
,
DateChangeEvent
public void removeDateChangeListener(DateChangeListener listener)
public DateChangeListener[] getDateChangeListeners()
protected void fireTimeChanged(Date date)
public JComponent getPopupComponent()
getPopupComponent
in class RaplaComboBox
public void setTimeRenderer(TimeRenderer renderer)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |