javax.swing.plaf.basic
Class BasicTextFieldUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TextUI
javax.swing.plaf.basic.BasicTextUI
javax.swing.plaf.basic.BasicTextFieldUI
- All Implemented Interfaces:
- ViewFactory
- Direct Known Subclasses:
- BasicFormattedTextFieldUI, BasicPasswordFieldUI, MetalTextFieldUI
public class BasicTextFieldUI
- extends BasicTextUI
Methods inherited from class javax.swing.plaf.basic.BasicTextUI |
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicTextFieldUI
public BasicTextFieldUI()
create
public View create(Element elem)
- Description copied from class:
BasicTextUI
- Creates a
View
for the specified Element
.
- Specified by:
create
in interface ViewFactory
- Overrides:
create
in class BasicTextUI
- Parameters:
elem
- the Element
to create a View
for
- Returns:
- a new created view
- See Also:
ViewFactory
createUI
public static ComponentUI createUI(JComponent c)
getPropertyPrefix
protected String getPropertyPrefix()
- Returns the prefix for entries in the
UIDefaults
table.
- Specified by:
getPropertyPrefix
in class BasicTextUI
- Returns:
- "TextField"
installUI
public void installUI(JComponent c)
- Description copied from class:
BasicTextUI
- Installs this UI on the text component.
- Overrides:
installUI
in class BasicTextUI
- Parameters:
c
- the text component on which to install the UI- See Also:
ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
propertyChange
protected void propertyChange(PropertyChangeEvent event)
- Receives notification whenever one of the text component's bound
properties changes. Here we check for the editable and enabled
properties and adjust the background color accordingly.
The colors are only changed if they are not a
ColorUIResource
.
- Overrides:
propertyChange
in class BasicTextUI
- Parameters:
event
- the property change event