All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.basic.BasicTextFieldUI
java.lang.Object
|
+----com.sun.java.swing.plaf.ComponentUI
|
+----com.sun.java.swing.plaf.TextUI
|
+----com.sun.java.swing.text.DefaultTextUI
|
+----com.sun.java.swing.basic.BasicTextFieldUI
- public class BasicTextFieldUI
- extends DefaultTextUI
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.
-
defaultBorder
-
-
KeymapName
- The name of the default keymap that will be shared
by all JTextField instances unless they arrange for something
different.
-
BasicTextFieldUI()
- Creates a new BasicTextFieldUI.
-
create(Element)
- If a subclass wishes to directly implement the factory
producing the view(s), it should reimplement this
method.
-
create(Element, int, int)
- If a subclass wishes to directly implement the factory
producing the view(s), it should reimplement this
method.
-
createCaret()
- Creates the object to use for a caret.
-
createController(JTextComponent)
- Creates the controller responsible for binding
events to actions in the text field.
-
createUI(JComponent)
- Creates a UI for a JTextField.
-
installUI(JComponent)
- Installs the default keymap after the superclass does its
thing.
-
paintBackground(Graphics)
- Paint a background for the view.
-
uninstallUI(JComponent)
- Deinstalls the UI for a component.
defaultBorder
protected static final Border defaultBorder
KeymapName
public static final String KeymapName
- The name of the default keymap that will be shared
by all JTextField instances unless they arrange for something
different. The keymap will resolve through the
JTextController.DEFAULT_KEYMAP.
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
createCaret
protected Caret createCaret()
- Creates the object to use for a caret.
- Overrides:
- createCaret in class DefaultTextUI
installUI
public void installUI(JComponent c)
- Installs the default keymap after the superclass does its
thing.
- Parameters:
- c - the UI
- Overrides:
- installUI in class DefaultTextUI
- See Also:
- installUI
uninstallUI
public void uninstallUI(JComponent c)
- Deinstalls the UI for a component.
- Overrides:
- uninstallUI 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
create
public View create(Element elem)
- If a subclass wishes to directly implement the factory
producing the view(s), it should reimplement this
method.
- Overrides:
- create in class DefaultTextUI
create
public View create(Element elem,
int p0,
int p1)
- If a subclass wishes to directly implement the factory
producing the view(s), it should reimplement this
method.
- Overrides:
- create in class DefaultTextUI
paintBackground
protected void paintBackground(Graphics g)
- Paint a background for the view.
- Overrides:
- paintBackground in class DefaultTextUI
All Packages Class Hierarchy This Package Previous Next Index