Package org.flexdock.plaf.theme
Class TitlebarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- org.flexdock.plaf.FlexViewComponentUI
-
- org.flexdock.plaf.theme.TitlebarUI
-
- All Implemented Interfaces:
IFlexViewComponentUI,XMLConstants
- Direct Known Subclasses:
MetalTitlebarUI,SkinLFTitlebarUI
public class TitlebarUI extends FlexViewComponentUI
- Author:
- Christopher Butler
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.ColoractiveBackgroundprotected javax.swing.border.BorderactiveBorderprotected java.awt.ColoractiveFontprotected java.lang.Objectantialiasingstatic java.lang.StringANTIALIASINGstatic java.lang.StringBACKGROUND_COLORstatic java.lang.StringBACKGROUND_COLOR_ACTIVEstatic java.lang.StringBORDERstatic java.lang.StringBORDER_ACTIVEprotected intbuttonMarginstatic java.lang.StringDEFAULT_HEIGHTprotected intdefaultHeightprotected IconMapdefaultIconsprotected java.awt.Fontfontstatic java.lang.StringFONTstatic java.lang.StringFONT_COLORstatic java.lang.StringFONT_COLOR_ACTIVEstatic java.lang.StringICON_INSETSprotected java.awt.InsetsiconInsetsprotected java.awt.ColorinactiveBackgroundprotected javax.swing.border.BorderinactiveBorderprotected java.awt.ColorinactiveFontprotected java.awt.Insetsinsetsstatic java.lang.StringINSETSstatic intMINIMUM_HEIGHTprotected Painterpainterstatic java.lang.StringPAINTER-
Fields inherited from class org.flexdock.plaf.FlexViewComponentUI
creationParameters
-
Fields inherited from interface org.flexdock.plaf.IFlexViewComponentUI
ICON_RESOURCE
-
Fields inherited from interface org.flexdock.plaf.XMLConstants
ATTRIBUTE_KEY, CLASSNAME_KEY, CONSTRUCTOR_KEY, DESC_KEY, EXTENDS_KEY, HANDLER_KEY, INHERITS_KEY, NAME_KEY, OVERRIDDEN_KEY, PROP_HANDLER_KEY, PROPERTY_KEY, REFERENCE_KEY, VALUE_KEY
-
-
Constructor Summary
Constructors Constructor Description TitlebarUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureAction(javax.swing.Action action)javax.swing.ActiongetAction(java.lang.String actionKey)java.awt.ColorgetActiveBackground()javax.swing.border.BordergetActiveBorder()java.awt.ColorgetActiveFont()protected java.awt.ColorgetBackgroundColor(boolean active)protected javax.swing.border.BordergetBorder(Titlebar titlebar)intgetButtonMargin()intgetDefaultHeight()IconMapgetDefaultIcons()java.awt.FontgetFont()protected java.awt.ColorgetFontColor(boolean active)java.awt.InsetsgetIconInsets()protected java.awt.RectanglegetIconRect(Titlebar titlebar)IconResourcegetIcons(java.lang.String key)IconResourcegetIcons(javax.swing.Action action)java.awt.ColorgetInactiveBackground()javax.swing.border.BordergetInactiveBorder()java.awt.ColorgetInactiveFont()java.awt.InsetsgetInsets()protected intgetLeftIconMargin()PaintergetPainter()protected java.awt.RectanglegetPaintRect(Titlebar titlebar)java.lang.StringgetPreferredButtonUI()java.awt.DimensiongetPreferredSize()protected intgetRightIconMargin()protected intgetTextLocation(java.awt.Rectangle iconRect)voidinitializeCreationParameters()voidinstallUI(javax.swing.JComponent c)booleanisAntialiasing()voidlayoutComponents(Titlebar titlebar)voidpaint(java.awt.Graphics g, javax.swing.JComponent jc)protected voidpaintBackground(java.awt.Graphics g, Titlebar titlebar)protected voidpaintBorder(java.awt.Graphics g, Titlebar titlebar)protected voidpaintIcon(java.awt.Graphics g, Titlebar titlebar)protected voidpaintTitle(java.awt.Graphics g, Titlebar titlebar)voidsetActiveBackground(java.awt.Color activeBackground)voidsetActiveBorder(javax.swing.border.Border activeBorder)voidsetActiveFont(java.awt.Color activeFont)voidsetAntialiasing(boolean antialias)voidsetButtonMargin(int buttonMargin)voidsetDefaultHeight(int defaultHeight)voidsetDefaultIcons(java.lang.String iconMapName)voidsetDefaultIcons(IconMap defaultIcons)voidsetFont(java.awt.Font font)voidsetIconInsets(java.awt.Insets iconInsets)voidsetInactiveBackground(java.awt.Color inactiveBackground)voidsetInactiveBorder(javax.swing.border.Border inactiveBorder)voidsetInactiveFont(java.awt.Color inactiveFont)voidsetInsets(java.awt.Insets insets)voidsetPainter(Painter painter)voiduninstallUI(javax.swing.JComponent c)-
Methods inherited from class org.flexdock.plaf.FlexViewComponentUI
getCreationParameters, setCreationParameters
-
-
-
-
Field Detail
-
DEFAULT_HEIGHT
public static final java.lang.String DEFAULT_HEIGHT
- See Also:
- Constant Field Values
-
FONT
public static final java.lang.String FONT
- See Also:
- Constant Field Values
-
FONT_COLOR
public static final java.lang.String FONT_COLOR
- See Also:
- Constant Field Values
-
FONT_COLOR_ACTIVE
public static final java.lang.String FONT_COLOR_ACTIVE
- See Also:
- Constant Field Values
-
BACKGROUND_COLOR
public static final java.lang.String BACKGROUND_COLOR
- See Also:
- Constant Field Values
-
BACKGROUND_COLOR_ACTIVE
public static final java.lang.String BACKGROUND_COLOR_ACTIVE
- See Also:
- Constant Field Values
-
BORDER
public static final java.lang.String BORDER
- See Also:
- Constant Field Values
-
BORDER_ACTIVE
public static final java.lang.String BORDER_ACTIVE
- See Also:
- Constant Field Values
-
PAINTER
public static final java.lang.String PAINTER
- See Also:
- Constant Field Values
-
INSETS
public static final java.lang.String INSETS
- See Also:
- Constant Field Values
-
ICON_INSETS
public static final java.lang.String ICON_INSETS
- See Also:
- Constant Field Values
-
ANTIALIASING
public static final java.lang.String ANTIALIASING
- See Also:
- Constant Field Values
-
MINIMUM_HEIGHT
public static final int MINIMUM_HEIGHT
- See Also:
- Constant Field Values
-
font
protected java.awt.Font font
-
activeFont
protected java.awt.Color activeFont
-
inactiveFont
protected java.awt.Color inactiveFont
-
activeBackground
protected java.awt.Color activeBackground
-
inactiveBackground
protected java.awt.Color inactiveBackground
-
activeBorder
protected javax.swing.border.Border activeBorder
-
inactiveBorder
protected javax.swing.border.Border inactiveBorder
-
defaultIcons
protected IconMap defaultIcons
-
painter
protected Painter painter
-
insets
protected java.awt.Insets insets
-
buttonMargin
protected int buttonMargin
-
iconInsets
protected java.awt.Insets iconInsets
-
antialiasing
protected java.lang.Object antialiasing
-
defaultHeight
protected int defaultHeight
-
-
Method Detail
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUIin classjavax.swing.plaf.ComponentUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.ComponentUI
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent jc)- Overrides:
paintin classjavax.swing.plaf.ComponentUI
-
paintBackground
protected void paintBackground(java.awt.Graphics g, Titlebar titlebar)
-
getPaintRect
protected java.awt.Rectangle getPaintRect(Titlebar titlebar)
-
paintTitle
protected void paintTitle(java.awt.Graphics g, Titlebar titlebar)
-
getTextLocation
protected int getTextLocation(java.awt.Rectangle iconRect)
-
paintIcon
protected void paintIcon(java.awt.Graphics g, Titlebar titlebar)
-
getIconRect
protected java.awt.Rectangle getIconRect(Titlebar titlebar)
-
getLeftIconMargin
protected int getLeftIconMargin()
-
getRightIconMargin
protected int getRightIconMargin()
-
paintBorder
protected void paintBorder(java.awt.Graphics g, Titlebar titlebar)
-
layoutComponents
public void layoutComponents(Titlebar titlebar)
-
configureAction
public void configureAction(javax.swing.Action action)
-
getFontColor
protected java.awt.Color getFontColor(boolean active)
-
getBackgroundColor
protected java.awt.Color getBackgroundColor(boolean active)
-
getBorder
protected javax.swing.border.Border getBorder(Titlebar titlebar)
-
getDefaultHeight
public int getDefaultHeight()
-
setDefaultHeight
public void setDefaultHeight(int defaultHeight)
-
getPreferredSize
public java.awt.Dimension getPreferredSize()
-
getActiveBackground
public java.awt.Color getActiveBackground()
- Returns:
- Returns the activeBackground.
-
setActiveBackground
public void setActiveBackground(java.awt.Color activeBackground)
- Parameters:
activeBackground- The activeBackground to set.
-
getActiveFont
public java.awt.Color getActiveFont()
- Returns:
- Returns the activeFont.
-
setActiveFont
public void setActiveFont(java.awt.Color activeFont)
- Parameters:
activeFont- The activeFont to set.
-
getInactiveBackground
public java.awt.Color getInactiveBackground()
- Returns:
- Returns the inactiveBackground.
-
setInactiveBackground
public void setInactiveBackground(java.awt.Color inactiveBackground)
- Parameters:
inactiveBackground- The inactiveBackground to set.
-
getInactiveFont
public java.awt.Color getInactiveFont()
- Returns:
- Returns the inactiveFont.
-
setInactiveFont
public void setInactiveFont(java.awt.Color inactiveFont)
- Parameters:
inactiveFont- The inactiveFont to set.
-
getFont
public java.awt.Font getFont()
- Returns:
- Returns the font.
-
setFont
public void setFont(java.awt.Font font)
- Parameters:
font- The font to set.
-
getDefaultIcons
public IconMap getDefaultIcons()
-
setDefaultIcons
public void setDefaultIcons(IconMap defaultIcons)
-
setDefaultIcons
public void setDefaultIcons(java.lang.String iconMapName)
-
getIcons
public IconResource getIcons(javax.swing.Action action)
-
getIcons
public IconResource getIcons(java.lang.String key)
-
getAction
public javax.swing.Action getAction(java.lang.String actionKey)
-
getInactiveBorder
public javax.swing.border.Border getInactiveBorder()
- Returns:
- Returns the inactiveBorder.
-
setInactiveBorder
public void setInactiveBorder(javax.swing.border.Border inactiveBorder)
- Parameters:
inactiveBorder- The inactiveBorder to set.
-
getActiveBorder
public javax.swing.border.Border getActiveBorder()
- Returns:
- Returns the activeBorder.
-
setActiveBorder
public void setActiveBorder(javax.swing.border.Border activeBorder)
- Parameters:
activeBorder- The activeBorder to set.
-
getIconInsets
public java.awt.Insets getIconInsets()
- Returns:
- Returns the iconInsets.
-
setIconInsets
public void setIconInsets(java.awt.Insets iconInsets)
- Parameters:
iconInsets- The iconInsets to set.
-
getButtonMargin
public int getButtonMargin()
- Returns:
- Returns the buttonMargin.
-
setButtonMargin
public void setButtonMargin(int buttonMargin)
- Parameters:
buttonMargin- The buttonMargin to set.
-
getPainter
public Painter getPainter()
- Returns:
- Returns the painterResource.
-
setPainter
public void setPainter(Painter painter)
- Parameters:
painter- The painter to set.
-
getInsets
public java.awt.Insets getInsets()
- Returns:
- Returns the insets.
-
setInsets
public void setInsets(java.awt.Insets insets)
- Parameters:
insets- The insets to set.
-
isAntialiasing
public boolean isAntialiasing()
- Returns:
- Returns the antialiasing.
-
setAntialiasing
public void setAntialiasing(boolean antialias)
- Parameters:
antialias- The antialias to set.
-
initializeCreationParameters
public void initializeCreationParameters()
- Specified by:
initializeCreationParametersin interfaceIFlexViewComponentUI- Specified by:
initializeCreationParametersin classFlexViewComponentUI
-
getPreferredButtonUI
public java.lang.String getPreferredButtonUI()
-
-