public class TextLayer<V extends javax.swing.JComponent>
extends javax.swing.plaf.LayerUI<V>
| Modifier and Type | Field and Description |
|---|---|
static java.awt.Font |
LARGE_FONT
Font to use when the component containing the layer is usually on the larger size
|
static java.awt.Font |
REGULAR_FONT
Font to use when the component containing the layer is usually on the smaller size.
|
| Constructor and Description |
|---|
TextLayer(java.lang.String text) |
TextLayer(java.lang.String text,
java.awt.Font font) |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Font |
getFont() |
java.awt.Color |
getForeground() |
java.lang.String |
getText() |
boolean |
isTextVisible() |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c) |
void |
setFont(java.awt.Font font) |
void |
setForeground(java.awt.Color foreground)
Set the foreground color of the overlaid text
|
void |
setText(java.lang.String text)
Set the overlaid text
|
void |
setTextVisible(boolean displayText)
Set whether the overlaid text should appear or not
|
addPropertyChangeListener, addPropertyChangeListener, applyPropertyChange, doLayout, eventDispatched, firePropertyChange, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, installUI, paintImmediately, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removePropertyChangeListener, removePropertyChangeListener, uninstallUI, updateUIpublic static final java.awt.Font REGULAR_FONT
public static final java.awt.Font LARGE_FONT
public TextLayer(java.lang.String text)
public TextLayer(java.lang.String text,
java.awt.Font font)
public final void setText(java.lang.String text)
text - public final java.lang.String getText()
public final void setTextVisible(boolean displayText)
displayText - public final boolean isTextVisible()
public final void setForeground(java.awt.Color foreground)
foreground - public final java.awt.Color getForeground()
public void paint(java.awt.Graphics g,
javax.swing.JComponent c)
paint in class javax.swing.plaf.LayerUI<V extends javax.swing.JComponent>public final void setFont(java.awt.Font font)
public final java.awt.Font getFont()