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 Color
protected Border
protected Color
protected Object
static final String
static final String
static final String
static final String
static final String
protected int
static final String
protected int
protected IconMap
protected Font
static final String
static final String
static final String
static final String
protected Insets
protected Color
protected Border
protected Color
protected Insets
static final String
static final int
protected Painter
static final String
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureAction
(Action action) protected Color
getBackgroundColor
(boolean active) protected Border
int
int
getFont()
protected Color
getFontColor
(boolean active) protected Rectangle
getIconRect
(Titlebar titlebar) protected int
protected Rectangle
getPaintRect
(Titlebar titlebar) protected int
protected int
getTextLocation
(Rectangle iconRect) void
void
boolean
void
layoutComponents
(Titlebar titlebar) void
paint
(Graphics g, JComponent jc) protected void
paintBackground
(Graphics g, Titlebar titlebar) protected void
paintBorder
(Graphics g, Titlebar titlebar) protected void
protected void
paintTitle
(Graphics g, Titlebar titlebar) void
setActiveBackground
(Color activeBackground) void
setActiveBorder
(Border activeBorder) void
setActiveFont
(Color activeFont) void
setAntialiasing
(boolean antialias) void
setButtonMargin
(int buttonMargin) void
setDefaultHeight
(int defaultHeight) void
setDefaultIcons
(String iconMapName) void
setDefaultIcons
(IconMap defaultIcons) void
void
setIconInsets
(Insets iconInsets) void
setInactiveBackground
(Color inactiveBackground) void
setInactiveBorder
(Border inactiveBorder) void
setInactiveFont
(Color inactiveFont) void
void
setPainter
(Painter painter) void
Methods inherited from class org.flexdock.plaf.FlexViewComponentUI
getCreationParameters, setCreationParameters
Methods 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:
installUI
in classComponentUI
-
uninstallUI
- Overrides:
uninstallUI
in classComponentUI
-
paint
- Overrides:
paint
in 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:
initializeCreationParameters
in interfaceIFlexViewComponentUI
- Specified by:
initializeCreationParameters
in classFlexViewComponentUI
-
getPreferredButtonUI
-