Class PanelTitledBorder

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.border.Border

    public class PanelTitledBorder
    extends javax.swing.border.TitledBorder
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int STYLE_EW  
      static int STYLE_NS  
      static int STYLE_PLAIN  
      static int STYLE_SN  
      static int STYLE_WE  
      • Fields inherited from class javax.swing.border.TitledBorder

        ABOVE_BOTTOM, ABOVE_TOP, BELOW_BOTTOM, BELOW_TOP, border, BOTTOM, CENTER, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, EDGE_SPACING, LEADING, LEFT, RIGHT, TEXT_INSET_H, TEXT_SPACING, title, titleColor, titleFont, titleJustification, titlePosition, TOP, TRAILING
    • Constructor Summary

      Constructors 
      Constructor Description
      PanelTitledBorder()
      For serialization only
      PanelTitledBorder​(java.awt.Color mainColor, java.awt.Color background, java.lang.String text)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Color getBackground()  
      java.awt.Insets getBorderInsets​(java.awt.Component c)  
      java.awt.Insets getBorderInsets​(java.awt.Component c, java.awt.Insets insets)  
      java.awt.Color getGradientColor()  
      int getHGap()  
      java.awt.Insets getInsets()  
      javax.swing.JLabel getLabel()  
      java.awt.Color getMainColor()  
      java.awt.Color[] getShadowColors()  
      int getShadowSize()  
      int getStyle()  
      java.awt.Font getTitleFont()
      Returns the title-font of the titled border.
      int getVGap()  
      boolean isBorderOpaque()  
      void paintBorder​(java.awt.Component c, java.awt.Graphics graphics, int x, int y, int width, int height)  
      void setBackground​(java.awt.Color background)  
      void setHGap​(int gap)  
      void setMainColor​(java.awt.Color mainColor)  
      void setShadowSize​(int shadowSize)  
      void setStyle​(int style)  
      void setTitle​(java.lang.String title)  
      void setTitleColor​(java.awt.Color titleColor)  
      void setTitleFont​(java.awt.Font titleFont)  
      void setTitleJustification​(int titleJustification)  
      void setVGap​(int gap)  
      java.lang.String toString()  
      • Methods inherited from class javax.swing.border.TitledBorder

        getBaseline, getBaselineResizeBehavior, getBorder, getFont, getMinimumSize, getTitle, getTitleColor, getTitleJustification, getTitlePosition, setBorder, setTitlePosition
      • Methods inherited from class javax.swing.border.AbstractBorder

        getInteriorRectangle, getInteriorRectangle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PanelTitledBorder

        public PanelTitledBorder()
        For serialization only
      • PanelTitledBorder

        public PanelTitledBorder​(java.awt.Color mainColor,
                                 java.awt.Color background,
                                 java.lang.String text)
    • Method Detail

      • isBorderOpaque

        public boolean isBorderOpaque()
        Specified by:
        isBorderOpaque in interface javax.swing.border.Border
        Overrides:
        isBorderOpaque in class javax.swing.border.TitledBorder
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setTitle

        public void setTitle​(java.lang.String title)
        Overrides:
        setTitle in class javax.swing.border.TitledBorder
      • setTitleColor

        public void setTitleColor​(java.awt.Color titleColor)
        Overrides:
        setTitleColor in class javax.swing.border.TitledBorder
      • setTitleFont

        public void setTitleFont​(java.awt.Font titleFont)
        Overrides:
        setTitleFont in class javax.swing.border.TitledBorder
      • setTitleJustification

        public void setTitleJustification​(int titleJustification)
        Overrides:
        setTitleJustification in class javax.swing.border.TitledBorder
      • getBorderInsets

        public java.awt.Insets getBorderInsets​(java.awt.Component c)
        Specified by:
        getBorderInsets in interface javax.swing.border.Border
        Overrides:
        getBorderInsets in class javax.swing.border.AbstractBorder
      • getBorderInsets

        public java.awt.Insets getBorderInsets​(java.awt.Component c,
                                               java.awt.Insets insets)
        Overrides:
        getBorderInsets in class javax.swing.border.TitledBorder
      • paintBorder

        public void paintBorder​(java.awt.Component c,
                                java.awt.Graphics graphics,
                                int x,
                                int y,
                                int width,
                                int height)
        Specified by:
        paintBorder in interface javax.swing.border.Border
        Overrides:
        paintBorder in class javax.swing.border.TitledBorder
      • getTitleFont

        public java.awt.Font getTitleFont()
        Returns the title-font of the titled border.

        This is the implementation from Java 6. Java 7 doesn't check the UIManager when null.

        Overrides:
        getTitleFont in class javax.swing.border.TitledBorder
      • getHGap

        public int getHGap()
      • setHGap

        public void setHGap​(int gap)
      • getMainColor

        public java.awt.Color getMainColor()
      • setMainColor

        public void setMainColor​(java.awt.Color mainColor)
      • getGradientColor

        public java.awt.Color getGradientColor()
      • getShadowSize

        public int getShadowSize()
      • setShadowSize

        public void setShadowSize​(int shadowSize)
      • getVGap

        public int getVGap()
      • setVGap

        public void setVGap​(int gap)
      • getStyle

        public int getStyle()
      • setStyle

        public void setStyle​(int style)
      • getBackground

        public java.awt.Color getBackground()
      • setBackground

        public void setBackground​(java.awt.Color background)
      • getLabel

        public javax.swing.JLabel getLabel()
      • getInsets

        public java.awt.Insets getInsets()
      • getShadowColors

        public java.awt.Color[] getShadowColors()