|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the interface for classes that know how to paint itself. The interface provides set of properties that are bound with painting process.
Method Summary | |
java.awt.Color |
getBackground()
Gets the background color of this drawable component. |
java.awt.Point |
getOrigin()
Returns an origin of the drawable component. |
boolean |
isEnabled()
Determines whether this drawable component is enabled. |
boolean |
isOpaque()
Gets the opaque of this drawable component. |
void |
paint(java.awt.Graphics g)
Paints this drawable component. |
void |
repaint()
Performs repainting process of this drawable component. |
void |
repaint(int x,
int y,
int w,
int h)
Performs repainting process of the specified rectangular area of this component. |
void |
setOpaque(boolean b)
Sets the opaque of this drawable component. |
void |
update(java.awt.Graphics g)
Updates this drawable component. |
Methods inherited from interface org.zaval.util.Validationable |
invalidate, isValid, validate |
Methods inherited from interface org.zaval.lw.Layoutable |
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize |
Method Detail |
public void paint(java.awt.Graphics g)
g
- the graphics context to be used for painting.public void update(java.awt.Graphics g)
paint
method and it is performed with
repaint
method. The method can be used to fill the drawable
component with the background color if the component is opaque.g
- the specified context to be used for updating.public void repaint()
update
and than paint
methods.public void repaint(int x, int y, int w, int h)
update
and than paint
methods.x
- the x coordinate.y
- the y coordinate.w
- the width.h
- the height.public boolean isOpaque()
false
than the component is transparent, in this case
update
method is not be called during painting process.true
if the component is opaque; otherwise
false
.public void setOpaque(boolean b)
false
argument value to make a transparent component from this component.b
- the opaque flag.public java.awt.Point getOrigin()
public java.awt.Color getBackground()
public boolean isEnabled()
true
than the drawable component is enabled and can participate in event
handling and performing processes. Drawable components are enabled initially by default.true
if the drawable component is enabled; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |