Documentation of 'de.erichseifert.gral.graphics.layout.TableLayout' Java class
TableLayout
de.erichseifert.gral.graphics.layout

Class TableLayout

  • All Implemented Interfaces:
    Layout, java.io.Serializable


    public class TableLayout
    extends AbstractLayout
    Implementation of Layout that arranges a Container's components according to a tabular grid with a fixed number of columns. This is similar to Java's GridLayout, but the cells in the grid may have different dimensions.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      TableLayout(int cols)
      Initializes a layout manager object with the specified number of columns and no gap between the components.
      TableLayout(int cols, double gapH, double gapV)
      Initializes a layout manager object with the specified number of columns and the distances between the components.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getColumns()
      Returns the number of desired columns.
      java.awt.geom.Dimension2D getPreferredSize(Container container)
      Returns the preferred size of the specified container using this layout.
      void layout(Container container)
      Arranges the components of the specified container according to this layout.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TableLayout

        public TableLayout(int cols,
                           double gapH,
                           double gapV)
        Initializes a layout manager object with the specified number of columns and the distances between the components.
        Parameters:
        cols - Number of columns
        gapH - Horizontal gap.
        gapV - Vertical gap.
      • TableLayout

        public TableLayout(int cols)
        Initializes a layout manager object with the specified number of columns and no gap between the components.
        Parameters:
        cols - Number of columns.
    • Method Detail

      • layout

        public void layout(Container container)
        Arranges the components of the specified container according to this layout.
        Parameters:
        container - Container to be laid out.
      • getPreferredSize

        public java.awt.geom.Dimension2D getPreferredSize(Container container)
        Returns the preferred size of the specified container using this layout.
        Parameters:
        container - Container whose preferred size is to be returned.
        Returns:
        Preferred extent of the specified container.
      • getColumns

        public int getColumns()
        Returns the number of desired columns.
        Returns:
        Number of desired columns.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.