// Initialize search field "find" button
String p = "TextField:SearchFieldFindButton";
d.put(p + ".States", "Enabled,Pressed,Disabled,HasPopup");
d.put(p + ".HasPopup", new SearchFieldHasPopupState());
d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
d.put(p + "[Disabled].foregroundPainter", new LazyPainter(ci, SearchFieldIconPainter.Which.FIND_ICON_DISABLED));
d.put(p + "[Enabled].foregroundPainter", new LazyPainter(ci, SearchFieldIconPainter.Which.FIND_ICON_ENABLED));
d.put(p + "[Pressed].foregroundPainter", new LazyPainter(ci, SearchFieldIconPainter.Which.FIND_ICON_ENABLED));
d.put(p + "[Enabled+HasPopup].foregroundPainter",
new LazyPainter(ci, SearchFieldIconPainter.Which.FIND_ICON_ENABLED_POPUP));
d.put(p + "[Pressed+HasPopup].foregroundPainter",
new LazyPainter(ci, SearchFieldIconPainter.Which.FIND_ICON_ENABLED_POPUP));
// Initialize search field "cancel" button
p = "TextField:SearchFieldCancelButton";
d.put(p + ".States", "Enabled,Pressed,Disabled");
d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
d.put(p + "[Disabled].foregroundPainter", new LazyPainter(ci, SearchFieldIconPainter.Which.CANCEL_ICON_DISABLED));
d.put(p + "[Enabled].foregroundPainter", new LazyPainter(ci, SearchFieldIconPainter.Which.CANCEL_ICON_ENABLED));
d.put(p + "[Pressed].foregroundPainter", new LazyPainter(ci, SearchFieldIconPainter.Which.CANCEL_ICON_PRESSED));
p = "TextField";
d.put(p + ".States", "Enabled,Selected,Disabled,Focused,SearchField");
d.put(p + ".SearchField", new TextFieldIsSearchState());
d.put(p + ".searchIconWidth", new Integer(15));
d.put(p + ".cancelIconWidth", new Integer(15));
d.put(p + ".popupIconWidth", new Integer(7));
d.put(p + ".searchLeftInnerMargin", new Integer(3));
d.put(p + ".searchRightInnerMargin", new Integer(3));
d.put(p + ".placeholderTextColor", d.get("seaGlassSearchPlaceholderText"));
d.put(p + ".contentMargins", new InsetsUIResource(4, 6, 4, 6));
d.put(p + "[Selected].textForeground", Color.WHITE);
d.put(p + "[Selected].textBackground", d.get("seaGlassSelection"));
d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0, 0, 0, 0, true));
d.put(p + "[SearchField].contentMargins", new InsetsUIResource(4, 26, 4, 23));
// Initialize TextField
d.put(p + ".background", getDerivedColor("seaGlassLightBackground", 0.0f, 0.0f, 0.0f, 0, true));
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_ENABLED));
// Paint with SearchFieldPainter.
d.put(p + "[Disabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_ENABLED));
// Initialize FormattedTextField
p = "FormattedTextField";
d.put(p + ".States", "Enabled,Selected,Disabled,Focused,SearchField");
d.put(p + ".SearchField", new TextFieldIsSearchState());
d.put(p + ".contentMargins", new InsetsUIResource(4, 6, 4, 6));
d.put(p + ".searchIconWidth", new Integer(15));
d.put(p + ".cancelIconWidth", new Integer(15));
d.put(p + ".popupIconWidth", new Integer(7));
d.put(p + ".searchLeftInnerMargin", new Integer(3));
d.put(p + ".searchRightInnerMargin", new Integer(3));
d.put(p + ".placeholderTextColor", d.get("seaGlassSearchPlaceholderText"));
d.put(p + ".background", getDerivedColor("seaGlassLightBackground", 0.0f, 0.0f, 0.0f, 0, true));
d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0, 0, 0, 0, true));
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_ENABLED));
// Paint with SearchFieldPainter.
d.put(p + "[Disabled+SearchField].textForeground", getDerivedColor("seaGlassDisabledText", 0, 0, 0, 0, true));
d.put(p + "[Disabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_ENABLED));
// Initialize PasswordField
p = "PasswordField";
d.put(p + ".contentMargins", new InsetsUIResource(4, 6, 4, 6));
d.put(p + ".searchIconWidth", new Integer(15));
d.put(p + ".cancelIconWidth", new Integer(15));
d.put(p + ".popupIconWidth", new Integer(7));
d.put(p + ".echoChar", Character.valueOf((char) 0x2022));
d.put(p + ".searchLeftInnerMargin", new Integer(3));
d.put(p + ".searchRightInnerMargin", new Integer(3));
d.put(p + ".placeholderTextColor", d.get("seaGlassSearchPlaceholderText"));
d.put(p + ".background", getDerivedColor("seaGlassLightBackground", 0.0f, 0.0f, 0.0f, 0, true));
d.put(p + "[Selected].textForeground", Color.WHITE);
d.put(p + "[Selected].textBackground", d.get("seaGlassSelection"));
d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0, 0, 0, 0, true));
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_ENABLED));
// Paint with SearchFieldPainter.
d.put(p + "[Disabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_ENABLED));
// Initialize TextArea
// TextArea in scroll pane is visually the same as editor pane.
p = "TextArea";
d.put(p + ".contentMargins", new InsetsUIResource(4, 6, 4, 6));
d.put(p + ".States", "Enabled,MouseOver,Pressed,Selected,Disabled,Focused,NotInScrollPane");
d.put(p + ".NotInScrollPane", new TextAreaNotInScrollPaneState());
d.put(p + ".background", getDerivedColor("seaGlassLightBackground", 0.0f, 0.0f, 0.0f, 0, true));
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SOLID_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SOLID_ENABLED));
d.put(p + "[Selected].textForeground", Color.WHITE);
d.put(p + "[Selected].textBackground", d.get("seaGlassSelection"));
d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0, 0, 0, 0, true));
// Rossi: TextArea painters to support new Client Property to draw "lines"
d.put(p + "[Disabled].backgroundPainter",
new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled].backgroundPainter",
new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_ENABLED));
// TextArea not in scroll pane is visually the same as TextField.
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled+NotInScrollPane].backgroundPainter",
new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled+NotInScrollPane].backgroundPainter",
new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Disabled+NotInScrollPane].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused+NotInScrollPane].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled+NotInScrollPane].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_ENABLED));
// Initialize TextPane
p = "TextPane";
d.put(p + ".contentMargins", new InsetsUIResource(4, 6, 4, 6));
d.put(p + ".opaque", Boolean.TRUE);
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SOLID_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SOLID_ENABLED));
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Selected].textForeground", Color.WHITE);
d.put(p + "[Selected].textBackground", d.get("seaGlassSelection"));
d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0, 0, 0, 0, true));
// Initialize EditorPane
p = "EditorPane";
d.put(p + ".contentMargins", new InsetsUIResource(4, 6, 4, 6));
d.put(p + ".opaque", Boolean.TRUE);
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SOLID_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SOLID_ENABLED));
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Selected].textForeground", Color.WHITE);
d.put(p + "[Selected].textBackground", d.get("seaGlassSelection"));
d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0, 0, 0, 0, true));
p = "Label";
d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0.0f, 0.0f, 0.0f, 0, true));
}