Class CRect


  • public class CRect
    extends java.lang.Object
    Component rectangle, that corresponds to a rectangle that was drawn on the supplied Ascii art drawing. Used internally by the GridBagLayoutBuilder and the LayoutParser when computing each GridBagConstraints. Some fine-tuning can be achieved by changing the rect before the constraints get generated. This is usually done by methods in the AsciiArtGridBagLayout class, not directly on the CRect class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int flags
      flags
      int h
      width ant height
      int halign
      horizontal alignment : 1 left 2 centered 3 right
      java.awt.Insets insets
      the insets, default : Insets(5, 5, 5, 5)
      int ipadx
      ipad of x (0 by default)
      int ipady
      ipad of y (0 by default)
      int lineOfName
      line that contains the name
      java.lang.String name
      name of CRect (can be null if no name given)
      int valign
      vertical alignment : 1 top 2 centered 3 bottom
      int w
      width ant height
      double weightx
      weight of x : if >= 0 will be used to force weightx
      double weighty
      weight of y : if >= 0 will be used to force weighty
      int x
      x and y coordinates
      int y
      x and y coordinates
    • Constructor Summary

      Constructors 
      Constructor Description
      CRect()
      Default constructor with no arguments
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()
      convert this CRect to String
      • Methods inherited from class java.lang.Object

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

      • name

        public java.lang.String name
        name of CRect (can be null if no name given)
      • x

        public int x
        x and y coordinates
      • y

        public int y
        x and y coordinates
      • w

        public int w
        width ant height
      • h

        public int h
        width ant height
      • flags

        public int flags
        flags
      • lineOfName

        public int lineOfName
        line that contains the name
      • halign

        public int halign
        horizontal alignment : 1 left 2 centered 3 right
      • valign

        public int valign
        vertical alignment : 1 top 2 centered 3 bottom
      • weightx

        public double weightx
        weight of x : if >= 0 will be used to force weightx
      • weighty

        public double weighty
        weight of y : if >= 0 will be used to force weighty
      • ipadx

        public int ipadx
        ipad of x (0 by default)
      • ipady

        public int ipady
        ipad of y (0 by default)
      • insets

        public java.awt.Insets insets
        the insets, default : Insets(5, 5, 5, 5)
    • Constructor Detail

      • CRect

        public CRect()
        Default constructor with no arguments
    • Method Detail

      • toString

        public java.lang.String toString()
        convert this CRect to String
        Overrides:
        toString in class java.lang.Object