All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.basic.BasicTextField
java.lang.Object
|
+----com.sun.java.swing.plaf.DefaultTextUI
|
+----com.sun.java.swing.basic.BasicTextField
- public class BasicTextField
- 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.
-
KeymapName
- This is the name of the default keymap that will be shared
by all JTextField instances unless they arrange for something
different.
-
BasicTextField()
- Creates a new BasicTextField.
-
createController(JTextComponent)
- Creates the controller responsible for binding
events to actions in the text field.
-
createUI(JTextField)
- Creates a UI.
-
createView()
- Wraps the default view created with a beveled border
and background.
-
createViewFactory()
- Creates the factory to be used for building the
various view fragments that make up the view that
represents the model.
-
createViewport()
- Creates a scrollable component that is the default
view passed out by createView.
-
installUI(JComponent)
- Installs the default keymap after the superclass does its
thing.
KeymapName
public static final String KeymapName
- This is 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.
BasicTextField
public BasicTextField()
- Creates a new BasicTextField.
createUI
public static TextUI createUI(JTextField c)
- Creates a UI.
- Parameters:
- c - the text field
- Returns:
- the UI
createViewFactory
protected DefaultTextUI. JViewFactory createViewFactory()
- Creates the factory to be used for building the
various view fragments that make up the view that
represents the model. This is what determines
how the model will be represented.
- Returns:
- the factory
- Overrides:
- createViewFactory in class DefaultTextUI
- See Also:
- create
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
createView
protected Component createView()
- Wraps the default view created with a beveled border
and background. This needs to also put a horizontal scroller
around the default view created.
- Returns:
- the view in a border
- Overrides:
- createView in class DefaultTextUI
createViewport
protected DefaultTextUI. JTextView createViewport()
- Creates a scrollable component that is the default
view passed out by createView. This is changed to provide
a viewport that also implements BoundedRangeModel so that
visibility adjustments directly move the field contents.
- Returns:
- the view
- Overrides:
- createViewport 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
All Packages Class Hierarchy This Package Previous Next Index