public class VColoredWrapper extends VWrapper
VColoredWrapper class provides the color attributes
(foreground color and background color) for a visual object.| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.awt.Color |
background
The background color.
|
protected java.awt.Color |
foreground
The foreground color.
|
visualizable| コンストラクタと説明 |
|---|
VColoredWrapper(Visualizable visualizable)
Constructs a colored wrapper with the wrapped visual object.
|
VColoredWrapper(Visualizable visualizable,
java.awt.Color foreground)
Constructs a colored wrapper with the wrapped visual object and
foreground color.
|
VColoredWrapper(Visualizable visualizable,
java.awt.Color foreground,
java.awt.Color background)
Constructs a colored wrapper with the wrapped visual object,
foreground color and background color.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this visual object.
|
java.awt.Color |
getBackground()
Returns the background color.
|
java.awt.Color |
getForeground()
Returns the foreground color.
|
void |
paint(java.awt.Graphics g,
java.awt.Point p)
Paints the visual object at the specified location, with the color
attributes.
|
void |
setBackground(java.awt.Color color)
Sets the background color to be the specified color.
|
void |
setForeground(java.awt.Color color)
Sets the foreground color to be the specified color.
|
getSize, getVisualizable, isResizable, setSize, setVisualizableprotected java.awt.Color foreground
protected java.awt.Color background
public VColoredWrapper(Visualizable visualizable)
visualizable - the wrapped visual object.public VColoredWrapper(Visualizable visualizable, java.awt.Color foreground)
visualizable - the wrapped visual object.foreground - the foreground color.public VColoredWrapper(Visualizable visualizable, java.awt.Color foreground, java.awt.Color background)
visualizable - the wrapped visual object.foreground - the foreground color.background - the background color.public java.awt.Color getForeground()
public void setForeground(java.awt.Color color)
color - the specified color.public java.awt.Color getBackground()
public void setBackground(java.awt.Color color)
color - the specified color.public void paint(java.awt.Graphics g,
java.awt.Point p)
paint インタフェース内 Visualizablepaint クラス内 VWrapperg - the specified graphics.p - the location in the graphics to be painted.Visualizable.paint(java.awt.Graphics, java.awt.Point)public java.lang.Object clone()
clone インタフェース内 Visualizableclone クラス内 VWrapper