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
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_HEIGHT
public static final String DEFAULT_HEIGHT
- See Also:
- Constant Field Values
FONT
public static final String FONT
- See Also:
- Constant Field Values
FONT_COLOR
public static final String FONT_COLOR
- See Also:
- Constant Field Values
FONT_COLOR_ACTIVE
public static final String FONT_COLOR_ACTIVE
- See Also:
- Constant Field Values
BACKGROUND_COLOR
public static final String BACKGROUND_COLOR
- See Also:
- Constant Field Values
BACKGROUND_COLOR_ACTIVE
public static final String BACKGROUND_COLOR_ACTIVE
- See Also:
- Constant Field Values
BORDER
public static final String BORDER
- See Also:
- Constant Field Values
BORDER_ACTIVE
public static final String BORDER_ACTIVE
- See Also:
- Constant Field Values
PAINTER
public static final String PAINTER
- See Also:
- Constant Field Values
INSETS
public static final String INSETS
- See Also:
- Constant Field Values
ICON_INSETS
public static final String ICON_INSETS
- See Also:
- Constant Field Values
ANTIALIASING
public static final String ANTIALIASING
- See Also:
- Constant Field Values
MINIMUM_HEIGHT
public static final int MINIMUM_HEIGHT
- See Also:
- Constant Field Values
font
protected Font font
activeFont
protected Color activeFont
inactiveFont
protected Color inactiveFont
activeBackground
protected Color activeBackground
inactiveBackground
protected Color inactiveBackground
activeBorder
protected Border activeBorder
inactiveBorder
protected Border inactiveBorder
defaultIcons
protected IconMap defaultIcons
painter
protected Painter painter
insets
protected Insets insets
buttonMargin
protected int buttonMargin
iconInsets
protected Insets iconInsets
antialiasing
protected Object antialiasing
defaultHeight
protected int defaultHeight
TitlebarUI
public TitlebarUI()
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in class ComponentUI
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUI
in class ComponentUI
paint
public void paint(Graphics g,
JComponent jc)
- Overrides:
paint
in class ComponentUI
paintBackground
protected void paintBackground(Graphics g,
Titlebar titlebar)
getPaintRect
protected Rectangle getPaintRect(Titlebar titlebar)
paintTitle
protected void paintTitle(Graphics g,
Titlebar titlebar)
getTextLocation
protected int getTextLocation(Rectangle iconRect)
paintIcon
protected void paintIcon(Graphics g,
Titlebar titlebar)
getIconRect
protected Rectangle getIconRect(Titlebar titlebar)
getLeftIconMargin
protected int getLeftIconMargin()
getRightIconMargin
protected int getRightIconMargin()
paintBorder
protected void paintBorder(Graphics g,
Titlebar titlebar)
layoutComponents
public void layoutComponents(Titlebar titlebar)
configureAction
public void configureAction(Action action)
getFontColor
protected Color getFontColor(boolean active)
getBackgroundColor
protected Color getBackgroundColor(boolean active)
getBorder
protected Border getBorder(Titlebar titlebar)
getDefaultHeight
public int getDefaultHeight()
setDefaultHeight
public void setDefaultHeight(int defaultHeight)
getPreferredSize
public Dimension getPreferredSize()
getActiveBackground
public Color getActiveBackground()
- Returns:
- Returns the activeBackground.
setActiveBackground
public void setActiveBackground(Color activeBackground)
- Parameters:
activeBackground
- The activeBackground to set.
getActiveFont
public Color getActiveFont()
- Returns:
- Returns the activeFont.
setActiveFont
public void setActiveFont(Color activeFont)
- Parameters:
activeFont
- The activeFont to set.
getInactiveBackground
public Color getInactiveBackground()
- Returns:
- Returns the inactiveBackground.
setInactiveBackground
public void setInactiveBackground(Color inactiveBackground)
- Parameters:
inactiveBackground
- The inactiveBackground to set.
getInactiveFont
public Color getInactiveFont()
- Returns:
- Returns the inactiveFont.
setInactiveFont
public void setInactiveFont(Color inactiveFont)
- Parameters:
inactiveFont
- The inactiveFont to set.
getFont
public Font getFont()
- Returns:
- Returns the font.
setFont
public void setFont(Font font)
- Parameters:
font
- The font to set.
getDefaultIcons
public IconMap getDefaultIcons()
setDefaultIcons
public void setDefaultIcons(IconMap defaultIcons)
setDefaultIcons
public void setDefaultIcons(String iconMapName)
getIcons
public IconResource getIcons(Action action)
getIcons
public IconResource getIcons(String key)
getAction
public Action getAction(String actionKey)
getInactiveBorder
public Border getInactiveBorder()
- Returns:
- Returns the inactiveBorder.
setInactiveBorder
public void setInactiveBorder(Border inactiveBorder)
- Parameters:
inactiveBorder
- The inactiveBorder to set.
getActiveBorder
public Border getActiveBorder()
- Returns:
- Returns the activeBorder.
setActiveBorder
public void setActiveBorder(Border activeBorder)
- Parameters:
activeBorder
- The activeBorder to set.
getIconInsets
public Insets getIconInsets()
- Returns:
- Returns the iconInsets.
setIconInsets
public void setIconInsets(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 Insets getInsets()
- Returns:
- Returns the insets.
setInsets
public void setInsets(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:
initializeCreationParameters
in interface IFlexViewComponentUI
- Specified by:
initializeCreationParameters
in class FlexViewComponentUI
getPreferredButtonUI
public String getPreferredButtonUI()