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

      • PaneBorder

        public PaneBorder()
        Creates new instance of individual pane border.
    • Method Detail

      • 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 Border
        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.
      • 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