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 Color
borderColor as set in TaskPaneAddonprotected JLabel
protected Color
specialTitleBackground color as set in TaskPaneAddonprotected Color
specialTitleForeground color as set in TaskPaneAddonprotected Color
specialTitleOver color as set in TaskPaneAddonprotected Color
titleBackgroundGradientEnd color as set in TaskPaneAddonprotected Color
titleBackgroundGradientStart color as set in TaskPaneAddonprotected Color
titleForeground color as set in TaskPaneAddonprotected Color
titleOver color as set in TaskPaneAddon -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureLabel
(JXTaskPane group) Configures label for the group using its title, font, icon and orientation.protected Color
getPaintColor
(JXTaskPane group) Gets current paint color.getPreferredSize
(JXTaskPane group) Calculates the preferred border size, its size so all its content fits.boolean
Overwritten to always returntrue
to speed up painting.protected boolean
Default implementation returns false.void
paintBorder
(Component c, Graphics g, int x, int y, int width, int height) protected void
paintChevronControls
(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints controls for the group.protected void
paintExpandedControls
(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints expanded controls.protected void
paintFocus
(Graphics g, Color paintColor, int x, int y, int width, int height) Paints focused group.protected void
paintOvalAroundControls
(JXTaskPane group, Graphics g, int x, int y, int width, int height) Paints oval 'border' area around the control itself.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.protected void
paintTitle
(JXTaskPane group, Graphics g, Color textColor, int x, int y, int width, int height) Paints current group title.protected void
paintTitleBackground
(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:
getBorderInsets
in interfaceBorder
-
isBorderOpaque
public boolean isBorderOpaque()Overwritten to always returntrue
to speed up painting. Don't use transparent borders unless providing UI delegate that provides proper return value when calling this method.- Specified by:
isBorderOpaque
in 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:
paintBorder
in 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
-