All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.basic.BasicTextFieldUI
java.lang.Object
|
+----java.awt.swing.plaf.ComponentUI
|
+----java.awt.swing.plaf.TextUI
|
+----java.awt.swing.text.DefaultTextUI
|
+----java.awt.swing.basic.BasicTextUI
|
+----java.awt.swing.basic.BasicTextFieldUI
- public class BasicTextFieldUI
- extends BasicTextUI
Provides the Windows look and feel for a text field. This
is basically the following customizations to the default
look-and-feel.
- The border is beveled (using the standard control color).
- The background is white by default.
- The highlight color is a dark color, blue by default.
- The foreground color is high contrast in the selected
area, white by default. The unselected foreground is black.
- The cursor blinks at about 1/2 second intervals.
- The entire value is selected when focus is gained.
- Shift-left-arrow and shift-right-arrow extend selection
- Cntrl-left-arrow and cntrl-right-arrow act like home and
end respectively.
BasicTextFieldUI()
- Creates a new BasicTextFieldUI.
create(Element)
- Creates a view based on an element.
createCaret()
- Creates the caret for a field.
createController(JTextComponent)
- Creates the controller responsible for binding
events to actions in the text field.
createUI(JComponent)
- Creates a UI for a JTextField.
getPropertyPrefix()
- Name used as a key to lookup properties through the
UIManager.
loadDefaultKeymap(Keymap)
- Load the given keymap with default settings
appropriate for the UI being created.
paintBackground(Graphics)
- Paints the background of the field.
BasicTextFieldUI
public BasicTextFieldUI()
- Creates a new BasicTextFieldUI.
createUI
public static ComponentUI createUI(JComponent c)
- Creates a UI for a JTextField.
- Parameters:
- c - the text field
- Returns:
- the UI
getPropertyPrefix
protected String getPropertyPrefix()
- Name used as a key to lookup properties through the
UIManager. This is used as a prefix to all the standard
text properties.
- Overrides:
- getPropertyPrefix in class DefaultTextUI
createCaret
protected Caret createCaret()
- Creates the caret for a field.
- Returns:
- the caret
- Overrides:
- createCaret in class DefaultTextUI
createController
protected TextController createController(JTextComponent c)
- Creates the controller responsible for binding
events to actions in the text field. This is basically a minor
extension of the default behavior.
- Parameters:
- c - the component
- Returns:
- the controller
- Overrides:
- createController in class DefaultTextUI
loadDefaultKeymap
protected void loadDefaultKeymap(Keymap map)
- Load the given keymap with default settings
appropriate for the UI being created. This
is implemented to do the superclass behavior
as well as load the settings appropriate for
a single-line text editor.
- Overrides:
- loadDefaultKeymap in class BasicTextUI
create
public View create(Element elem)
- Creates a view based on an element.
- Parameters:
- elem - the element
- Returns:
- the view
- Overrides:
- create in class DefaultTextUI
paintBackground
protected void paintBackground(Graphics g)
- Paints the background of the field.
- Parameters:
- g - the graphics context
- Overrides:
- paintBackground in class DefaultTextUI
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature