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
- Author:
- Christopher Butler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Colorprotected Borderprotected Colorprotected Objectstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected intstatic final Stringprotected intprotected IconMapprotected Fontstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Insetsprotected Colorprotected Borderprotected Colorprotected Insetsstatic final Stringstatic final intprotected Painterstatic final StringFields inherited from class org.flexdock.plaf.FlexViewComponentUI
creationParametersFields inherited from interface org.flexdock.plaf.IFlexViewComponentUI
ICON_RESOURCEFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureAction(Action action) protected ColorgetBackgroundColor(boolean active) protected BorderintintgetFont()protected ColorgetFontColor(boolean active) protected RectanglegetIconRect(Titlebar titlebar) protected intprotected RectanglegetPaintRect(Titlebar titlebar) protected intprotected intgetTextLocation(Rectangle iconRect) voidvoidbooleanvoidlayoutComponents(Titlebar titlebar) voidpaint(Graphics g, JComponent jc) protected voidpaintBackground(Graphics g, Titlebar titlebar) protected voidpaintBorder(Graphics g, Titlebar titlebar) protected voidprotected voidpaintTitle(Graphics g, Titlebar titlebar) voidsetActiveBackground(Color activeBackground) voidsetActiveBorder(Border activeBorder) voidsetActiveFont(Color activeFont) voidsetAntialiasing(boolean antialias) voidsetButtonMargin(int buttonMargin) voidsetDefaultHeight(int defaultHeight) voidsetDefaultIcons(String iconMapName) voidsetDefaultIcons(IconMap defaultIcons) voidvoidsetIconInsets(Insets iconInsets) voidsetInactiveBackground(Color inactiveBackground) voidsetInactiveBorder(Border inactiveBorder) voidsetInactiveFont(Color inactiveFont) voidvoidsetPainter(Painter painter) voidMethods inherited from class org.flexdock.plaf.FlexViewComponentUI
getCreationParameters, setCreationParametersMethods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update
-
Field Details
-
DEFAULT_HEIGHT
- See Also:
-
FONT
- See Also:
-
FONT_COLOR
- See Also:
-
FONT_COLOR_ACTIVE
- See Also:
-
BACKGROUND_COLOR
- See Also:
-
BACKGROUND_COLOR_ACTIVE
- See Also:
-
BORDER
- See Also:
-
BORDER_ACTIVE
- See Also:
-
PAINTER
- See Also:
-
INSETS
- See Also:
-
ICON_INSETS
- See Also:
-
ANTIALIASING
- See Also:
-
MINIMUM_HEIGHT
public static final int MINIMUM_HEIGHT- See Also:
-
font
-
activeFont
-
inactiveFont
-
activeBackground
-
inactiveBackground
-
activeBorder
-
inactiveBorder
-
defaultIcons
-
painter
-
insets
-
buttonMargin
protected int buttonMargin -
iconInsets
-
antialiasing
-
defaultHeight
protected int defaultHeight
-
-
Constructor Details
-
TitlebarUI
public TitlebarUI()
-
-
Method Details
-
installUI
- Overrides:
installUIin classComponentUI
-
uninstallUI
- Overrides:
uninstallUIin classComponentUI
-
paint
- Overrides:
paintin classComponentUI
-
paintBackground
-
getPaintRect
-
paintTitle
-
getTextLocation
-
paintIcon
-
getIconRect
-
getLeftIconMargin
protected int getLeftIconMargin() -
getRightIconMargin
protected int getRightIconMargin() -
paintBorder
-
layoutComponents
-
configureAction
-
getFontColor
-
getBackgroundColor
-
getBorder
-
getDefaultHeight
public int getDefaultHeight() -
setDefaultHeight
public void setDefaultHeight(int defaultHeight) -
getPreferredSize
-
getActiveBackground
- Returns:
- Returns the activeBackground.
-
setActiveBackground
- Parameters:
activeBackground- The activeBackground to set.
-
getActiveFont
- Returns:
- Returns the activeFont.
-
setActiveFont
- Parameters:
activeFont- The activeFont to set.
-
getInactiveBackground
- Returns:
- Returns the inactiveBackground.
-
setInactiveBackground
- Parameters:
inactiveBackground- The inactiveBackground to set.
-
getInactiveFont
- Returns:
- Returns the inactiveFont.
-
setInactiveFont
- Parameters:
inactiveFont- The inactiveFont to set.
-
getFont
- Returns:
- Returns the font.
-
setFont
- Parameters:
font- The font to set.
-
getDefaultIcons
-
setDefaultIcons
-
setDefaultIcons
-
getIcons
-
getIcons
-
getAction
-
getInactiveBorder
- Returns:
- Returns the inactiveBorder.
-
setInactiveBorder
- Parameters:
inactiveBorder- The inactiveBorder to set.
-
getActiveBorder
- Returns:
- Returns the activeBorder.
-
setActiveBorder
- Parameters:
activeBorder- The activeBorder to set.
-
getIconInsets
- Returns:
- Returns the iconInsets.
-
setIconInsets
- 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
- Returns:
- Returns the painterResource.
-
setPainter
- Parameters:
painter- The painter to set.
-
getInsets
- Returns:
- Returns the insets.
-
setInsets
- 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
-