Public Member Functions | |
PlaceholderTextField () | |
Constructs a PlaceholderTextField with a blank placeholder text and no initial text. | |
PlaceholderTextField (Document doc, String text, int columns) | |
Constructs a PlaceholderTextField with the given document, text, and width expressed in columns. | |
PlaceholderTextField (int columns) | |
Constructs a PlaceholderTextField with a blank placeholder text, no initial text, and the given width expressed in columns. | |
PlaceholderTextField (String text) | |
Constructs a PlaceholderTextField with a blank placeholder text and the given initial text. | |
PlaceholderTextField (String text, int columns) | |
Constructs a PlaceholderTextField with a blank placeholder text, the given initial text, and the given width expressed in columns. | |
String | getPlaceholderText () |
Gets the placeholder text for this field. | |
void | setPlaceholderText (String placeholderText) |
Sets the placeholder text for this field to the given string. | |
Static Protected Attributes | |
static final Color | PLACEHOLDER_TEXT_COLOR = Color.GRAY |
The color of the placeholder text. | |
Private Member Functions | |
void | displayPlaceholderText () |
Displays the placeholder text in the text field, setting the foreground color correctly, if and only if the field is empty. | |
void | setup () |
Sets up the visual appearance of this field. | |
Private Attributes | |
String | placeholderText = "" |
The placeholder text. | |
Color | actualForeground |
The actual foreground color of the text in the field when it's focused. | |
Static Private Attributes | |
static final long | serialVersionUID = -798004097970200065L |
Prevent serialization collisions. |
edu.cmu.hcii.calo.view.PlaceholderTextField.PlaceholderTextField | ( | ) |
Constructs a PlaceholderTextField with a blank placeholder text and no initial text.
edu.cmu.hcii.calo.view.PlaceholderTextField.PlaceholderTextField | ( | Document | doc, | |
String | text, | |||
int | columns | |||
) |
Constructs a PlaceholderTextField with the given document, text, and width expressed in columns.
doc | the document | |
text | the text | |
columns | the width |
edu.cmu.hcii.calo.view.PlaceholderTextField.PlaceholderTextField | ( | int | columns | ) |
Constructs a PlaceholderTextField with a blank placeholder text, no initial text, and the given width expressed in columns.
columns | the width |
edu.cmu.hcii.calo.view.PlaceholderTextField.PlaceholderTextField | ( | String | text | ) |
Constructs a PlaceholderTextField with a blank placeholder text and the given initial text.
text | the text |
edu.cmu.hcii.calo.view.PlaceholderTextField.PlaceholderTextField | ( | String | text, | |
int | columns | |||
) |
Constructs a PlaceholderTextField with a blank placeholder text, the given initial text, and the given width expressed in columns.
text | the text | |
columns | the width |
String edu.cmu.hcii.calo.view.PlaceholderTextField.getPlaceholderText | ( | ) |
Gets the placeholder text for this field.
void edu.cmu.hcii.calo.view.PlaceholderTextField.setPlaceholderText | ( | String | placeholderText | ) |
Sets the placeholder text for this field to the given string.
placeholderText | the placeholder text to set |
void edu.cmu.hcii.calo.view.PlaceholderTextField.displayPlaceholderText | ( | ) | [private] |
Displays the placeholder text in the text field, setting the foreground color correctly, if and only if the field is empty.
void edu.cmu.hcii.calo.view.PlaceholderTextField.setup | ( | ) | [private] |
Sets up the visual appearance of this field.
final Color edu.cmu.hcii.calo.view.PlaceholderTextField.PLACEHOLDER_TEXT_COLOR = Color.GRAY [static, protected] |
The color of the placeholder text.
final long edu.cmu.hcii.calo.view.PlaceholderTextField.serialVersionUID = -798004097970200065L [static, private] |
Prevent serialization collisions.
String edu.cmu.hcii.calo.view.PlaceholderTextField.placeholderText = "" [private] |
The placeholder text.
Color edu.cmu.hcii.calo.view.PlaceholderTextField.actualForeground [private] |
The actual foreground color of the text in the field when it's focused.