|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.beans.AbstractBean
com.miginfocom.beans.AbstractHeaderBean
com.miginfocom.beans.DateHeaderBean
public class DateHeaderBean
A header object that wraps (aggregates) a real Header implementation.
This bean is for simplifying the usage of a header and to make the header more JavaBean-like.
| Field Summary |
|---|
| Fields inherited from class com.miginfocom.beans.AbstractHeaderBean |
|---|
bgPaint |
| Constructor Summary | |
|---|---|
DateHeaderBean()
|
|
| Method Summary | |
|---|---|
void |
addDateChangeListener(DateChangeListener l)
This call is transmitted to the DateGridHeader.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener) |
void |
addDateChangeListener(DateChangeListener l,
boolean asWeakRef)
This call is transmitted to the DateGridHeader.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener, boolean) |
java.awt.Color |
getGridColor()
Property: The color of the grid lines. |
GridLineException[] |
getGridLineExceptions()
Property: Grid line exceptions makes it very fleible to override the gridline size and color in a structured way. |
Header |
getHeader()
|
CellDecorationRow[] |
getHeaderRows()
Property: An array of rows that makes out the different rows or colums for the header (rows for north/south headers and colums for east/west headers). |
javax.swing.border.Border |
getInnerBorder()
Property: The inner border around the header. |
int |
getLabelRotation()
Property: If the labels for the header should be rotated and if so how. |
java.lang.String |
getLabelRotationRows()
Property: A comma separated string with the rows that are to get the property getLabelRotation(). |
boolean |
getMouseEffectsEnabled()
Property: If mouse listeners should be installed on the header to make live effects enabled on the cell rows. |
javax.swing.border.Border |
getOuterBorder()
Property: The outer border around the header. |
int |
getRowGap()
The gap in pixels between the header rows. |
int |
getTextAntiAlias()
Property: The text antialias hint that will be set on the header's renderer before any text is drawn. |
java.lang.String |
getTextAntiAliasRows()
Property: A comma separated string with the rows that are to get the property getTextAntiAlias(). |
java.lang.Boolean |
getUseStartDateTime()
If the start or end date in the decorated cells' should be used. |
protected void |
recreateHeader()
Set the header to null and revalidate the container |
void |
removeDateChangeListener(DateChangeListener l)
This call is transmitted to the DateGridHeader.removeDateChangeListener(com.miginfocom.util.dates.DateChangeListener) |
void |
setGridColor(java.awt.Color c)
Property: The color of the grid lines. |
void |
setGridLineExceptions(GridLineException[] exceptions)
Property: Grid line exceptions makes it very fleible to override the gridline size and color in a structured way. |
void |
setHeaderRows(CellDecorationRow[] rows)
Property: An array of rows that makes out the different rows or colums for the header (rows for north/south headers and colums for east/west headers). |
void |
setInnerBorder(javax.swing.border.Border border)
Property: The inner border around the header. |
void |
setLabelRotation(int rot)
Property: If the labels for the header should be rotated and if so how. |
void |
setLabelRotationRows(java.lang.String rows)
Property: A comma separated string with the rows that are to get the property getLabelRotation(). |
void |
setMouseEffectsEnabled(boolean b)
Property: If mouse listeners should be installed on the header to make live effects enabled on the cell rows. |
void |
setOuterBorder(javax.swing.border.Border border)
Property: The outer border around the header. |
void |
setRowGap(int rowGap)
The gap in pixels between the header rows. |
void |
setTextAntiAlias(int hint)
Property: The text antialias hint that will be set on the header's renderer before any text is drawn. |
void |
setTextAntiAliasRows(java.lang.String rows)
Property: A comma separated string with the rows that are to get the property getTextAntiAlias(). |
void |
setUseStartDateTime(java.lang.Boolean b)
If the start or end date in the decorated cells' should be used. |
| Methods inherited from class com.miginfocom.beans.AbstractHeaderBean |
|---|
getBackgroundPaint, getContainer, getEdge, getExpandToCorner, isVisible, revalidateRepaintContainer, setBackgroundPaint, setDateAreaContainer, setEdge, setExpandToCorner, setVisible |
| Methods inherited from class com.miginfocom.beans.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChangeEvent, removePropertyChangeListener, setIgnorePropertyChangeEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateHeaderBean()
| Method Detail |
|---|
public Header getHeader()
protected void recreateHeader()
AbstractHeaderBeannull and revalidate the container
recreateHeader in class AbstractHeaderBeanpublic GridLineException[] getGridLineExceptions()
To really understand how flexible and powerful this feature is see the "Repetitions" section in the FAQ document.
null.public void setGridLineExceptions(GridLineException[] exceptions)
To really understand how flexible and powerful this feature is see the "Repetitions" section in the FAQ document.
exceptions - The exceptions or zero length if no exteptions to the grid lines exist (default). Never null.public int getLabelRotation()
TextAShape.TYPE_SINGLE_LINE_ROT_CW (right 90 degrees)TextAShape.TYPE_SINGLE_LINE_ROT_CCW (left 90 degrees)TextAShape.TYPE_SINGLE_LINE (normal text)
TextAShape.TYPE_SINGLE_LINE which means no rotation.public void setLabelRotation(int rot)
TextAShape.TYPE_SINGLE_LINE_ROT_CW (right 90 degrees)TextAShape.TYPE_SINGLE_LINE_ROT_CCW (left 90 degrees)TextAShape.TYPE_SINGLE_LINE (normal text)This method will reinitialize the header if the value is changed but do nothing if it's the same.
rot - The rotation. Default is TextAShape.TYPE_SINGLE_LINE which means no rotation.public java.lang.String getLabelRotationRows()
getLabelRotation(). E.g. "1,2,4". A value of null, ""
and any illegal value means "all rows".
public void setLabelRotationRows(java.lang.String rows)
getLabelRotation(). E.g. "1,2,4". A value of null, ""
and any illegal value means "all rows".
This method will reinitialize the header if the value is changed but do nothing if it's the same.
rows - The new value.public int getTextAntiAlias()
GfxUtil.AA_HINT_INHERIT
the value will not be changed and thus the default value for the graphics environment will be used.
Normal values are (but other values may apply at a later time, for instance to set sub pixel anti aliasing):
public void setTextAntiAlias(int hint)
GfxUtil.AA_HINT_INHERIT
the value will not be changed and thus the default value for the graphics environment will be used.
Normal values are (but other values may apply at a later time, for instance to set sub pixel anti aliasing):
This method will reinitialize the header if the value is changed but do nothing if it's the same.
hint - The new value.public java.lang.String getTextAntiAliasRows()
getTextAntiAlias(). E.g. "1,2,4". A value of null, ""
and any illegal value means "all rows".
public void setTextAntiAliasRows(java.lang.String rows)
getTextAntiAlias(). E.g. "1,2,4". A value of null, ""
and any illegal value means "all rows".
This method will reinitialize the header if the value is changed but do nothing if it's the same.
rows - The new value.public java.awt.Color getGridColor()
null no lines will be drawn.
Note! The grid color if set will show over everything so that no cells will look merged. To show a grid
where cell rows can have cells that span more that one row/column use the background paint of the whole
header to set the grid color and leave this grid color to null. This will make it possible
to create headers like in getHeaderRows() JavDoc. Also see AbstractHeaderBean.setBackgroundPaint(java.awt.Paint)
null.public void setGridColor(java.awt.Color c)
null no lines will be drawn.
Note! The grid color if set will show over everything so that no cells will look merged. To show a grid
where cell rows can have cells that span more that one row/column use the background paint of the whole
header to set the grid color and leave this grid color to null. This will make it possible
to create headers like in getHeaderRows() JavDoc. Also see AbstractHeaderBean.setBackgroundPaint(java.awt.Paint)
c - The new grid line color. May be null.public int getRowGap()
public void setRowGap(int rowGap)
rowGap - The gap in pixels between the header rows.public java.lang.Boolean getUseStartDateTime()
null the start date is used if the
header is top/left and end date if bottom/right. You can use this property to force either way.
null.public void setUseStartDateTime(java.lang.Boolean b)
null the start date if used if the
header is top/left and end date if bottom/right. You can use this property to force either way.
b - The new state. null is default.public javax.swing.border.Border getInnerBorder()
null.getOuterBorder()public void setInnerBorder(javax.swing.border.Border border)
border - The new border. May be null.setOuterBorder(javax.swing.border.Border)public javax.swing.border.Border getOuterBorder()
null.getInnerBorder()public void setOuterBorder(javax.swing.border.Border border)
border - The new border. May be null.setInnerBorder(javax.swing.border.Border)public CellDecorationRow[] getHeaderRows()
If the date area shows day cells the cells in the header can be merged. This will look like seven cells in the header will look like one.
Example for three rows: Month, week and days:
----------------------------------------------------------------- | January | February | ----------------------------------------------------------------- | w01 | w02 | w03 | w04 | w05 | w06 | w07 |w08 | ----------------------------------------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -----------------------------------------------------------------
null.public void setHeaderRows(CellDecorationRow[] rows)
If the date area shows day cells the cells in the header can be merged. This will look like seven cells in the header will look like one.
Example for three rows: Month, week and days:
----------------------------------------------------------------- | January | February | ----------------------------------------------------------------- | w01 | w02 | w03 | w04 | w05 | w06 | w07 |w08 | ----------------------------------------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -----------------------------------------------------------------
rows - The new rows. Should noramlly be at least one element and thus not null.public boolean getMouseEffectsEnabled()
CellDecorationRows
of course.
If date selection in the header is to be listened for this must be enabled.
addDateChangeListener(com.miginfocom.util.dates.DateChangeListener, boolean)public void setMouseEffectsEnabled(boolean b)
CellDecorationRows
of course.
If date selection in the header is to be listened for this must be enabled.
b - If enabled.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener, boolean)public void addDateChangeListener(DateChangeListener l)
DateGridHeader.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener)
Note that mouse effects must be enabled. See setMouseEffectsEnabled(boolean)
addDateChangeListener(com.miginfocom.util.dates.DateChangeListener, boolean)
public void addDateChangeListener(DateChangeListener l,
boolean asWeakRef)
DateGridHeader.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener, boolean)
Note that mouse effects must be enabled. See setMouseEffectsEnabled(boolean)
public void removeDateChangeListener(DateChangeListener l)
DateGridHeader.removeDateChangeListener(com.miginfocom.util.dates.DateChangeListener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||