All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.basic.BasicTextField
java.lang.Object
|
+----com.sun.java.swing.text.JTextUI
|
+----com.sun.java.swing.basic.BasicTextField
- public class BasicTextField
- extends JTextUI
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()
-
-
createController(JTextComponent)
- This is defined to create the controller responsible binding
events to actions in the text field.
-
createUI(JTextField)
-
-
createView()
- Simply 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()
- This creates a scrollable component that is the default
view passed out by createView.
-
installUI(JComponent)
- Install the default keymap after the superclass does it's
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()
createUI
public static TextUI createUI(JTextField c)
createViewFactory
protected JTextUI. 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.
- Overrides:
- createViewFactory in class JTextUI
- See Also:
- create
installUI
public void installUI(JComponent c)
- Install the default keymap after the superclass does it's
thing.
- Overrides:
- installUI in class JTextUI
- See Also:
- installUI
createView
protected Component createView()
- Simply wraps the default view created with a beveled border
and background. This needs to also put a horizontal scroller
around the default view created.
- Overrides:
- createView in class JTextUI
createViewport
protected JTextUI. JTextView createViewport()
- This 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.
- Overrides:
- createViewport in class JTextUI
createController
protected TextController createController(JTextComponent c)
- This is defined to create the controller responsible binding
events to actions in the text field. This is basically a minor
extension of the default behavior.
- Overrides:
- createController in class JTextUI
All Packages Class Hierarchy This Package Previous Next Index