Package org.jdesktop.swingx.plaf.basic
Class BasicTaskPaneUI.PaneBorder
- java.lang.Object
-
- org.jdesktop.swingx.plaf.basic.BasicTaskPaneUI.PaneBorder
-
- All Implemented Interfaces:
javax.swing.border.Border,javax.swing.plaf.UIResource
- Enclosing class:
- BasicTaskPaneUI
protected class BasicTaskPaneUI.PaneBorder extends java.lang.Object implements javax.swing.border.Border, javax.swing.plaf.UIResourceThe 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 java.awt.ColorborderColorprotected javax.swing.JLabellabelprotected java.awt.ColorspecialTitleBackgroundprotected java.awt.ColorspecialTitleForegroundprotected java.awt.ColorspecialTitleOverprotected java.awt.ColortitleBackgroundGradientEndprotected java.awt.ColortitleBackgroundGradientStartprotected java.awt.ColortitleForegroundprotected java.awt.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.java.awt.InsetsgetBorderInsets(java.awt.Component c)protected java.awt.ColorgetPaintColor(JXTaskPane group)Gets current paint color.java.awt.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(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)protected voidpaintChevronControls(JXTaskPane group, java.awt.Graphics g, int x, int y, int width, int height)Paints controls for the group.protected voidpaintExpandedControls(JXTaskPane group, java.awt.Graphics g, int x, int y, int width, int height)Paints expanded controls.protected voidpaintFocus(java.awt.Graphics g, java.awt.Color paintColor, int x, int y, int width, int height)Paints focused group.protected voidpaintOvalAroundControls(JXTaskPane group, java.awt.Graphics g, int x, int y, int width, int height)Paints oval 'border' area around the control itself.protected voidpaintRectAroundControls(JXTaskPane group, java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color highColor, java.awt.Color lowColor)Paints oval 'border' area around the control itself.protected voidpaintTitle(JXTaskPane group, java.awt.Graphics g, java.awt.Color textColor, int x, int y, int width, int height)Paints current group title.protected voidpaintTitleBackground(JXTaskPane group, java.awt.Graphics g)Paints background of the title.
-
-
-
Field Detail
-
borderColor
protected java.awt.Color borderColor
-
titleForeground
protected java.awt.Color titleForeground
-
specialTitleBackground
protected java.awt.Color specialTitleBackground
-
specialTitleForeground
protected java.awt.Color specialTitleForeground
-
titleBackgroundGradientStart
protected java.awt.Color titleBackgroundGradientStart
-
titleBackgroundGradientEnd
protected java.awt.Color titleBackgroundGradientEnd
-
titleOver
protected java.awt.Color titleOver
-
specialTitleOver
protected java.awt.Color specialTitleOver
-
label
protected javax.swing.JLabel label
-
-
Method Detail
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
- Specified by:
getBorderInsetsin interfacejavax.swing.border.Border
-
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 interfacejavax.swing.border.Border- See Also:
Border.isBorderOpaque()
-
getPreferredSize
public java.awt.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, java.awt.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, java.awt.Graphics g, java.awt.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, java.awt.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 java.awt.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(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)- Specified by:
paintBorderin interfacejavax.swing.border.Border
-
paintRectAroundControls
protected void paintRectAroundControls(JXTaskPane group, java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color highColor, java.awt.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, java.awt.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, java.awt.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(java.awt.Graphics g, java.awt.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
-
-