buoy.widget
Class BPasswordField

java.lang.Object
  extended by buoy.event.EventSource
      extended by buoy.widget.Widget
          extended by buoy.widget.TextWidget
              extended by buoy.widget.BTextField
                  extended by buoy.widget.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(int columns)
          Create a new BPasswordField.
BPasswordField(java.lang.String text)
          Create a new BPasswordField.
BPasswordField(java.lang.String text, int columns)
          Create a new BPasswordField.
 
Method Summary
 javax.swing.JPasswordField getComponent()
          Get the java.awt.Component corresponding to this Widget.
 char getEchoChar()
          Get the echo character to be displayed in the text field.
 java.lang.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, 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

BPasswordField

public BPasswordField()
Create a new BPasswordField.


BPasswordField

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

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

BPasswordField

public BPasswordField(int columns)
Create a new BPasswordField.

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

BPasswordField

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

getComponent

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

Overrides:
getComponent in class BTextField

getEchoChar

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


setEchoChar

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


getText

public java.lang.String getText()
Get the text contained in the Widget.

Overrides:
getText in class TextWidget


Written by Peter Eastman.