|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.calendar.decorators.AbstractGridDecorator
com.miginfocom.calendar.decorators.AShapeGridDecorator
com.miginfocom.calendar.decorators.HeaderAShapeGridDecorator
public class HeaderAShapeGridDecorator
A decorator for grid cells in a date area for a DateGridHeader. Extremely flexible and can be used to
decorate just about any type of header including different independent settings for multi row/column headers.
| Field Summary | |
|---|---|
static java.lang.String |
BG_SHAPE_NAME
The name of the FillAShape used to fill the background. |
java.awt.Rectangle |
RECT
|
static java.lang.String |
TEXT_SHAPE_NAME
The name of the TextAShape used to draw the labels. |
static int |
TYPE_CELL
Type that paints the decorations over the grid lines |
static int |
TYPE_GRIDLINE
Type that paints the decorations int the cells |
| Constructor Summary | |
|---|---|
HeaderAShapeGridDecorator(DateGridHeader shapeHeader,
int layerIndex,
HeaderDecorationSpec spec,
java.util.Locale locale)
Constructor. |
|
| Method Summary | |
|---|---|
Interactor[] |
createInteractors(DateCellRange cellRange,
java.awt.Paint[] bg,
java.awt.Paint[] fg,
java.awt.Font[] f,
java.lang.Integer[] ulW)
Creates interactors that, when the mouse is over or pressed over the cell range, overrides background, font, underline foreground etc. Makes a lot of effort to create the most effective overrider possible. |
void |
dispose()
Clean up and deregister listeners. |
java.util.Locale |
getLocale()
Returns the current Locale. |
RootAShape[] |
getShapes()
Return the shapes that is to be painted under or above the grid. |
java.util.TimeZone |
getTimeZone()
Returns the current TimeZone. |
void |
gridChanged(java.beans.PropertyChangeEvent e)
Called when the grid changes. |
void |
setLocale(java.util.Locale locale)
Sets a new locale. |
void |
setTimeZone(java.util.TimeZone timeZone)
Sets a new TimeZone. |
| Methods inherited from class com.miginfocom.calendar.decorators.AShapeGridDecorator |
|---|
doPaint |
| Methods inherited from class com.miginfocom.calendar.decorators.AbstractGridDecorator |
|---|
compareTo, getGrid, getGridContainer, getInvalidEnd, getInvalidStart, getLayerIndex, hasInvalidCells, invalidateCells, processEvent, setCellsValid, setLayerIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BG_SHAPE_NAME
FillAShape used to fill the background.
public static final java.lang.String TEXT_SHAPE_NAME
TextAShape used to draw the labels.
public static final int TYPE_CELL
public static final int TYPE_GRIDLINE
public final java.awt.Rectangle RECT
| Constructor Detail |
|---|
public HeaderAShapeGridDecorator(DateGridHeader shapeHeader,
int layerIndex,
HeaderDecorationSpec spec,
java.util.Locale locale)
shapeHeader - The shape holder to ark for information. For example where the grid lines are.layerIndex - A number to indicate the order in which to paint something. Lower if painted before, I.e. under.spec - The specification of how the decorator should look and behave.locale - The locale used for formatting the header date texts. If null the CellDecorationRows
in the HeaderDecorationSpec will be used.| Method Detail |
|---|
public RootAShape[] getShapes()
AShapeGridDecorator
getShapes in class AShapeGridDecoratornull but can be of length 0. The array can be the live array used but the object so
it should be considered read-only. This is to avoid creating a passive clone and thus, garbage.public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
locale - The locale used for formatting the header date texts. If null the CellDecorationRows
in the HeaderDecorationSpec will be used.public java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone timeZone)
timeZone - The TimeZone used for formatting the header date texts. If null the DateGrid's
time zone in the HeaderDecorationSpec will be used.public void dispose()
DecoratorDecorator isn't needed any more.
dispose in interface Decoratordispose in class AbstractGridDecoratorpublic void gridChanged(java.beans.PropertyChangeEvent e)
AbstractGridDecorator
gridChanged in class AbstractGridDecoratore - The event.
public Interactor[] createInteractors(DateCellRange cellRange,
java.awt.Paint[] bg,
java.awt.Paint[] fg,
java.awt.Font[] f,
java.lang.Integer[] ulW)
LabelOverrider.NO_OVERRIDE for those.
cellRange - The cell range for which this interactor should react.bg - Background color. Index: [normal, mouseOver, pressed]. If length < 3 the missing elements will not be overrides. null
turns of override for this property.fg - Label color. Index: [normal, mouseOver, pressed]. If length < 3 the missing elements will not be overrides. null
turns of override for this propertyf - Label font. Index: [normal, mouseOver, pressed]. If length < 3 the missing elements will not be overrides. null
turns of override for this propertyulW - If != null is the underlined width. Index: [normal, mouseOver, pressed]. If length < 3 the missing elements will not be overrides. null
turns of override for this property
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||