Class SynthBorder

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

    class SynthBorder
    extends javax.swing.border.AbstractBorder
    implements javax.swing.plaf.UIResource
    SynthBorder is a border that delegates to a Painter. The Insets are determined at construction time.

    Copied from core

    Version:
    1.15, 11/30/06
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.awt.Insets insets  
      private SynthUI ui  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Insets getBorderInsets​(java.awt.Component c)
      This default implementation returns a new Insets instance where the top, left, bottom, and right fields are set to 0.
      java.awt.Insets getBorderInsets​(java.awt.Component c, java.awt.Insets insets)
      Reinitializes the insets parameter with this Border's current Insets.
      boolean isBorderOpaque()
      This default implementation returns false.
      void paintBorder​(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)  
      • Methods inherited from class javax.swing.border.AbstractBorder

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • insets

        private java.awt.Insets insets
    • Constructor Detail

      • SynthBorder

        SynthBorder​(SynthUI ui,
                    java.awt.Insets insets)
      • SynthBorder

        SynthBorder​(SynthUI ui)
    • Method Detail

      • 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
        Overrides:
        paintBorder in class javax.swing.border.AbstractBorder
      • getBorderInsets

        public java.awt.Insets getBorderInsets​(java.awt.Component c)
        This default implementation returns a new Insets instance where the top, left, bottom, and right fields are set to 0.
        Specified by:
        getBorderInsets in interface javax.swing.border.Border
        Overrides:
        getBorderInsets in class javax.swing.border.AbstractBorder
        Parameters:
        c - the component for which this border insets value applies
        Returns:
        the new Insets object initialized to 0
      • getBorderInsets

        public java.awt.Insets getBorderInsets​(java.awt.Component c,
                                               java.awt.Insets insets)
        Reinitializes the insets parameter with this Border's current Insets.
        Overrides:
        getBorderInsets in class javax.swing.border.AbstractBorder
        Parameters:
        c - the component for which this border insets value applies
        insets - the object to be reinitialized
        Returns:
        the insets object
      • isBorderOpaque

        public boolean isBorderOpaque()
        This default implementation returns false.
        Specified by:
        isBorderOpaque in interface javax.swing.border.Border
        Overrides:
        isBorderOpaque in class javax.swing.border.AbstractBorder
        Returns:
        false