|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.calendar.decorators.AShapeDecorator
public class AShapeDecorator
A decorator that paints an AShape.
| Constructor Summary | |
|---|---|
AShapeDecorator()
Empty constructor. |
|
AShapeDecorator(int layerIndex,
RootAShape aShape,
PlaceRect placeRect)
Constructor. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
Sorts according to layer index. |
void |
dispose()
Clean up and deregister listeners. |
void |
doPaint(java.awt.Graphics2D g,
java.awt.Rectangle bounds)
Paint what should be painted. |
RootAShape |
getAShape()
Property: The root shape to use. |
int |
getLayerIndex()
Returns a number to indicate the order in which to paint something. |
PlaceRect |
getPlaceRect()
Property: How the ashape should be placed relative to the bounds of the date area. |
void |
processEvent(java.awt.AWTEvent e)
A callback method that lets this decorator intercept any AWTEvent (such and KeyEvents and MouseEvents). |
void |
setAShape(RootAShape aShape)
Property: The root shape to use. |
void |
setLayerIndex(int i)
Sets a number to indicate the order in which to paint something. |
void |
setPlaceRect(PlaceRect p)
Property: How the ashape should be placed relative to the bounds of the date area. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AShapeDecorator()
public AShapeDecorator(int layerIndex,
RootAShape aShape,
PlaceRect placeRect)
layerIndex - A number to indicate the order in which to paint something. Lower if painted before. I.e. under.aShape - The shape to draw. null will not paint anything.placeRect - The positioning of the image in regard to the bounds given by the decorated object.| Method Detail |
|---|
public void doPaint(java.awt.Graphics2D g,
java.awt.Rectangle bounds)
Decorator
doPaint in interface Decoratorg - The graphics object to paint inbounds - The bounds to stay within (a must). If width and/or height is 0 that dimension is not scaled to fit
and should be ignored.public PlaceRect getPlaceRect()
PlaceRect.
null.public void setPlaceRect(PlaceRect p)
PlaceRect.
p - the new value. May be null.public RootAShape getAShape()
null.public void setAShape(RootAShape aShape)
aShape - The new ashape. If null nothing will be painted.public int getLayerIndex()
DecoratorDecorator.doPaint(java.awt.Graphics2D, java.awt.Rectangle).
getLayerIndex in interface Decoratorpublic void setLayerIndex(int i)
DecoratorDecorator.doPaint(java.awt.Graphics2D, java.awt.Rectangle).
setLayerIndex in interface Decoratori - A number to indicate the order in which to paint something. Lower if painted before. I.e. under.public int compareTo(java.lang.Object o)
compareTo in interface DecoratorcompareTo in interface java.lang.Comparableo - Another Decorator
getLayerIndex() - ((Decorator) o).getLayerIndex().public void dispose()
DecoratorDecorator isn't needed any more.
dispose in interface Decoratorpublic void processEvent(java.awt.AWTEvent e)
DecoratorAWTEvent (such and KeyEvents and MouseEvents).
The target that this decorator is installed on will manually have to call this method though, but for instance DefaultDateArea
does so.
If only events that aren't consumed should be caught the normaly process of adding the appropriate listener to the target is adviced. This method is for catching the event before it is precessed by the target.
If the event is a InputEvent and the 'consumed' flag is set to true no more decorators are notified, neither is the
normal event handling dispatching for the target. A notable amount of events can come this way so processing should be very fast.
processEvent in interface Decoratore - The event.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||