org.flexdock.plaf.theme
Class TitlebarUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by org.flexdock.plaf.FlexViewComponentUI
          extended by 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
protected  Color activeBackground
           
protected  Border activeBorder
           
protected  Color activeFont
           
protected  Object antialiasing
           
static String ANTIALIASING
           
static String BACKGROUND_COLOR
           
static String BACKGROUND_COLOR_ACTIVE
           
static String BORDER
           
static String BORDER_ACTIVE
           
protected  int buttonMargin
           
static String DEFAULT_HEIGHT
           
protected  int defaultHeight
           
protected  IconMap defaultIcons
           
protected  Font font
           
static String FONT
           
static String FONT_COLOR
           
static String FONT_COLOR_ACTIVE
           
static String ICON_INSETS
           
protected  Insets iconInsets
           
protected  Color inactiveBackground
           
protected  Border inactiveBorder
           
protected  Color inactiveFont
           
protected  Insets insets
           
static String INSETS
           
static int MINIMUM_HEIGHT
           
protected  Painter painter
           
static String PAINTER
           
 
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
TitlebarUI()
           
 
Method Summary
 void configureAction(Action action)
           
 Action getAction(String actionKey)
           
 Color getActiveBackground()
           
 Border getActiveBorder()
           
 Color getActiveFont()
           
protected  Color getBackgroundColor(boolean active)
           
protected  Border getBorder(Titlebar titlebar)
           
 int getButtonMargin()
           
 int getDefaultHeight()
           
 IconMap getDefaultIcons()
           
 Font getFont()
           
protected  Color getFontColor(boolean active)
           
 Insets getIconInsets()
           
protected  Rectangle getIconRect(Titlebar titlebar)
           
 IconResource getIcons(Action action)
           
 IconResource getIcons(String key)
           
 Color getInactiveBackground()
           
 Border getInactiveBorder()
           
 Color getInactiveFont()
           
 Insets getInsets()
           
protected  int getLeftIconMargin()
           
 Painter getPainter()
           
protected  Rectangle getPaintRect(Titlebar titlebar)
           
 String getPreferredButtonUI()
           
 Dimension getPreferredSize()
           
protected  int getRightIconMargin()
           
protected  int getTextLocation(Rectangle iconRect)
           
 void initializeCreationParameters()
           
 void installUI(JComponent c)
           
 boolean isAntialiasing()
           
 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 paintIcon(Graphics g, Titlebar titlebar)
           
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(IconMap defaultIcons)
           
 void setDefaultIcons(String iconMapName)
           
 void setFont(Font font)
           
 void setIconInsets(Insets iconInsets)
           
 void setInactiveBackground(Color inactiveBackground)
           
 void setInactiveBorder(Border inactiveBorder)
           
 void setInactiveFont(Color inactiveFont)
           
 void setInsets(Insets insets)
           
 void setPainter(Painter painter)
           
 void uninstallUI(JComponent c)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

TitlebarUI

public TitlebarUI()
Method Detail

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()