buoy.widget
Class BTextField

java.lang.Object
  extended by buoy.event.EventSource
      extended by buoy.widget.Widget
          extended by buoy.widget.TextWidget
              extended by buoy.widget.BTextField
Direct Known 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(int columns)
          Create a new BTextField.
BTextField(java.lang.String text)
          Create a new BTextField.
BTextField(java.lang.String text, int columns)
          Create a new BTextField.
 
Method Summary
 int getColumns()
          Get the number of columns this text field should be wide enough to display.
 javax.swing.JTextField getComponent()
          Get the java.awt.Component corresponding to this Widget.
 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, 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, removeEventLink
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BTextField

public BTextField()
Create a new BTextField.


BTextField

public BTextField(java.lang.String text)
Create a new BTextField.

Parameters:
text - the initial text contained in the text field (may be null)

BTextField

public BTextField(int columns)
Create a new BTextField.

Parameters:
columns - the number of columns this text field should be wide enough to display

BTextField

public BTextField(java.lang.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
Method Detail

getComponent

public javax.swing.JTextField getComponent()
Description copied from class: Widget
Get the java.awt.Component corresponding to this Widget.

Overrides:
getComponent in class TextWidget

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.