|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.model.AbstractModel
com.guiseframework.model.AbstractTableModel
com.guiseframework.model.CalendarMonthTableModel
public class CalendarMonthTableModel
A table model representing the days of a calendar month.
Each cell contains a Date value.
| Nested Class Summary | |
|---|---|
class |
CalendarMonthTableModel.WeekDayTableColumnModel
A day-of-week column in a calendar month table. |
| Nested classes/interfaces inherited from interface com.guiseframework.model.TableModel |
|---|
TableModel.Cell<C> |
| Field Summary | |
|---|---|
static java.lang.String |
COLUMN_LABEL_DATE_STYLE_PROPERTY
The column style bound property. |
static java.lang.String |
DATE_PROPERTY
The date bound property. |
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Constructor Summary | |
|---|---|
CalendarMonthTableModel()
Default constructor for current month using the current date. |
|
CalendarMonthTableModel(java.util.Date date)
Date constructor. |
|
| Method Summary | ||
|---|---|---|
|
getCellValue(int rowIndex,
TableColumnModel<C> column)
Returns the cell value at the given row and column. |
|
protected java.text.DateFormat |
getColumnLabelDateFormat()
|
|
DateStringLiteralStyle |
getColumnLabelDateStyle()
|
|
java.util.Date |
getDate()
|
|
protected int |
getDayOffset()
|
|
protected java.util.Calendar |
getMonthCalendar()
|
|
int |
getRowCount()
|
|
GuiseSession |
getSession()
|
|
|
setCellValue(int rowIndex,
TableColumnModel<C> column,
C newCellValue)
Sets the cell value at the given row and column. |
|
void |
setColumnLabelDateStyle(DateStringLiteralStyle newColumnLabelStyle)
Sets the style of the column label. |
|
void |
setDate(java.util.Date newDate)
Sets the date this calendar represents. |
|
protected void |
updateColumnLabelDateFormat()
Updates the column label date format based upon the column label date style and current locale. |
|
protected void |
updateModel()
Updates the model based upon the current calendar. |
|
| Methods inherited from class com.guiseframework.model.AbstractTableModel |
|---|
addColumn, clearColumns, getCellValue, getColumnCount, getColumnIndex, getColumns, setCellValue |
| Methods inherited from class com.guiseframework.model.AbstractModel |
|---|
getEventListenerManager, getPlainText |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Field Detail |
|---|
public static final java.lang.String COLUMN_LABEL_DATE_STYLE_PROPERTY
public static final java.lang.String DATE_PROPERTY
| Constructor Detail |
|---|
public CalendarMonthTableModel()
public CalendarMonthTableModel(java.util.Date date)
date - The date this calendar is to represent.
java.lang.NullPointerException - if the given date is null.| Method Detail |
|---|
public GuiseSession getSession()
protected int getDayOffset()
public int getRowCount()
protected java.util.Calendar getMonthCalendar()
public java.util.Date getDate()
public void setDate(java.util.Date newDate)
newDate - The date this calendar is to represent.
java.lang.NullPointerException - if the given date is null.DATE_PROPERTYpublic DateStringLiteralStyle getColumnLabelDateStyle()
public void setColumnLabelDateStyle(DateStringLiteralStyle newColumnLabelStyle)
newColumnLabelStyle - The style of the column label.
java.lang.NullPointerException - if the given label style is null.COLUMN_LABEL_DATE_STYLE_PROPERTYprotected java.text.DateFormat getColumnLabelDateFormat()
protected void updateModel()
updateColumnLabelDateFormat()protected void updateColumnLabelDateFormat()
getColumnLabelDateStyle()
public <C> C getCellValue(int rowIndex,
TableColumnModel<C> column)
C - The type of cell values in the given column.rowIndex - The zero-based row index.column - The column for which a value should be returned.
null if there is no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
public <C> void setCellValue(int rowIndex,
TableColumnModel<C> column,
C newCellValue)
C - The type of cell values in the given column.rowIndex - The zero-based row index.column - The column for which a value should be returned.newCellValue - The value to place in the cell at the given row and column, or null if there should be no value in that cell.
java.lang.IndexOutOfBoundsException - if the given row index represents an invalid location for the table.
java.lang.IllegalArgumentException - if the given column is not one of this table's columns.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||