Class SwingBorder

java.lang.Object
com.jformdesigner.model.SwingBorder
All Implemented Interfaces:
SwingResource, Border

public class SwingBorder extends Object implements Border, SwingResource
Used to specify borders from the Swing UI (look and feel) resources. Invokes UIManager.getColor(key) to get the real border.
Since:
3.0
  • Constructor Details

    • SwingBorder

      public SwingBorder(String key)
      Constructs a border from the Swing UI resources.
      Parameters:
      key - The name of the Swing border.
    • SwingBorder

      public SwingBorder(String key, Border border)
      For internal use only.
  • Method Details

    • getKey

      public String getKey()
      Returns The name of the Swing border.
    • equals

      public boolean equals(Object obj)
      Determines whether another object is equal to this object.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Returns the hash code for this object.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Object
    • isBorderOpaque

      public boolean isBorderOpaque()
      Specified by:
      isBorderOpaque in interface Border
    • paintBorder

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

      public Insets getBorderInsets(Component c)
      Specified by:
      getBorderInsets in interface Border