|
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.JCalendar
public class JCalendar
JCalendar provides a calendar component.
Client Property:
| Name | Value | Default Value |
|---|---|---|
| JCalendar.headerStyle |
|
Classic_Arrow |
| JCalendar.centerStyle |
|
MonthView |
| JCalendar.footerStyle |
|
Today |
| JCalendar.autoResizeRowHeight |
|
Boolean.TRUE |
| JCalendar.headerRolloverMode |
|
JToolBar |
| JCalendar.todayButtonFireActionEventEnabled |
|
Boolean.FALSE |
| Nested Class Summary | |
|---|---|
protected class |
JCalendar.AccessibleJCalendar
This class implements accessibility support for the JCalendar class. |
static class |
JCalendar.AdjustTimeStyle
|
| 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 | |
|---|---|
JCalendar()
Constructs a JCalendar. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
This method should not invoke by user. |
void |
addActionListener(ActionListener listener)
Adds an action listener to the JCalendar. |
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener to the JCalendar component. |
boolean |
canSelect(int year,
int month,
int day)
Determines whether the specified time can be selected. |
protected void |
fireActionPerformed(ActionEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JCalendar. |
int |
getActionClickCount()
|
ActionListener[] |
getActionListeners()
Returns an array of all the action listeners registered on this JCalendar. |
Date |
getAdjustTime()
Returns the adjust time based the adjust style. |
JCalendar.AdjustTimeStyle |
getAdjustTimeStyle()
|
Calendar |
getCalendar()
Returns the calendar object used by this JClock. |
CellProvider |
getCellProvider()
Returns the cell provider for renderer. |
AbstractCellRenderer |
getCellRenderer()
Returns the cell renderer for render day. |
ChangeListener[] |
getChangeListeners()
Returns an array of all the ChangeListeners added
to this JCalendar with addChangeListener(). |
int |
getDate()
Returns the calendar's current date. |
Calendar |
getModel()
Deprecated. replaced by getCalendar() |
int |
getMonth()
Returns the calendar's current month. |
DateFormat |
getSelectionDateFormat()
Returns the selection date format. |
Date |
getTime()
Gets this Calendar's current time. |
CalendarUI |
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. |
int |
getYear()
Returns this calendar's current year. |
boolean |
isSelectionLabelVisible()
Returns whether the selection label is visible. |
protected String |
paramString()
Returns a string representation of this JCalendar. |
void |
removeActionListener(ActionListener listener)
Removes the specified action listener from the JCalendar. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the JCalendar component. |
void |
setActionClickCount(int actionClickCount)
|
void |
setAdjustTimeStyle(JCalendar.AdjustTimeStyle adjustTimeStyle)
|
void |
setCalendar(Calendar cal)
Sets the calendar object used by this JClock. |
void |
setCellProvider(CellProvider cellProvider)
Sets the cell provider for renderer. |
void |
setCellRenderer(AbstractCellRenderer cellRenderer)
|
void |
setDate(int date)
Sets the day of the month of this JCalendar object to the specified value. |
void |
setModel(Calendar cal)
Deprecated. replaced by setCalendar(java.util.Calendar) |
void |
setMonth(int month)
Sets the month of this date to the specified value. |
void |
setSelectionDateFormat(DateFormat format)
Sets the selection date format. |
void |
setSelectionLabelVisible(boolean selectionLabelVisible)
Sets the selection label visible property. |
void |
setTime(Date time)
Sets this Calendar's current time with the given Date. |
void |
setUI(CalendarUI ui)
Sets the look and feel (L&F) object that renders this component. |
void |
setYear(int year)
Sets the year of this JCalendar object to be the specified value. |
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 JCalendar()
JCalendar.
| Method Detail |
|---|
public void updateUI()
updateUI in class JComponentJComponent.updateUI()public CalendarUI getUI()
public void setUI(CalendarUI ui)
ui - the CalendarUI L&F objectUIDefaults.getUI(javax.swing.JComponent)public String getUIClassID()
getUIClassID in class JComponentJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)public Calendar getModel()
getCalendar()
java.util.Calendar.
setModel(java.util.Calendar)public void setModel(Calendar cal)
setCalendar(java.util.Calendar)
java.util.Calendar.
cal - the calendar modelgetModel()public int getActionClickCount()
public void setActionClickCount(int actionClickCount)
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)
date - the given Date.getTime()public Date getTime()
setTime(java.util.Date)public JCalendar.AdjustTimeStyle getAdjustTimeStyle()
public void setAdjustTimeStyle(JCalendar.AdjustTimeStyle adjustTimeStyle)
public Date getAdjustTime()
public int getYear()
Calendarpublic void setYear(int year)
year - the year value.Calendarpublic int getMonth()
replaced by Calendar.get(Calendar.MONTH).public void setMonth(int month)
month - the month value between 0-11.replaced by Calendar.set(Calendar.MONTH, int month).public int getDate()
Calendarpublic void setDate(int date)
date - the day of the month value between 1-31.Calendar
public boolean canSelect(int year,
int month,
int day)
year - the yearmonth - the monthday - the daypublic void setSelectionDateFormat(DateFormat format)
dateFormat - the selection date formatpublic DateFormat getSelectionDateFormat()
public boolean isSelectionLabelVisible()
setSelectionLabelVisible(boolean)public void setSelectionLabelVisible(boolean selectionLabelVisible)
selectionLabelVisible - the selection label visible propertyisSelectionLabelVisible()public void setCellRenderer(AbstractCellRenderer cellRenderer)
public AbstractCellRenderer getCellRenderer()
setCellRenderer(com.zfqjava.swing.cell.AbstractCellRenderer)public void setCellProvider(CellProvider cellProvider)
cellProvider - the cell providergetCellProvider()public CellProvider getCellProvider()
setCellProviderpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void addActionListener(ActionListener listener)
JCalendar.
listener - the listener to addJCalendar()public void removeActionListener(ActionListener listener)
JCalendar.
listener - the listener to removepublic ActionListener[] getActionListeners()
ActionListeners or an empty
array if no action listeners are currently registeredaddActionListener(java.awt.event.ActionListener),
removeActionListener(java.awt.event.ActionListener)protected void fireActionPerformed(ActionEvent e)
e - the action event to fireEventListenerListpublic 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 | |||||||||