Skip navigation links
oracle.javatools.ui
Class TextLayer<V extends javax.swing.JComponent>
java.lang.Object
javax.swing.plaf.ComponentUI
org.jdesktop.jxlayer.plaf.LayerUI<V>
org.jdesktop.jxlayer.plaf.AbstractLayerUI<V>
oracle.javatools.ui.TextLayer<V>
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- EmptyListTextLayer, EmptyTableTextLayer
-
public class TextLayer<V extends javax.swing.JComponent>
- extends org.jdesktop.jxlayer.plaf.AbstractLayerUI<V>
A layer of text that appears in front of any component. Wrap the component in a JLayer/JXLayer with an instance of this class.
- See Also:
- Serialized Form
Field Summary |
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 Summary |
TextLayer(java.lang.String text)
|
Method Summary |
java.awt.Font |
getFont()
|
java.awt.Color |
getForeground()
|
java.lang.String |
getText()
|
boolean |
isTextVisible()
|
protected void |
paintLayer(java.awt.Graphics2D g2, org.jdesktop.jxlayer.JXLayer<? extends V> l)
|
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 |
Methods inherited from class org.jdesktop.jxlayer.plaf.AbstractLayerUI |
configureGraphics, eventDispatched, getClip, getComposite, getLayerEventMask, getRenderingHints, getTransform, handlePropertyChangeEvent, installUI, isDirty, paint, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, setDirty, uninstallUI |
Methods inherited from class org.jdesktop.jxlayer.plaf.LayerUI |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getPreferredScrollableViewportSize, getPropertyChangeListeners, getPropertyChangeListeners, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, removePropertyChangeListener, removePropertyChangeListener, updateUI |
Methods inherited from class javax.swing.plaf.ComponentUI |
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REGULAR_FONT
public static final java.awt.Font REGULAR_FONT
- Font to use when the component containing the layer is usually on the smaller size.
LARGE_FONT
public static final java.awt.Font LARGE_FONT
- Font to use when the component containing the layer is usually on the larger size
TextLayer
public TextLayer(java.lang.String text)
setText
public final void setText(java.lang.String text)
- Set the overlaid text
-
- Parameters:
text
-
getText
public final java.lang.String getText()
setTextVisible
public final void setTextVisible(boolean displayText)
- Set whether the overlaid text should appear or not
-
- Parameters:
displayText
-
isTextVisible
public final boolean isTextVisible()
setForeground
public final void setForeground(java.awt.Color foreground)
- Set the foreground color of the overlaid text
-
- Parameters:
foreground
-
getForeground
public final java.awt.Color getForeground()
paintLayer
protected void paintLayer(java.awt.Graphics2D g2,
org.jdesktop.jxlayer.JXLayer<? extends V> l)
-
- Overrides:
paintLayer
in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<V extends javax.swing.JComponent>
setFont
public final void setFont(java.awt.Font font)
getFont
public final java.awt.Font getFont()
Skip navigation links
Copyright © 1997, 2013, Oracle. All rights reserved.