Package net.infonode.tabbedpanel.theme
Class GradientTheme
- java.lang.Object
-
- net.infonode.tabbedpanel.theme.TabbedPanelTitledTabTheme
-
- net.infonode.tabbedpanel.theme.GradientTheme
-
public class GradientTheme extends TabbedPanelTitledTabTheme
A theme that draws gradient tab backgrounds.- Since:
- ITP 1.1.0
- Version:
- $Revision: 1.22 $
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.ColorborderColorprivate static floatBRIGHTNESSstatic java.awt.ColorDEFAULT_TAB_AREA_BACKGROUND_COLORThe tab area background color used if no color is specified in the constructor.private static javax.swing.border.BorderHIGHLIGHTED_TAB_GRADIENT_BORDERprivate static floatHUEprivate javax.swing.border.BordernormalTabGradientBorderprivate booleanopaqueTabAreaprivate static floatSATURATIONprivate booleanshadowEnabledprivate static javax.swing.border.BorderTAB_AREA_COMPONENTS_GRADIENT_BORDERprivate java.awt.ColortabAreaBackgroundColorprivate TabbedPanelPropertiestabbedPanelPropertiesprivate TitledTabPropertiestitledTabProperties
-
Constructor Summary
Constructors Constructor Description GradientTheme()Creates a default theme with transparent tab area and shadows.GradientTheme(boolean opaqueTabArea, boolean shadowEnabled)Constructor.GradientTheme(boolean opaqueTabArea, boolean shadowEnabled, java.awt.Color borderColor)Constructor.GradientTheme(boolean opaqueTabArea, boolean shadowEnabled, java.awt.Color borderColor, java.awt.Color tabAreaBackgroundColor)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.border.BordergetHighlightedTabGradientBorder()Returns the gradient border for the highlighted tab.java.lang.StringgetName()Gets the name for this themejavax.swing.border.BordergetNormalTabGradientBorder()Returns the gradient border for the normal tab or the tab area if it's opaque.javax.swing.border.BordergetTabAreaComponentsGradientBorder()Returns the gradient border for the tab area components.TabbedPanelPropertiesgetTabbedPanelProperties()Gets the TabbedPanelProperties for this themeTitledTabPropertiesgetTitledTabProperties()Gets the TitledTabProperties for this themeprivate voidinitTabbedPanelProperties()private voidinitTitledTabProperties()
-
-
-
Field Detail
-
HUE
private static final float HUE
- See Also:
- Constant Field Values
-
SATURATION
private static final float SATURATION
- See Also:
- Constant Field Values
-
BRIGHTNESS
private static final float BRIGHTNESS
- See Also:
- Constant Field Values
-
DEFAULT_TAB_AREA_BACKGROUND_COLOR
public static final java.awt.Color DEFAULT_TAB_AREA_BACKGROUND_COLOR
The tab area background color used if no color is specified in the constructor.
-
HIGHLIGHTED_TAB_GRADIENT_BORDER
private static final javax.swing.border.Border HIGHLIGHTED_TAB_GRADIENT_BORDER
-
TAB_AREA_COMPONENTS_GRADIENT_BORDER
private static final javax.swing.border.Border TAB_AREA_COMPONENTS_GRADIENT_BORDER
-
opaqueTabArea
private boolean opaqueTabArea
-
shadowEnabled
private boolean shadowEnabled
-
borderColor
private java.awt.Color borderColor
-
tabAreaBackgroundColor
private java.awt.Color tabAreaBackgroundColor
-
normalTabGradientBorder
private javax.swing.border.Border normalTabGradientBorder
-
titledTabProperties
private TitledTabProperties titledTabProperties
-
tabbedPanelProperties
private TabbedPanelProperties tabbedPanelProperties
-
-
Constructor Detail
-
GradientTheme
public GradientTheme()
Creates a default theme with transparent tab area and shadows.
-
GradientTheme
public GradientTheme(boolean opaqueTabArea, boolean shadowEnabled)Constructor.- Parameters:
opaqueTabArea- if true a gradient background is drawn for the tab area, otherwise it's transparentshadowEnabled- if true the shadow is enabled
-
GradientTheme
public GradientTheme(boolean opaqueTabArea, boolean shadowEnabled, java.awt.Color borderColor)Constructor.- Parameters:
opaqueTabArea- if true a gradient background is drawn for the tab area, otherwise it's transparentshadowEnabled- if true the shadow is enabledborderColor- the border color, null means default border color
-
GradientTheme
public GradientTheme(boolean opaqueTabArea, boolean shadowEnabled, java.awt.Color borderColor, java.awt.Color tabAreaBackgroundColor)Constructor.- Parameters:
opaqueTabArea- if true a gradient background is drawn for the tab area, otherwise it's transparentshadowEnabled- if true the shadow is enabledborderColor- the border color, null means default border colortabAreaBackgroundColor- the background color for the tab area and normal tabs, null means use the default tab background
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name for this theme- Specified by:
getNamein classTabbedPanelTitledTabTheme- Returns:
- the name
-
initTabbedPanelProperties
private void initTabbedPanelProperties()
-
initTitledTabProperties
private void initTitledTabProperties()
-
getTitledTabProperties
public TitledTabProperties getTitledTabProperties()
Description copied from class:TabbedPanelTitledTabThemeGets the TitledTabProperties for this theme- Specified by:
getTitledTabPropertiesin classTabbedPanelTitledTabTheme- Returns:
- the TitledTabProperties
-
getTabbedPanelProperties
public TabbedPanelProperties getTabbedPanelProperties()
Description copied from class:TabbedPanelTitledTabThemeGets the TabbedPanelProperties for this theme- Specified by:
getTabbedPanelPropertiesin classTabbedPanelTitledTabTheme- Returns:
- the TabbedPanelProperties
-
getHighlightedTabGradientBorder
public javax.swing.border.Border getHighlightedTabGradientBorder()
Returns the gradient border for the highlighted tab.- Returns:
- the gradient border for the highlighted tab
-
getTabAreaComponentsGradientBorder
public javax.swing.border.Border getTabAreaComponentsGradientBorder()
Returns the gradient border for the tab area components.- Returns:
- the gradient border for the tab area components
-
getNormalTabGradientBorder
public javax.swing.border.Border getNormalTabGradientBorder()
Returns the gradient border for the normal tab or the tab area if it's opaque.- Returns:
- the gradient border for the normal tab or the tab area if it's opaque
-
-