Methods Summary |
---|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent ta)Creates a UI for a JTextArea.
return new SynthTextAreaUI();
|
private int | getComponentState(javax.swing.JComponent c)
return SynthLookAndFeel.getComponentState(c);
|
public javax.swing.plaf.synth.SynthContext | getContext(javax.swing.JComponent c)
return getContext(c, getComponentState(c));
|
private javax.swing.plaf.synth.SynthContext | getContext(javax.swing.JComponent c, int state)
return SynthContext.getContext(SynthContext.class, c,
SynthLookAndFeel.getRegion(c), style, state);
|
protected void | installDefaults()
updateStyle((JTextComponent)getComponent());
|
public void | installUI(javax.swing.JComponent c)
super.installUI(c);
|
protected void | paint(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g)
super.paint(g, getComponent());
|
protected void | paintBackground(java.awt.Graphics g)
// Overriden to do nothing, all our painting is done from update/paint.
|
public void | paintBorder(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
context.getPainter().paintTextAreaBorder(context, g, x, y, w, h);
|
protected void | propertyChange(java.beans.PropertyChangeEvent evt)This method gets called when a bound property is changed
on the associated JTextComponent. This is a hook
which UI implementations may change to reflect how the
UI displays bound properties of JTextComponent subclasses.
This is implemented to rebuild the View when the
WrapLine or the WrapStyleWord property changes.
if (SynthLookAndFeel.shouldUpdateStyle(evt)) {
updateStyle((JTextComponent)evt.getSource());
}
super.propertyChange(evt);
|
protected void | uninstallDefaults()
SynthContext context = getContext(getComponent(), ENABLED);
getComponent().putClientProperty("caretAspectRatio", null);
style.uninstallDefaults(context);
context.dispose();
style = null;
super.uninstallDefaults();
|
public void | update(java.awt.Graphics g, javax.swing.JComponent c)
SynthContext context = getContext(c);
SynthLookAndFeel.update(context, g);
context.getPainter().paintTextAreaBackground(context,
g, 0, 0, c.getWidth(), c.getHeight());
paint(context, g);
context.dispose();
|
private void | updateStyle(javax.swing.text.JTextComponent comp)
SynthContext context = getContext(comp, ENABLED);
SynthStyle oldStyle = style;
style = SynthLookAndFeel.updateStyle(context, this);
if (style != oldStyle) {
SynthTextFieldUI.updateStyle(comp, context, getPropertyPrefix());
if (oldStyle != null) {
uninstallKeyboardActions();
installKeyboardActions();
}
}
context.dispose();
|