buoy.widget

Class BTextField

Known Direct Subclasses:
BPasswordField

public class BTextField
extends TextWidget

A BTextField is a simple text entry box. It allows the user to enter a single line of text.

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

Author:
Peter Eastman

Constructor Summary

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

Method Summary

int
getColumns()
Get the number of columns this text field should be wide enough to display.
void
setColumns(int columns)
Set the number of columns this text field should be wide enough to display.

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

BTextField

public BTextField()
Create a new BTextField.

BTextField

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

BTextField

public BTextField(String text,
                  int columns)
Create a new BTextField.
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

BTextField

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

Method Details

getColumns

public int getColumns()
Get the number of columns this text field should be wide enough to display.

setColumns

public void setColumns(int columns)
Set the number of columns this text field should be wide enough to display.

Written by Peter Eastman.