public class SynthTextFieldUI extends BasicTextFieldUIimplements SynthUI
JTextField.
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
BasicTextUI.BasicCaret , BasicTextUI.BasicHighlighter DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| Constructor and Description |
|---|
SynthTextFieldUI()
|
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent
Creates a UI for a JTextField.
|
SynthContext |
getContext(JComponent
Returns the Context for the specified component.
|
protected void |
installDefaults()
Initializes component properties, such as font, foreground, background, caret color, selection color, selected text color, disabled text color, and border color.
|
protected void |
paint(SynthContext
Paints the specified component.
|
protected void |
paintBackground(Graphics
Paints a background for the view.
|
void |
paintBorder(SynthContext
Paints the border.
|
protected void |
propertyChange(PropertyChangeEvent
This method gets called when a bound property is changed on the associated JTextComponent.
|
protected void |
uninstallDefaults()
Sets the component properties that have not been explicitly overridden to
null.
|
void |
update(Graphics
Notifies this UI delegate to repaint the specified component.
|
create, getBaseline, getBaselineResizeBehavior, getPropertyPrefixcreate, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, getVisibleEditorRect, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintSafely, setView, uninstallKeyboardActions, uninstallListeners, uninstallUI, viewToModel, viewToModelcontains, getAccessibleChild, getAccessibleChildrenCountpublic static ComponentUIcreateUI(JComponent c)
c - the text field
public SynthContextgetContext(JComponent c)
getContext in interface
SynthUI
c - Component requesting SynthContext.
public void update(Graphicsg, JComponent c)
paint(SynthContext,Graphics) method.
In general, this method does not need to be overridden by subclasses. All Look and Feel rendering code should reside in the paint method.
update in class
BasicTextUI
g - the
Graphics object used for painting
c - the component being painted
paint(SynthContext,Graphics)
protected void paint(SynthContextcontext, Graphics g)
This is routed to the BasicTextUI method under the guarantee that the model does not change from the view of this thread while it is rendering (if the associated model is derived from AbstractDocument). This enables the model to potentially be updated asynchronously.
context - context for the component being painted
g - the
Graphics object used for painting
update(Graphics,JComponent)
public void paintBorder(SynthContextcontext, Graphics g, int x, int y, int w, int h)
paintBorder in interface
SynthUI
context - a component context
g -
Graphics to paint on
x - the X coordinate
y - the Y coordinate
w - width of the border
h - height of the border
protected void paintBackground(Graphicsg)
paintBackground in class
BasicTextUI
g - the graphics context
protected void propertyChange(PropertyChangeEventevt)
propertyChange in class
BasicTextUI
evt - the property change event
protected void installDefaults()
installDefaults in class
BasicTextUI
BasicTextUI.uninstallDefaults() ,
BasicTextUI.installUI(javax.swing.JComponent)
protected void uninstallDefaults()
null. A property is considered overridden if its current value is not a
UIResource.
uninstallDefaults in class
BasicTextUI
BasicTextUI.installDefaults() ,
BasicTextUI.uninstallUI(javax.swing.JComponent)