< prev index next >

src/share/classes/javax/swing/plaf/synth/SynthEditorPaneUI.java

Print this page
rev 1580 : 6727661: Code improvement and warnings removing from the swing/plaf packages
Summary: Removed unnecessary castings and other warnings
Reviewed-by: alexp
Contributed-by: Florian Brunner <fbrunnerlist@gmx.ch>

*** 43,54 **** private SynthStyle style; /* * I would prefer to use UIResource instad of this. * Unfortunately Boolean is a final class */ ! private Boolean localTrue = new Boolean(true); ! private Boolean localFalse = new Boolean(false); /** * Creates a UI for the JTextPane. * * @param c the JTextPane component --- 43,54 ---- private SynthStyle style; /* * I would prefer to use UIResource instad of this. * Unfortunately Boolean is a final class */ ! private Boolean localTrue = Boolean.TRUE; ! private Boolean localFalse = Boolean.FALSE; /** * Creates a UI for the JTextPane. * * @param c the JTextPane component
*** 67,77 **** if (clientProperty == null || clientProperty == localFalse) { c.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, localTrue); } ! updateStyle((JTextComponent)getComponent()); } protected void uninstallDefaults() { SynthContext context = getContext(getComponent(), ENABLED); JComponent c = getComponent(); --- 67,77 ---- if (clientProperty == null || clientProperty == localFalse) { c.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, localTrue); } ! updateStyle(getComponent()); } protected void uninstallDefaults() { SynthContext context = getContext(getComponent(), ENABLED); JComponent c = getComponent();
< prev index next >