Class MatteBorderExt

All Implemented Interfaces:
Serializable, Border

@JavaBean public class MatteBorderExt extends MatteBorder
Matte border that allows specialized icons for corners and sides.
Author:
Ramesh Gupta
See Also:
  • Field Details

    • tileIcons

      protected Icon[] tileIcons
  • Constructor Details

    • MatteBorderExt

      public MatteBorderExt(int top, int left, int bottom, int right, Icon[] tileIcons)
      Draws a matte border using specialized icons for corners and sides. If tileIcons is null, or if the length of tileIcons array is less than 2, this defaults to the superclass behavior. Otherwise, tileIcons must specify icons in clockwise order, starting with the top-left icon at index zero, culminating with the left icon at index 7. If the length of the tileIcons array is greater than 1, but less than 8, then tileIcons[0] is used to paint the corners, and tileIcons[1] is used to paint the sides, with icons rotated as necessary. Other icons, if any, are ignored.
      Parameters:
      top - top inset
      left - left inset
      bottom - bottom inset
      right - right inset
      tileIcons - array of icons starting with top-left in index 0, continuing clockwise through the rest of the indices
    • MatteBorderExt

      public MatteBorderExt(int top, int left, int bottom, int right, Color matteColor)
      See Also:
    • MatteBorderExt

      public MatteBorderExt(Insets borderInsets, Color matteColor)
      See Also:
    • MatteBorderExt

      public MatteBorderExt(int top, int left, int bottom, int right, Icon tileIcon)
      See Also:
    • MatteBorderExt

      public MatteBorderExt(Insets borderInsets, Icon tileIcon)
      See Also:
    • MatteBorderExt

      public MatteBorderExt(Icon tileIcon)
      See Also:
  • Method Details

    • getTileIcons

      public Icon[] getTileIcons()
      Returns the icons used by this border
      Returns:
      the icons used by this border
    • paintBorder

      public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
      Specified by:
      paintBorder in interface Border
      Overrides:
      paintBorder in class MatteBorder
    • paint

      protected void paint(Icon icon, Component c, Graphics g, int x, int y, int width, int height)
    • paintTopLeft

      protected void paintTopLeft(Component c, Graphics g, int x, int y, int width, int height)
      Only called by paintBorder()
    • paintTop

      protected void paintTop(Component c, Graphics g, int x, int y, int width, int height)
      Only called by paintBorder()
    • paintTopRight

      protected void paintTopRight(Component c, Graphics g, int x, int y, int width, int height)
      Only called by paintBorder()
    • paintRight

      protected void paintRight(Component c, Graphics g, int x, int y, int width, int height)
      Only called by paintBorder()
    • paintBottomRight

      protected void paintBottomRight(Component c, Graphics g, int x, int y, int width, int height)
      Only called by paintBorder()
    • paintBottom

      protected void paintBottom(Component c, Graphics g, int x, int y, int width, int height)
      Only called by paintBorder()
    • paintBottomLeft

      protected void paintBottomLeft(Component c, Graphics g, int x, int y, int width, int height)
      Only called by paintBorder()
    • paintLeft

      protected void paintLeft(Component c, Graphics g, int x, int y, int width, int height)
      Only called by paintBorder()
    • getDefaultIcon

      protected Icon getDefaultIcon()
      Only called by paintBorder()