buoy.widget

Class BPasswordField


public class BPasswordField
extends BTextField

A BPasswordField is a simple text entry box for typing passwords. It allows the user to enter a single line of text. The characters typed into the box are hidden, and an alternate echo character is displayed instead.

In addition to the event types generated by all Widgets, BPasswordFields generate the following event types:

Author:
Peter Eastman

Constructor Summary

BPasswordField()
Create a new BPasswordField.
BPasswordField(String text)
Create a new BPasswordField.
BPasswordField(String text, int columns)
Create a new BPasswordField.
BPasswordField(int columns)
Create a new BPasswordField.

Method Summary

char
getEchoChar()
Get the echo character to be displayed in the text field.
String
getText()
Get the text contained in the Widget.
void
setEchoChar(char c)
Set the echo character to be displayed in the text field.

Methods inherited from class buoy.widget.BTextField

getColumns, setColumns

Methods inherited from class buoy.widget.TextWidget

getCaretPosition, getLength, getSelectedText, getSelectionEnd, getSelectionStart, getText, isEditable, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart, setText

Methods inherited from class buoy.widget.Widget

addEventLink, dispatchEvent, getBackground, getBounds, getComponent, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible

Methods inherited from class buoy.event.EventSource

addEventLink, addEventLink, addEventLink, dispatchEvent, removeEventLink

Constructor Details

BPasswordField

public BPasswordField()
Create a new BPasswordField.

BPasswordField

public BPasswordField(String text)
Create a new BPasswordField.
Parameters:
text - the initial text contained in the text field (may be null)

BPasswordField

public BPasswordField(String text,
                      int columns)
Create a new BPasswordField.
Parameters:
text - the initial text contained in the text field (may be null)
columns - the number of columns this text field should be wide enough to display

BPasswordField

public BPasswordField(int columns)
Create a new BPasswordField.
Parameters:
columns - the number of columns this text field should be wide enough to display

Method Details

getEchoChar

public char getEchoChar()
Get the echo character to be displayed in the text field.

getText

public String getText()
Get the text contained in the Widget.
Overrides:
getText in interface TextWidget

setEchoChar

public void setEchoChar(char c)
Set the echo character to be displayed in the text field.

Written by Peter Eastman.