public abstract class AbstractPaintableComponent extends java.lang.Object implements PaintableComponent
PaintableComponent
.Constructor and Description |
---|
AbstractPaintableComponent(BackgroundComponent background,
java.awt.Component component,
BackgroundPaint paint)
Creates a new paintable component.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
background(java.awt.Graphics g)
Paints the background of the component.
|
protected abstract void |
border(java.awt.Graphics g)
Paints the overlay of this component.
|
protected abstract void |
children(java.awt.Graphics g)
Paints the children of this component.
|
protected abstract void |
foreground(java.awt.Graphics g)
Paints the foreground of the component.
|
java.awt.Component |
getComponent()
Gets the
Component which is to be painted. |
protected abstract void |
overlay(java.awt.Graphics g)
Paints an overlay over the children of this component.
|
void |
paint(java.awt.Graphics g)
Paints this component using the
BackgroundPaint if present. |
void |
paintBackground(java.awt.Graphics g)
Invokes the standard algorithm that paints the background
of the component.
|
void |
paintBorder(java.awt.Graphics g)
Invokes the standard algorithm that paints the border
of the component.
|
void |
paintChildren(java.awt.Graphics g)
Invokes the standard algorithm that paints the children
of the component.
|
void |
paintForeground(java.awt.Graphics g)
Invokes the standard algorithm that paints the foreground
of the component.
|
void |
paintOverlay(java.awt.Graphics g)
Invokes the standard algorithm that paints an overlay over the children
of the component.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTransparency
public AbstractPaintableComponent(BackgroundComponent background, java.awt.Component component, BackgroundPaint paint)
background
- the owner of this PaintableComponent
, can be null
component
- the component which is painted by this object, must not be null
paint
- the algorithm to use for painting, can be null
public java.awt.Component getComponent()
PaintableComponent
Component
which is to be painted.getComponent
in interface PaintableComponent
public void paint(java.awt.Graphics g)
BackgroundPaint
if present.g
- the graphics context to usepublic void paintBackground(java.awt.Graphics g)
PaintableComponent
paintBackground
in interface PaintableComponent
g
- the graphics context to use, null
to just inform
this component that the background should not be painted automaticallypublic void paintForeground(java.awt.Graphics g)
PaintableComponent
paintForeground
in interface PaintableComponent
g
- the graphics context to use, null
to just inform
this component that the foreground should not be painted automaticallypublic void paintBorder(java.awt.Graphics g)
PaintableComponent
paintBorder
in interface PaintableComponent
g
- the graphics context to use, null
to just inform
this component that the background should not be painted automaticallypublic void paintChildren(java.awt.Graphics g)
PaintableComponent
paintChildren
in interface PaintableComponent
g
- the graphics context to use, null
to just inform
this component that the background should not be painted automaticallypublic void paintOverlay(java.awt.Graphics g)
PaintableComponent
paintOverlay
in interface PaintableComponent
g
- the graphics context to use, null
to just inform
this component that the background should not be painted automaticallyprotected abstract void background(java.awt.Graphics g)
g
- the graphics context to useprotected abstract void foreground(java.awt.Graphics g)
g
- the graphics context to useprotected abstract void border(java.awt.Graphics g)
g
- the graphics context to useprotected abstract void children(java.awt.Graphics g)
g
- the graphics context to useprotected abstract void overlay(java.awt.Graphics g)
g
- the graphics context to use