table.put ( "Label.foreground", controlText );
table.put ( "Label.disabledForeground", StyleConstants.disabledTextColor );
// JTextFields
final Object textComponentBorder =
new SwingLazyValue ( "javax.swing.plaf.BorderUIResource.LineBorderUIResource", new Object[]{ StyleConstants.shadeColor } );
table.put ( "TextField.border", textComponentBorder );
// JTextAreas
table.put ( "TextArea.border", textComponentBorder );
// JEditorPanes
table.put ( "EditorPane.border", textComponentBorder );
// JTextPanes
table.put ( "TextPane.border", textComponentBorder );
// Option pane
table.put ( "OptionPane.messageAreaBorder",
new SwingLazyValue ( "javax.swing.plaf.BorderUIResource$EmptyBorderUIResource", new Object[]{ 0, 0, 5, 0 } ) );
table.put ( "OptionPane.isYesLast", SystemUtils.isMac () ? Boolean.TRUE : Boolean.FALSE );
// HTML image icons
table.put ( "html.pendingImage", StyleConstants.htmlPendingIcon );
table.put ( "html.missingImage", StyleConstants.htmlMissingIcon );
// Scroll bars minimum size
table.put ( "ScrollBar.minimumThumbSize", new Dimension ( WebScrollBarStyle.minThumbWidth, WebScrollBarStyle.minThumbHeight ) );
table.put ( "ScrollBar.width", new Integer ( 10 ) );
// Tree icons
table.put ( "Tree.openIcon", WebTreeUI.OPEN_ICON );
table.put ( "Tree.closedIcon", WebTreeUI.CLOSED_ICON );
table.put ( "Tree.leafIcon", WebTreeUI.LEAF_ICON );
table.put ( "Tree.collapsedIcon", WebTreeUI.EXPAND_ICON );
table.put ( "Tree.expandedIcon", WebTreeUI.COLLAPSE_ICON );
// Tree default selection style
table.put ( "Tree.textForeground", Color.BLACK );
table.put ( "Tree.textBackground", StyleConstants.transparent );
table.put ( "Tree.selectionForeground", Color.BLACK );
table.put ( "Tree.selectionBackground", StyleConstants.transparent );
table.put ( "Tree.selectionBorderColor", StyleConstants.transparent );
table.put ( "Tree.dropCellBackground", StyleConstants.transparent );
// Tree default renderer content margins
table.put ( "Tree.rendererMargins", new InsetsUIResource ( 4, 4, 4, 6 ) );
table.put ( "Tree.rendererFillBackground", Boolean.FALSE );
table.put ( "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE );
table.put ( "Tree.drawDashedFocusIndicator", Boolean.FALSE );
// Tree lines indent
table.put ( "Tree.leftChildIndent", new Integer ( 12 ) );
table.put ( "Tree.rightChildIndent", new Integer ( 12 ) );
table.put ( "Tree.lineTypeDashed", Boolean.TRUE );
// JMenu expand spacing
// Up-down menu expand
table.put ( "Menu.menuPopupOffsetX", new Integer ( 0 ) );
table.put ( "Menu.menuPopupOffsetY", new Integer ( 0 ) );
// Left-right menu expand
table.put ( "Menu.submenuPopupOffsetX", new Integer ( 0 ) );
table.put ( "Menu.submenuPopupOffsetY", new Integer ( 0 ) );
// JViewport
table.put ( "Viewport.background", WebViewportStyle.background );
// Table defaults
table.put ( "Table.cellNoFocusBorder", LafUtils.createWebBorder ( 1, 1, 1, 1 ) );
table.put ( "Table.focusSelectedCellHighlightBorder", LafUtils.createWebBorder ( 1, 1, 1, 1 ) );
table.put ( "Table.focusCellHighlightBorder", LafUtils.createWebBorder ( 1, 1, 1, 1 ) );
table.put ( "Table.foreground", WebTableStyle.foreground );
table.put ( "Table.background", WebTableStyle.background );
table.put ( "Table.selectionForeground", WebTableStyle.selectionForeground );
table.put ( "Table.selectionBackground", WebTableStyle.selectionBackground );
table.put ( "Table.scrollPaneBorder", null );
// Table header defaults
table.put ( "TableHeader.cellBorder", LafUtils.createWebBorder ( WebTableStyle.headerMargin ) );
table.put ( "TableHeader.focusCellBorder", LafUtils.createWebBorder ( WebTableStyle.headerMargin ) );
// Default list renderer
table.put ( "List.cellRenderer", new UIDefaults.ActiveValue ()
{
@Override
public Object createValue ( final UIDefaults table )
{
return new WebListCellRenderer.UIResource ();
}
} );
// List selection foreground
table.put ( "List.selectionForeground", WebListStyle.foreground );
// Combobox selection foregrounds
table.put ( "ComboBox.selectionForeground", Color.BLACK );
// Combobox non-square arrow
table.put ( "ComboBox.squareButton", false );
// Combobox empty padding
table.put ( "ComboBox.padding", new InsetsUIResource ( 0, 0, 0, 0 ) );
// Default components borders
table.put ( "ProgressBar.border", new SwingLazyValue ( "com.alee.laf.WebBorders", "getProgressBarBorder" ) );
table.put ( "Button.border", new SwingLazyValue ( "com.alee.laf.WebBorders", "getButtonBorder" ) );
// WebTextField actions
table.put ( "TextField.focusInputMap", new UIDefaults.LazyInputMap (
new Object[]{ "control C", DefaultEditorKit.copyAction, "control V", DefaultEditorKit.pasteAction, "control X",
DefaultEditorKit.cutAction, "COPY", DefaultEditorKit.copyAction, "PASTE", DefaultEditorKit.pasteAction, "CUT",