org.jdesktop.swingx.plaf.basic
Class BasicTaskPaneUI.PaneBorder

java.lang.Object
  extended by 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.UIResource

The border of the taskpane group paints the "text", the "icon", the "expanded" status and the "special" type.


Field Summary
protected  java.awt.Color borderColor
           
protected  javax.swing.JLabel label
           
protected  java.awt.Color specialTitleBackground
           
protected  java.awt.Color specialTitleForeground
           
protected  java.awt.Color specialTitleOver
           
protected  java.awt.Color titleBackgroundGradientEnd
           
protected  java.awt.Color titleBackgroundGradientStart
           
protected  java.awt.Color titleForeground
           
protected  java.awt.Color titleOver
           
 
Constructor Summary
BasicTaskPaneUI.PaneBorder()
          Creates new instance of individual pane border.
 
Method Summary
protected  void configureLabel(JXTaskPane group)
          Configures label for the group using its title, font, icon and orientation.
 java.awt.Insets getBorderInsets(java.awt.Component c)
           
protected  java.awt.Color getPaintColor(JXTaskPane group)
          Gets current paint color.
 java.awt.Dimension getPreferredSize(JXTaskPane group)
          Calculates the preferred border size, its size so all its content fits.
 boolean isBorderOpaque()
          Overwritten to always return true to speed up painting.
protected  boolean isMouseOverBorder()
          Default implementation returns false.
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
           
protected  void paintChevronControls(JXTaskPane group, java.awt.Graphics g, int x, int y, int width, int height)
          Paints controls for the group.
protected  void paintExpandedControls(JXTaskPane group, java.awt.Graphics g, int x, int y, int width, int height)
          Paints expanded controls.
protected  void paintFocus(java.awt.Graphics g, java.awt.Color paintColor, int x, int y, int width, int height)
          Paints focused group.
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.
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.
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.
protected  void paintTitleBackground(JXTaskPane group, java.awt.Graphics g)
          Paints background of the title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

BasicTaskPaneUI.PaneBorder

public BasicTaskPaneUI.PaneBorder()
Creates new instance of individual pane border.

Method Detail

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c)
Specified by:
getBorderInsets in interface javax.swing.border.Border

isBorderOpaque

public boolean isBorderOpaque()
Overwritten to always return true 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 interface javax.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:
paintBorder in interface javax.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