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
protected class BasicTaskPaneUI.PaneBorder extends Object implements Border, UIResource
The border of the taskpane group paints the "text", the "icon", the "expanded" status and the "special" type.
-
-
Field Summary
Fields Modifier and Type Field Description protected ColorborderColorprotected JLabellabelprotected ColorspecialTitleBackgroundprotected ColorspecialTitleForegroundprotected ColorspecialTitleOverprotected ColortitleBackgroundGradientEndprotected ColortitleBackgroundGradientStartprotected ColortitleForegroundprotected ColortitleOver
-
Constructor Summary
Constructors Constructor Description PaneBorder()Creates new instance of individual pane border.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigureLabel(JXTaskPane group)Configures label for the group using its title, font, icon and orientation.InsetsgetBorderInsets(Component c)protected ColorgetPaintColor(JXTaskPane group)Gets current paint color.DimensiongetPreferredSize(JXTaskPane group)Calculates the preferred border size, its size so all its content fits.booleanisBorderOpaque()Overwritten to always returntrueto speed up painting.protected booleanisMouseOverBorder()Default 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 Detail
-
borderColor
protected Color borderColor
-
titleForeground
protected Color titleForeground
-
specialTitleBackground
protected Color specialTitleBackground
-
specialTitleForeground
protected Color specialTitleForeground
-
titleBackgroundGradientStart
protected Color titleBackgroundGradientStart
-
titleBackgroundGradientEnd
protected Color titleBackgroundGradientEnd
-
titleOver
protected Color titleOver
-
specialTitleOver
protected Color specialTitleOver
-
label
protected JLabel label
-
-
Method Detail
-
getBorderInsets
public Insets getBorderInsets(Component c)
- 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:
Border.isBorderOpaque()
-
getPreferredSize
public Dimension getPreferredSize(JXTaskPane group)
Calculates the preferred border size, its size so all its content fits.- Parameters:
group- Selected group.
-
paintTitleBackground
protected void paintTitleBackground(JXTaskPane group, Graphics g)
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
protected void configureLabel(JXTaskPane group)
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
protected Color getPaintColor(JXTaskPane group)
Gets current paint color.- Parameters:
group- Selected group.- Returns:
- Color to be used for painting provided group.
-
paintBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
- 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.
-
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
protected void paintFocus(Graphics g, Color paintColor, int x, int y, int width, int height)
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
-
-