|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.miginfocom.calendar.decorators.AbstractGridDecorator
public abstract class AbstractGridDecorator
Handels layers (sorting and holding the value) and the reference to the date area. Holds the date area in a WeakReference
.
Constructor Summary | |
---|---|
protected |
AbstractGridDecorator(GridContainer gridContainer,
int layerIndex)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Sorts according to layer index. |
void |
dispose()
Clean up and deregister listeners. |
Grid |
getGrid()
Returns the date area's grid. |
GridContainer |
getGridContainer()
Returns the container of the grid. |
protected int |
getInvalidEnd()
Returns the end if the invalid cells. |
protected int |
getInvalidStart()
Returns the start if the invalid cells. |
int |
getLayerIndex()
Returns a number to indicate the order in which to paint something. |
abstract void |
gridChanged(java.beans.PropertyChangeEvent e)
Called when the grid changes. |
protected boolean |
hasInvalidCells()
Returns if there are invalid cells |
protected void |
invalidateCells(int start,
int end)
Marks cells as invalid and will be recached during next reapint |
void |
processEvent(java.awt.AWTEvent e)
Implemented to do nothing. |
protected void |
setCellsValid()
Marks all cells at valid |
void |
setLayerIndex(int layerIndex)
Sets a number to indicate the order in which to paint something. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.miginfocom.calendar.decorators.Decorator |
---|
doPaint |
Constructor Detail |
---|
protected AbstractGridDecorator(GridContainer gridContainer, int layerIndex)
gridContainer
- The grid container to decorate. Not null
.layerIndex
- A number to indicate the order in which to paint something. Lower if painted before. I.e. under.Method Detail |
---|
public int getLayerIndex()
Decorator
Decorator.doPaint(java.awt.Graphics2D, java.awt.Rectangle)
.
getLayerIndex
in interface Decorator
public void dispose()
Decorator
Decorator
isn't needed any more.
dispose
in interface Decorator
public void setLayerIndex(int layerIndex)
Decorator
Decorator.doPaint(java.awt.Graphics2D, java.awt.Rectangle)
.
setLayerIndex
in interface Decorator
layerIndex
- A number to indicate the order in which to paint something. Lower if painted before. I.e. under.public GridContainer getGridContainer()
GridDecorator
getGridContainer
in interface GridDecorator
null
in which case nothing should be painted.public Grid getGrid()
null
then null
will be returned.
null
!public int compareTo(java.lang.Object o)
compareTo
in interface Decorator
compareTo
in interface java.lang.Comparable
o
- Another Decorator
getLayerIndex() - ((Decorator) o).getLayerIndex()
.public abstract void gridChanged(java.beans.PropertyChangeEvent e)
e
- The event.public void processEvent(java.awt.AWTEvent e)
super.processEvent(e)
as well.
processEvent
in interface Decorator
e
- The eventprotected final void invalidateCells(int start, int end)
start
- AtStart cell. > 0end
- AtEnd cell. < cell count.protected final boolean hasInvalidCells()
protected final void setCellsValid()
protected final int getInvalidStart()
hasInvalidCells()
returns true
!
protected final int getInvalidEnd()
hasInvalidCells()
returns true
!
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |