Methods Summary |
---|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent c)Creates a UI for the JTextPane.
return new SynthEditorPaneUI();
|
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()
JComponent c = getComponent();
Object clientProperty =
c.getClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES);
if (clientProperty == null
|| clientProperty == localFalse) {
c.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES,
localTrue);
}
updateStyle((JTextComponent)getComponent());
|
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.
|
void | paintBackground(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, javax.swing.JComponent c)
context.getPainter().paintEditorPaneBackground(context, g, 0, 0,
c.getWidth(), c.getHeight());
|
public void | paintBorder(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
context.getPainter().paintEditorPaneBorder(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 ActionMap based upon an
EditorKit change.
if (SynthLookAndFeel.shouldUpdateStyle(evt)) {
updateStyle((JTextComponent)evt.getSource());
}
super.propertyChange(evt);
|
protected void | uninstallDefaults()
SynthContext context = getContext(getComponent(), ENABLED);
JComponent c = getComponent();
c.putClientProperty("caretAspectRatio", null);
style.uninstallDefaults(context);
context.dispose();
style = null;
Object clientProperty =
c.getClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES);
if (clientProperty == localTrue) {
getComponent().putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES,
Boolean.FALSE);
}
super.uninstallDefaults();
|
public void | update(java.awt.Graphics g, javax.swing.JComponent c)
SynthContext context = getContext(c);
SynthLookAndFeel.update(context, g);
paintBackground(context, g, c);
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();
|