public class TextFields.Field
extends java.lang.Object
implements javax.swing.text.Highlighter.HighlightPainter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_ARROWCOLOR |
static java.lang.String |
PROP_LABELSTRING |
static java.lang.String |
PROP_TEXT |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
java.awt.Color |
getArrowColor() |
double |
getArrowWidth() |
javax.swing.text.DocumentFilter |
getFieldFilter() |
java.awt.Color |
getHiColor() |
javax.swing.JLabel |
getLabel() |
java.lang.String |
getLabelString() |
java.awt.Rectangle |
getLabelTextBounds() |
java.lang.String |
getName() |
java.lang.String |
getText() |
boolean |
isIsEmpty() |
boolean |
isWritable() |
void |
paint(java.awt.Graphics g,
int p0,
int p1,
java.awt.Shape bounds,
javax.swing.text.JTextComponent c) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
setArrowColor(java.awt.Color arrowColor)
Set the color of the arrow from label to field.
|
void |
setArrowVisibility(boolean able)
Set visibility of arrow.
|
void |
setArrowWidth(double arrowWidth) |
void |
setFieldFilter(javax.swing.text.DocumentFilter fr) |
void |
setHiColor(java.awt.Color hiColor) |
void |
setLabelString(java.lang.String labelString)
Set the text of a label if one is created for this field.
|
void |
setText(java.lang.String text)
Set the text of the field
|
void |
setWritable(boolean yesorno)
Allow or disallow modification of the field.
|
TextFields.Span |
span() |
public static final java.lang.String PROP_TEXT
public static final java.lang.String PROP_LABELSTRING
public static final java.lang.String PROP_ARROWCOLOR
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public java.lang.String getName()
public java.lang.String getLabelString()
public void setLabelString(java.lang.String labelString)
labelString
- the labelString to setpublic java.lang.String getText()
public void setText(java.lang.String text)
text
- text contents for the field.public boolean isIsEmpty()
public java.awt.Color getArrowColor()
public void setArrowColor(java.awt.Color arrowColor)
arrowColor
- the arrowColor to setpublic double getArrowWidth()
public void setArrowWidth(double arrowWidth)
arrowWidth
- the arrowWidth to setpublic void setArrowVisibility(boolean able)
able
- True for visible.public java.awt.Color getHiColor()
public void setHiColor(java.awt.Color hiColor)
hiColor
- the Color to paint the background of the field.
Default values: HILIT_YELLOW, HILIT_UNWRITABLE, HILIT_INVISIBLEpublic void setWritable(boolean yesorno)
yesorno
- If true, allow modification.
A writable field is hilit in yellow.public boolean isWritable()
public void setFieldFilter(javax.swing.text.DocumentFilter fr)
public javax.swing.text.DocumentFilter getFieldFilter()
public TextFields.Span span()
public javax.swing.JLabel getLabel()
public java.awt.Rectangle getLabelTextBounds()
public void paint(java.awt.Graphics g, int p0, int p1, java.awt.Shape bounds, javax.swing.text.JTextComponent c)
paint
in interface javax.swing.text.Highlighter.HighlightPainter