Package net.infonode.gui.laf
Class InfoNodeLookAndFeelTheme
java.lang.Object
net.infonode.gui.laf.InfoNodeLookAndFeelTheme
A theme for InfoNode look and feel. The theme infers some default colors from others, so modifying a color might
affect other, unmodified colors.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a default InfoNode look and feel theme.InfoNodeLookAndFeelTheme(String name, Color controlColor, Color primaryControlColor, Color backgroundColor, Color textColor) Creates a theme with custom colors.InfoNodeLookAndFeelTheme(String name, Color controlColor, Color primaryControlColor, Color backgroundColor, Color textColor, Color selectedBackgroundColor, Color selectedTextColor) Creates a theme with custom colors.InfoNodeLookAndFeelTheme(String name, Color controlColor, Color primaryControlColor, Color backgroundColor, Color textColor, Color selectedBackgroundColor, Color selectedTextColor, double shadingFactor) Creates a theme with custom colors. -
Method Summary
Modifier and TypeMethodDescriptionGets the background color for activeJInternalFrame's.Gets the foreground color for activeJInternalFrame's.Gets the gradient color for activeJInternalFrame's.Gets the margin of aJButton.Gets the background color used forJComponent.Gets the control dark shadow color.Gets the control highlight color.Gets the control light shadow color.Gets the control shadow color.Gets the desktop color used inJDesktopPaneetc.Gets the control focus marker color.getFont()Returns the base font.Gets the background color for inactiveJInternalFrame's.Gets the foreground color for inactiveJInternalFrame's.Gets the gradient color for inactiveJInternalFrame's.Gets the color used for inactive text.Gets the border used aroundJInternalFrame's.Gets the icon used in the close button in the title bar ofJInternalFrame's.Gets the icon to the left in the title bar ofJInternalFrame's.Gets the icon used in the iconify button in the title of aJInternalFrame.Gets the icon used in the maximize button in the title bar ofJInternalFrame's.Gets the icon used in the minimize button in the title bar ofJInternalFrame's.Gets the font used in the title ofJInternalFrame's.Gets the border used aroundJMenuBar's.getName()Returns the theme name.Gets the font used inJOptionPanebuttons.Gets the border of aJPopupMenu.Gets the color of scrollbar "knobs" etc.Gets the primary control dark shadow color.Gets the primary control highlight color.Gets the primary control shadow color.Gets the background color forJScrollBar's.Gets the background shadow color forJScrollBar's.intGets the width of aJScrollBar.Gets the background color used for selectedJMenuItem's.Gets the foreground color used for selectedJMenuItem's.Gets the selected text background color.Gets the selected text color.doubleReturns the shading factor.intGets the size of theJSplitPanedivider.Gets the border around cells inJTableHeader's.Gets the text color.Gets the border used aroundJTextField(including spinners etc.).Gets the background color forJToolTip.Gets the background color used inJToolTip.Gets the icon used with closed nodes in aJTree.Gets the background color used for collapse and expand icons in aJTree.Gets the icon used with leaf nodes in aJTree.Gets the icon used with open nodes in aJTree.voidsetActiveInternalFrameTitleBackgroundColor(Color activeInternalFrameTitleBackgroundColor) Sets the background color for the title of an activeJInternalFrame.voidsetActiveInternalFrameTitleForegroundColor(Color activeInternalFrameTitleForegroundColor) Sets the foreground color for the title of an activeJInternalFrame.voidsetActiveInternalFrameTitleGradientColor(Color activeInternalFrameTitleGradientColor) Sets the gradient color for the title of an activeJInternalFrame.voidvoidsetButtonMargin(InsetsUIResource buttonMargin) Sets the margin of aJButton.voidsetControlColor(Color color) Sets the background color forJComponent's.voidsetDesktopColor(Color desktopColor) Sets the background color for aJDesktopPane.voidsetFocusColor(Color focusColor) Sets the focus marker color.voidsetFont(FontUIResource font) Sets the base font.voidsetInactiveInternalFrameTitleBackgroundColor(Color inactiveInternalFrameTitleBackgroundColor) Sets the background color for the title of an inactiveJInternalFrame.voidsetInactiveInternalFrameTitleForegroundColor(Color inactiveInternalFrameTitleForegroundColor) Sets the foreground color for the title of an inactiveJInternalFrame.voidsetInactiveInternalFrameTitleGradientColor(Color inactiveInternalFrameTitleGradientColor) Sets the gradient color for the title of an inactiveJInternalFrame.voidsetInactiveTextColor(Color inactiveTextColor) Sets the inactive text color.voidsetInternalFrameBorder(BorderUIResource internalFrameBorder) Sets the border used aroundJInternalFrame's.voidsetInternalFrameCloseIcon(IconUIResource internalFrameCloseIcon) Sets the icon used in the close button in the title bar ofJInternalFrame's.voidsetInternalFrameIcon(IconUIResource internalFrameIcon) Sets the icon to the left in the title bar ofJInternalFrame's.voidsetInternalFrameIconifyIcon(IconUIResource internalFrameIconifyIcon) Sets the icon used in the iconify button in the title of aJInternalFrame.voidsetInternalFrameMaximizeIcon(IconUIResource internalFrameMaximizeIcon) Sets the icon used in the maximize button in the title bar ofJInternalFrame's.voidsetInternalFrameMinimizeIcon(IconUIResource internalFrameMinimizeIcon) Sets the icon used in the minimize button in the title bar ofJInternalFrame's.voidsetInternalFrameTitleFont(Font frameTitleFont) Sets the title font of anJInternalFrame.voidsetInternalFrameTitleFont(FontUIResource internalFrameTitleFont) Sets the font used in the title ofJInternalFrame's.voidsetListFocusedItemBorder(BorderUIResource listFocusedItemBorder) voidsetListItemBorder(BorderUIResource listItemBorder) voidsetMenuBarBorder(BorderUIResource menuBarBorder) Sets the border used aroundJMenuBar's.voidsetOptionPaneButtonFont(Font optionPaneButtonFont) Sets the button font for aJOptionPane.voidsetOptionPaneButtonFont(FontUIResource optionPaneButtonFont) Sets the font used inJOptionPanebuttons.voidsetPopupMenuBorder(BorderUIResource popupMenuBorder) Sets the border of aJPopupMenu.voidSets the primary control background color used in scroll bar knobs etc.voidsetScrollBarBackgroundColor(Color scrollBarBackgroundColor) Sets theJScrollBarbackground color.voidsetScrollBarWidth(int scrollBarWidth) Sets the width of aJScrollBar.voidsetSelectedMenuBackgroundColor(Color selectedMenuBackgroundColor) Sets the background color for a selected menu item.voidsetSelectedMenuForegroundColor(Color selectedMenuForegroundColor) Sets the foreground color for a selected menu item.voidsetSelectedTextBackgroundColor(Color selectedTextBackgroundColor) Sets the selected text background color.voidsetSelectedTextColor(Color selectedTextColor) Sets the selected text color.voidsetShadingFactor(double shadingFactor) Sets the shading factor.voidsetSplitPaneDividerSize(int splitPaneDividerSize) Sets the size of theJSplitPanedivider.voidsetTableHeaderCellBorder(BorderUIResource tableHeaderCellBorder) Sets the border for the cells of aJTableHeader.voidSets the text color.voidsetTextFieldBorder(BorderUIResource textFieldBorder) Sets the border used aroundJTextField(including spinners etc.).voidsetTooltipBackgroundColor(Color tooltipBackgroundColor) Sets the tooltip background color.voidsetTooltipForegroundColor(ColorUIResource tooltipForegroundColor) Sets the foreground color used inJToolTip.voidsetTreeClosedIcon(IconUIResource treeClosedIcon) Sets the icon used with closed nodes in aJTree.voidsetTreeIconBackgroundColor(Color treeIconBackgroundColor) Sets the background color for the expand/collapse icons in aJTree.voidsetTreeLeafIcon(IconUIResource treeLeafIcon) Sets the icon used with leaf nodes in aJTree.voidsetTreeOpenIcon(IconUIResource treeOpenIcon) Sets the icon used with open nodes in aJTree.
-
Field Details
-
DEFAULT_CONTROL_COLOR
-
DEFAULT_PRIMARY_CONTROL_COLOR
-
DEFAULT_BACKGROUND_COLOR
-
DEFAULT_TEXT_COLOR
-
DEFAULT_SELECTED_BACKGROUND_COLOR
-
DEFAULT_SELECTED_TEXT_COLOR
-
DEFAULT_TOOLTIP_BACKGROUND_COLOR
-
DEFAULT_TOOLTIP_FOREGROUND_COLOR
-
DEFAULT_DESKTOP_COLOR
-
DEFAULT_FONT_SIZE
public static final int DEFAULT_FONT_SIZE- See Also:
-
-
Constructor Details
-
InfoNodeLookAndFeelTheme
public InfoNodeLookAndFeelTheme()Creates a default InfoNode look and feel theme. -
InfoNodeLookAndFeelTheme
public InfoNodeLookAndFeelTheme(String name, Color controlColor, Color primaryControlColor, Color backgroundColor, Color textColor) Creates a theme with custom colors.- Parameters:
name- the name of this themecontrolColor- the background color for buttons, labels etc.primaryControlColor- the color of scrollbar "knobs", text and menu selection backgroundbackgroundColor- the background color for viewports, tree's, tables etc.textColor- the text color
-
InfoNodeLookAndFeelTheme
public InfoNodeLookAndFeelTheme(String name, Color controlColor, Color primaryControlColor, Color backgroundColor, Color textColor, Color selectedBackgroundColor, Color selectedTextColor) Creates a theme with custom colors.- Parameters:
name- the name of this themecontrolColor- the background color for buttons, labels etc.primaryControlColor- the color of scrollbar "knobs"backgroundColor- the background color for viewports, tree's, tables etc.textColor- the text colorselectedBackgroundColor- the background color for selected text, selected menu itemsselectedTextColor- the text color for selected text, selected menu items
-
InfoNodeLookAndFeelTheme
public InfoNodeLookAndFeelTheme(String name, Color controlColor, Color primaryControlColor, Color backgroundColor, Color textColor, Color selectedBackgroundColor, Color selectedTextColor, double shadingFactor) Creates a theme with custom colors.- Parameters:
name- the name of this themecontrolColor- the background color for buttons, labels etc.primaryControlColor- the color of scrollbar "knobs"backgroundColor- the background color for viewports, tree's, tables etc.textColor- the text colorselectedBackgroundColor- the background color for selected text, selected menu itemsselectedTextColor- the text color for selected text, selected menu itemsshadingFactor- the shading factor is used when calculating brighter and darker control colors. A higher factor gives brighter and darker colors.
-
-
Method Details
-
getName
Returns the theme name.- Returns:
- the theme name
-
getShadingFactor
public double getShadingFactor()Returns the shading factor. The shading factor is used when calculating brighter and darker control colors. A higher factor gives brighter and darker colors.- Returns:
- the shading factor
-
setShadingFactor
public void setShadingFactor(double shadingFactor) Sets the shading factor. The shading factor is used when calculating brighter and darker control colors. A higher factor gives brighter and darker colors.- Parameters:
shadingFactor- the shading factor
-
getFont
Returns the base font. This font is used as default font for all text.- Returns:
- returns the base font
-
setFont
Sets the base font. This font is used as default font for all text.- Parameters:
font- the base font
-
getControlColor
Gets the background color used forJComponent.- Returns:
- the background color used for
JComponent
-
getPrimaryControlColor
Gets the color of scrollbar "knobs" etc.- Returns:
- the color of scrollbar "knobs" etc,
-
getBackgroundColor
-
getTextColor
Gets the text color.- Returns:
- the text color
-
getSelectedTextBackgroundColor
Gets the selected text background color.- Returns:
- the selected text background color
-
getFocusColor
Gets the control focus marker color.- Returns:
- the control focus marker color
-
getSelectedTextColor
Gets the selected text color.- Returns:
- the selected text color
-
getTooltipBackgroundColor
Gets the background color forJToolTip.- Returns:
- the background color for
JToolTip
-
getDesktopColor
Gets the desktop color used inJDesktopPaneetc.- Returns:
- the desktop color used in
JDesktopPaneetc.
-
getTreeIconBackgroundColor
Gets the background color used for collapse and expand icons in aJTree.- Returns:
- the background color used for collapse and expand icons in a
JTree
-
getSelectedMenuBackgroundColor
Gets the background color used for selectedJMenuItem's.- Returns:
- the background color used for selected
JMenuItem's
-
getSelectedMenuForegroundColor
Gets the foreground color used for selectedJMenuItem's.- Returns:
- the foreground color used for selected
JMenuItem's
-
getInactiveTextColor
Gets the color used for inactive text.- Returns:
- the color used for inactive text
-
getControlHighlightColor
Gets the control highlight color. By default this is a color a little brighter than the control color.- Returns:
- the control highlight color
-
getControlLightShadowColor
Gets the control light shadow color. By default this is a color a little darker than the control color.- Returns:
- the control light shadow color
-
getControlShadowColor
Gets the control shadow color. By default this is a color a little darker than the control light shadow color.- Returns:
- the control shadow color
-
getControlDarkShadowColor
Gets the control dark shadow color. By default this is a color a little darker than the control shadow color.- Returns:
- the control dark shadow color
-
getPrimaryControlHighlightColor
Gets the primary control highlight color. By default this color is the same as the control highlight color..- Returns:
- the primary control highlight color
-
getPrimaryControlShadowColor
Gets the primary control shadow color. By default this is a color a little darker than the primary control color.- Returns:
- the primary control shadow color
-
getPrimaryControlDarkShadowColor
Gets the primary control dark shadow color. By default this is a color a little darker than the primary control shadow color.- Returns:
- the primary control dark shadow color
-
getScrollBarBackgroundColor
Gets the background color forJScrollBar's.- Returns:
- the background color for
JScrollBar's
-
getScrollBarBackgroundShadowColor
Gets the background shadow color forJScrollBar's. By default this is a color a little darker than the scroll bar background color.- Returns:
- the background color for
JScrollBar's.
-
getActiveInternalFrameTitleBackgroundColor
Gets the background color for activeJInternalFrame's.- Returns:
- the background color for active
JInternalFrame's
-
getActiveInternalFrameTitleForegroundColor
Gets the foreground color for activeJInternalFrame's.- Returns:
- the foreground color for active
JInternalFrame's
-
getActiveInternalFrameTitleGradientColor
Gets the gradient color for activeJInternalFrame's.- Returns:
- the gradient color for active
JInternalFrame's
-
getInactiveInternalFrameTitleBackgroundColor
Gets the background color for inactiveJInternalFrame's.- Returns:
- the background color for inactive
JInternalFrame's
-
getInactiveInternalFrameTitleForegroundColor
Gets the foreground color for inactiveJInternalFrame's.- Returns:
- the foreground color for inactive
JInternalFrame's
-
getInactiveInternalFrameTitleGradientColor
Gets the gradient color for inactiveJInternalFrame's.- Returns:
- the gradient color for inactive
JInternalFrame's
-
getTableHeaderCellBorder
Gets the border around cells inJTableHeader's.- Returns:
- the border around cells in
JTableHeader's
-
getInternalFrameIcon
Gets the icon to the left in the title bar ofJInternalFrame's.- Returns:
- the icon to the left in the title bar of
JInternalFrame's
-
setInternalFrameIcon
Sets the icon to the left in the title bar ofJInternalFrame's.- Parameters:
internalFrameIcon- the icon
-
getInternalFrameMinimizeIcon
Gets the icon used in the minimize button in the title bar ofJInternalFrame's.- Returns:
- the icon used in the minimize button in the title bar of
JInternalFrame's
-
setInternalFrameMinimizeIcon
Sets the icon used in the minimize button in the title bar ofJInternalFrame's.- Parameters:
internalFrameMinimizeIcon- the icon
-
getInternalFrameMaximizeIcon
Gets the icon used in the maximize button in the title bar ofJInternalFrame's.- Returns:
- the icon used in the minimize button in the title bar of
JInternalFrame's
-
setInternalFrameMaximizeIcon
Sets the icon used in the maximize button in the title bar ofJInternalFrame's.- Parameters:
internalFrameMaximizeIcon- the icon
-
getInternalFrameCloseIcon
Gets the icon used in the close button in the title bar ofJInternalFrame's.- Returns:
- the icon used in the close button in the title bar of
JInternalFrame's
-
setInternalFrameCloseIcon
Sets the icon used in the close button in the title bar ofJInternalFrame's.- Parameters:
internalFrameCloseIcon- the icon
-
getInternalFrameBorder
Gets the border used aroundJInternalFrame's.- Returns:
- the border used around
JInternalFrame's
-
setInternalFrameBorder
Sets the border used aroundJInternalFrame's.- Parameters:
internalFrameBorder- the border used aroundJInternalFrame's
-
getInternalFrameTitleFont
Gets the font used in the title ofJInternalFrame's. Defaults to the text font with bold style.- Returns:
- the font used in the title of
JInternalFrame's
-
setInternalFrameTitleFont
Sets the font used in the title ofJInternalFrame's. Defaults to the text font with bold style.- Parameters:
internalFrameTitleFont- the font
-
setControlColor
Sets the background color forJComponent's.- Parameters:
color- the control color
-
setPrimaryControlColor
Sets the primary control background color used in scroll bar knobs etc.- Parameters:
c- the primary control background color
-
setBackgroundColor
-
setTextColor
Sets the text color.- Parameters:
c- the text color
-
getOptionPaneButtonFont
Gets the font used inJOptionPanebuttons. Defaults to the text font with bold style.- Returns:
- the font used in
JOptionPanebuttons
-
setOptionPaneButtonFont
Sets the font used inJOptionPanebuttons. Defaults to the text font with bold style.- Parameters:
optionPaneButtonFont- the font used inJOptionPanebuttons
-
getSplitPaneDividerSize
public int getSplitPaneDividerSize()Gets the size of theJSplitPanedivider.- Returns:
- the size of the
JSplitPanedivider
-
setSplitPaneDividerSize
public void setSplitPaneDividerSize(int splitPaneDividerSize) Sets the size of theJSplitPanedivider.- Parameters:
splitPaneDividerSize- the size of theJSplitPanedivider
-
getTextFieldBorder
Gets the border used aroundJTextField(including spinners etc.).- Returns:
- the border used around
JTextField
-
setTextFieldBorder
Sets the border used aroundJTextField(including spinners etc.).- Parameters:
textFieldBorder- the border used aroundJTextField
-
getTreeOpenIcon
Gets the icon used with open nodes in aJTree.- Returns:
- the icon used with open nodes in a
JTree
-
setTreeOpenIcon
Sets the icon used with open nodes in aJTree.- Parameters:
treeOpenIcon- the icon used with open nodes in aJTree
-
getTreeClosedIcon
Gets the icon used with closed nodes in aJTree.- Returns:
- the icon used with closed nodes in a
JTree
-
setTreeClosedIcon
Sets the icon used with closed nodes in aJTree.- Parameters:
treeClosedIcon- the icon used with closed nodes in aJTree
-
getTreeLeafIcon
Gets the icon used with leaf nodes in aJTree.- Returns:
- the icon used with leaf nodes in a
JTree
-
setTreeLeafIcon
Sets the icon used with leaf nodes in aJTree.- Parameters:
treeLeafIcon- the icon used with leaf nodes in aJTree
-
getMenuBarBorder
Gets the border used aroundJMenuBar's.- Returns:
- the border used around
JMenuBar's
-
setMenuBarBorder
Sets the border used aroundJMenuBar's.- Parameters:
menuBarBorder- the border used aroundJMenuBar's
-
setSelectedTextBackgroundColor
Sets the selected text background color.- Parameters:
selectedTextBackgroundColor- the selected text background color
-
setFocusColor
Sets the focus marker color.- Parameters:
focusColor- the focus marker color
-
setSelectedTextColor
Sets the selected text color.- Parameters:
selectedTextColor- the selected text color
-
setTooltipBackgroundColor
Sets the tooltip background color.- Parameters:
tooltipBackgroundColor- the tooltip background color
-
setDesktopColor
Sets the background color for aJDesktopPane.- Parameters:
desktopColor- the background color for aJDesktopPane
-
setTreeIconBackgroundColor
Sets the background color for the expand/collapse icons in aJTree.- Parameters:
treeIconBackgroundColor- the background color for the expand/collapse icons in aJTree
-
setSelectedMenuBackgroundColor
Sets the background color for a selected menu item.- Parameters:
selectedMenuBackgroundColor- the background color for a selected menu item
-
setSelectedMenuForegroundColor
Sets the foreground color for a selected menu item.- Parameters:
selectedMenuForegroundColor- the foreground color for a selected menu item
-
setInactiveTextColor
Sets the inactive text color.- Parameters:
inactiveTextColor- the inactive text color
-
setScrollBarBackgroundColor
Sets theJScrollBarbackground color.- Parameters:
scrollBarBackgroundColor- theJScrollBarbackground color
-
setActiveInternalFrameTitleBackgroundColor
public void setActiveInternalFrameTitleBackgroundColor(Color activeInternalFrameTitleBackgroundColor) Sets the background color for the title of an activeJInternalFrame.- Parameters:
activeInternalFrameTitleBackgroundColor- the background color for the title of an activeJInternalFrame
-
setActiveInternalFrameTitleForegroundColor
public void setActiveInternalFrameTitleForegroundColor(Color activeInternalFrameTitleForegroundColor) Sets the foreground color for the title of an activeJInternalFrame.- Parameters:
activeInternalFrameTitleForegroundColor- the background color for the title of an activeJInternalFrame
-
setActiveInternalFrameTitleGradientColor
Sets the gradient color for the title of an activeJInternalFrame.- Parameters:
activeInternalFrameTitleGradientColor- the gradient color for the title of an activeJInternalFrame
-
setInactiveInternalFrameTitleBackgroundColor
public void setInactiveInternalFrameTitleBackgroundColor(Color inactiveInternalFrameTitleBackgroundColor) Sets the background color for the title of an inactiveJInternalFrame.- Parameters:
inactiveInternalFrameTitleBackgroundColor- the background color for the title of an inactiveJInternalFrame
-
setInactiveInternalFrameTitleForegroundColor
public void setInactiveInternalFrameTitleForegroundColor(Color inactiveInternalFrameTitleForegroundColor) Sets the foreground color for the title of an inactiveJInternalFrame.- Parameters:
inactiveInternalFrameTitleForegroundColor- the background color for the title of an activeJInternalFrame
-
setInactiveInternalFrameTitleGradientColor
public void setInactiveInternalFrameTitleGradientColor(Color inactiveInternalFrameTitleGradientColor) Sets the gradient color for the title of an inactiveJInternalFrame.- Parameters:
inactiveInternalFrameTitleGradientColor- the gradient color for the title of an inactiveJInternalFrame
-
setInternalFrameTitleFont
Sets the title font of anJInternalFrame.- Parameters:
frameTitleFont- the title font of anJInternalFrame
-
setOptionPaneButtonFont
Sets the button font for aJOptionPane. Default to the text font with bold style.- Parameters:
optionPaneButtonFont- the button font for aJOptionPane
-
setTableHeaderCellBorder
Sets the border for the cells of aJTableHeader.- Parameters:
tableHeaderCellBorder- the border for the cells of aJTableHeader
-
getScrollBarWidth
public int getScrollBarWidth()Gets the width of aJScrollBar.- Returns:
- the width of a
JScrollBar
-
setScrollBarWidth
public void setScrollBarWidth(int scrollBarWidth) Sets the width of aJScrollBar.- Parameters:
scrollBarWidth- the width of aJScrollBar
-
getButtonMargin
Gets the margin of aJButton.- Returns:
- the margin of a
JButton
-
setButtonMargin
Sets the margin of aJButton.- Parameters:
buttonMargin- the margin of aJButton
-
getPopupMenuBorder
Gets the border of aJPopupMenu.- Returns:
- the border of a
JPopupMenu
-
setPopupMenuBorder
Sets the border of aJPopupMenu.- Parameters:
popupMenuBorder- the border of aJPopupMenu
-
getInternalFrameIconifyIcon
Gets the icon used in the iconify button in the title of aJInternalFrame.- Returns:
- the icon used in the iconify button in the title of a
JInternalFrame
-
setInternalFrameIconifyIcon
Sets the icon used in the iconify button in the title of aJInternalFrame.- Parameters:
internalFrameIconifyIcon- the icon used in the iconify button in the title of aJInternalFrame
-
getTooltipForegroundColor
Gets the background color used inJToolTip.- Returns:
- the background color used in
JToolTip
-
setTooltipForegroundColor
Sets the foreground color used inJToolTip.- Parameters:
tooltipForegroundColor- the foreground color used inJToolTip
-
getListItemBorder
-
setListItemBorder
-
getListFocusedItemBorder
-
setListFocusedItemBorder
-