public abstract class AbstractPaintableComponent extends Object implements PaintableComponent
PaintableComponent
.Constructor and Description |
---|
AbstractPaintableComponent(BackgroundComponent background,
Component component,
BackgroundPaint paint)
Creates a new paintable component.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
background(Graphics g)
Paints the background of the component.
|
protected abstract void |
border(Graphics g)
Paints the overlay of this component.
|
protected abstract void |
children(Graphics g)
Paints the children of this component.
|
protected abstract void |
foreground(Graphics g)
Paints the foreground of the component.
|
Component |
getComponent()
Gets the
Component which is to be painted. |
protected abstract void |
overlay(Graphics g)
Paints an overlay over the children of this component.
|
void |
paint(Graphics g)
Paints this component using the
BackgroundPaint if present. |
void |
paintBackground(Graphics g)
Invokes the standard algorithm that paints the background
of the component.
|
void |
paintBorder(Graphics g)
Invokes the standard algorithm that paints the border
of the component.
|
void |
paintChildren(Graphics g)
Invokes the standard algorithm that paints the children
of the component.
|
void |
paintForeground(Graphics g)
Invokes the standard algorithm that paints the foreground
of the component.
|
void |
paintOverlay(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, 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 Component getComponent()
PaintableComponent
Component
which is to be painted.getComponent
in interface PaintableComponent
public void paint(Graphics g)
BackgroundPaint
if present.g
- the graphics context to usepublic void paintBackground(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(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(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(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(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(Graphics g)
g
- the graphics context to useprotected abstract void foreground(Graphics g)
g
- the graphics context to useprotected abstract void border(Graphics g)
g
- the graphics context to useprotected abstract void children(Graphics g)
g
- the graphics context to useprotected abstract void overlay(Graphics g)
g
- the graphics context to use