public class IlxWCalendar extends IlxWComponent
The calendar can be displayed in several modes, which can be set by changing
the date-format CSS style. Available modes are:
date-format style is defined to "datetime"
by the calendar user agent style sheet.
To change the current date format to "date", you could write the following code:
IlxWCalendar myCalendar = new IlxWCalendar();
myCalendar.getStyle().set("dateFormat", "date");
...
IlxWComponent.DynamicStyleMap| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CSS_RESOURCE_NAME
Resource path to the user-agent CSS.
|
static int |
firstYear |
static int |
lastYear |
listenerList| Constructor and Description |
|---|
IlxWCalendar()
Creates a calendar component initialized with the current date.
|
IlxWCalendar(java.util.Date date)
Creates a calendar component initialized with the given date.
|
IlxWCalendar(java.util.Date date,
com.ibm.icu.util.TimeZone timezone)
Creates a calendar component initialized with the given date.
|
IlxWCalendar(com.ibm.icu.util.TimeZone timezone) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds the specified change listener to receive change events from this
calendar.
|
protected void |
fireStateChanged()
Notifies all listeners that have registered interest for notification on
this event type.
|
java.util.Date |
getDate()
Gets the date currently displayed in the calendar.
|
protected IlxWCSSRuleset |
getUserAgentRules()
Gets the "user-agent" CSS rules.
|
protected void |
printComponent(IlxWPort port)
Prints the HTML code that will display the graphical
representation of this component.
|
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes the specified change listener so that it no longer receives change
events from this calendar.
|
void |
setDate(java.util.Date date)
Sets the date to display in the calendar.
|
addPropertyChangeListener, addPropertyChangeListener, detach, doPrint, firePropertyChange, firePropertyChange, getName, getRealHtmlTagName, getStyle, invalidate, isInvalidated, notifyDependencies, print, removePropertyChangeListener, removePropertyChangeListener, setName, validateadd, add, getAttribute, getAttributeNames, getComponent, getComponentCount, getComponentNamed, getComponents, getManager, getParent, indexOf, isAncestorOf, remove, remove, removeAll, removeAttribute, setAttribute, setAuthorRules, setFinalizerpublic static int firstYear
public static int lastYear
public static final java.lang.String CSS_RESOURCE_NAME
public IlxWCalendar()
public IlxWCalendar(java.util.Date date)
date - The date to display. Must not be null.public IlxWCalendar(com.ibm.icu.util.TimeZone timezone)
public IlxWCalendar(java.util.Date date,
com.ibm.icu.util.TimeZone timezone)
date - The date to display. Must not be null.public void setDate(java.util.Date date)
date - The date to display. Must not be null.public java.util.Date getDate()
public void addChangeListener(javax.swing.event.ChangeListener l)
A change event is fired when the date changes.
l - The change listener.public void removeChangeListener(javax.swing.event.ChangeListener l)
l - The change listener.protected void fireStateChanged()
The event instance is lazily created using the parameters passed into the fire method. The listener list is processed in last to first order.
protected void printComponent(IlxWPort port) throws java.io.IOException
IlxWComponentIlxWComponent.print(ilog.webui.dhtml.IlxWPort) method.printComponent in class IlxWComponentjava.io.IOExceptionport - The port on which the component will be printed.IlxWComponent.print(ilog.webui.dhtml.IlxWPort)protected IlxWCSSRuleset getUserAgentRules()
IlxWContainersetAuthorRules method.
This method returns null by default but is intended
to be redefined by subclasses.
getUserAgentRules in class IlxWContainerIlxWContainer.setAuthorRules(ilog.webui.dhtml.IlxWCSSRuleset)© Copyright IBM Corp. 1987, 2017