Package org.jdesktop.swingx.plaf.basic
Class BasicTaskPaneUI.PaneBorder
java.lang.Object
org.jdesktop.swingx.plaf.basic.BasicTaskPaneUI.PaneBorder
- All Implemented Interfaces:
Border,UIResource
- Enclosing class:
- BasicTaskPaneUI
The border of the taskpane group paints the "text", the "icon", the
"expanded" status and the "special" type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ColorborderColor as set in TaskPaneAddonprotected JLabelprotected ColorspecialTitleBackground color as set in TaskPaneAddonprotected ColorspecialTitleForeground color as set in TaskPaneAddonprotected ColorspecialTitleOver color as set in TaskPaneAddonprotected ColortitleBackgroundGradientEnd color as set in TaskPaneAddonprotected ColortitleBackgroundGradientStart color as set in TaskPaneAddonprotected ColortitleForeground color as set in TaskPaneAddonprotected ColortitleOver color as set in TaskPaneAddon -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureLabel(JXTaskPane group) Configures label for the group using its title, font, icon and orientation.protected ColorgetPaintColor(JXTaskPane group) Gets current paint color.getPreferredSize(JXTaskPane group) Calculates the preferred border size, its size so all its content fits.booleanOverwritten to always returntrueto speed up painting.protected booleanDefault implementation returns false.voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) protected voidpaintChevronControls(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints controls for the group.protected voidpaintExpandedControls(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints expanded controls.protected voidpaintFocus(Graphics g, Color paintColor, int x, int y, int width, int height) Paints focused group.protected voidpaintOvalAroundControls(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints oval 'border' area around the control itself.protected voidpaintRectAroundControls(JXTaskPane group, Graphics g, int x, int y, int width, int height, Color highColor, Color lowColor) Paints oval 'border' area around the control itself.protected voidpaintTitle(JXTaskPane group, Graphics g, Color textColor, int x, int y, int width, int height) Paints current group title.protected voidpaintTitleBackground(JXTaskPane group, Graphics g) Paints background of the title.
-
Field Details
-
borderColor
borderColor as set in TaskPaneAddon -
titleForeground
titleForeground color as set in TaskPaneAddon -
specialTitleBackground
specialTitleBackground color as set in TaskPaneAddon -
specialTitleForeground
specialTitleForeground color as set in TaskPaneAddon -
titleBackgroundGradientStart
titleBackgroundGradientStart color as set in TaskPaneAddon -
titleBackgroundGradientEnd
titleBackgroundGradientEnd color as set in TaskPaneAddon -
titleOver
titleOver color as set in TaskPaneAddon -
specialTitleOver
specialTitleOver color as set in TaskPaneAddon -
label
-
-
Constructor Details
-
PaneBorder
public PaneBorder()Creates new instance of individual pane border.
-
-
Method Details
-
getBorderInsets
- Specified by:
getBorderInsetsin interfaceBorder
-
isBorderOpaque
public boolean isBorderOpaque()Overwritten to always returntrueto speed up painting. Don't use transparent borders unless providing UI delegate that provides proper return value when calling this method.- Specified by:
isBorderOpaquein interfaceBorder- See Also:
-
getPreferredSize
Calculates the preferred border size, its size so all its content fits.- Parameters:
group- Selected group.- Returns:
- the border size
-
paintTitleBackground
Paints background of the title. This may differ based on properties of the group.- Parameters:
group- Selected group.g- Target graphics.
-
paintTitle
protected void paintTitle(JXTaskPane group, Graphics g, Color textColor, int x, int y, int width, int height) Paints current group title.- Parameters:
group- Selected group.g- Target graphics.textColor- Title color.x- X coordinate of the top left corner.y- Y coordinate of the top left corner.width- Width of the box.height- Height of the box.
-
configureLabel
Configures label for the group using its title, font, icon and orientation.- Parameters:
group- Selected group.
-
paintExpandedControls
protected void paintExpandedControls(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints expanded controls. Default implementation does nothing.- Parameters:
group- Expanded group.g- Target graphics.x- X coordinate of the top left corner.y- Y coordinate of the top left corner.width- Width of the box.height- Height of the box.
-
getPaintColor
Gets current paint color.- Parameters:
group- Selected group.- Returns:
- Color to be used for painting provided group.
-
paintBorder
- Specified by:
paintBorderin interfaceBorder
-
paintRectAroundControls
protected void paintRectAroundControls(JXTaskPane group, Graphics g, int x, int y, int width, int height, Color highColor, Color lowColor) Paints oval 'border' area around the control itself.- Parameters:
group- Expanded group.g- Target graphics.x- X coordinate of the top left corner.y- Y coordinate of the top left corner.width- Width of the box.height- Height of the box.highColor- ColorlowColor- Color
-
paintOvalAroundControls
protected void paintOvalAroundControls(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints oval 'border' area around the control itself.- Parameters:
group- Expanded group.g- Target graphics.x- X coordinate of the top left corner.y- Y coordinate of the top left corner.width- Width of the box.height- Height of the box.
-
paintChevronControls
protected void paintChevronControls(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints controls for the group.- Parameters:
group- Expanded group.g- Target graphics.x- X coordinate of the top left corner.y- Y coordinate of the top left corner.width- Width of the box.height- Height of the box.
-
paintFocus
Paints focused group.- Parameters:
g- Target graphics.paintColor- Focused group color.x- X coordinate of the top left corner.y- Y coordinate of the top left corner.width- Width of the box.height- Height of the box.
-
isMouseOverBorder
protected boolean isMouseOverBorder()Default implementation returns false.- Returns:
- true if this border wants to display things differently when the mouse is over it
-