java.lang.Object | +----java.awt.Component | +----java.awt.Canvas | +----pvWinJ.PVEdit | +----pvWinJ.PVStaticText
Class PVStaticText is designed to display a text string.
The PVStaticText inherits all painting styles and corresponding
methods from the PVEdit.
All aspects of painting can be customized through
get/setProperty().
PVStaticText supports MouseListener interface.
Example to insert an instance of the PVStaticText class in an
applet and set some properties:
public void init()
{
setSize(580, 400);
setLayout(null);
PVStaticText text = new PVStaticText("PVStatic");
add(text);
text.setBackColor(Color.gray); text.setFontStyle(4);
text.setBorder(13); text.setShadow(1);
text.setText3DColor(Color.yellow); text.setBounds(5, 10, 300,
35);
...
}
Notes:
Use the get/setBackColor() to get/set background color rather
than the get/setBackground() methods.
When fontStyle is set to a LED.., then text is painted by the LED
build in font rather then the selected Font object.
When font with aureole is enabled, then the text 3D effect is
disabled.
public PVStaticText(String text, int fontSize, int text3DHorizontal, int text3DVertical)
public PVStaticText(String text)
public PVStaticText()