Klasse BorderLayout

java.lang.Object
net.sf.jguiraffe.gui.layout.PercentLayoutBase
net.sf.jguiraffe.gui.layout.BorderLayout
Alle implementierten Schnittstellen:
Serializable

public class BorderLayout extends PercentLayoutBase

A GUI library independent implementation of the AWT layout manager BorderLayout.

This layout manager implements the BorderLayout functionality based on the PercentLayout layout manager. Because of that it can be used for all platforms for which an adapter is available.

This implementation differs from the original BorderLayout in only a few points: Margins can be defined around the hosting container and individual gaps are supported between all hosted components. These margins and gaps can be specified using all supported units.

Version:
$Id: BorderLayout.java 205 2012-01-29 18:29:57Z oheger $
Autor:
Oliver Heger
Siehe auch:
  • Felddetails

  • Konstruktordetails

    • BorderLayout

      public BorderLayout()
      Creates a new instance of BorderLayout.
  • Methodendetails

    • getBottomMargin

      public NumberWithUnit getBottomMargin()
      Returns the bottom margin.
      Gibt zurück:
      the bottom margin
    • setBottomMargin

      public void setBottomMargin(NumberWithUnit bottomMargin)
      Sets the bottom margin.
      Parameter:
      bottomMargin - the bottom margin
    • getEastGap

      public NumberWithUnit getEastGap()
      Returns the east gap.
      Gibt zurück:
      the east gap
    • setEastGap

      public void setEastGap(NumberWithUnit eastGap)
      Sets the east gap. This is a gap between the center and the east component.
      Parameter:
      eastGap - the east gap
    • getLeftMargin

      public NumberWithUnit getLeftMargin()
      Returns the left margin.
      Gibt zurück:
      the left margin
    • setLeftMargin

      public void setLeftMargin(NumberWithUnit leftMargin)
      Sets the left margin.
      Parameter:
      leftMargin - the left margin
    • getNorthGap

      public NumberWithUnit getNorthGap()
      Returns the north gap.
      Gibt zurück:
      the north gap
    • setNorthGap

      public void setNorthGap(NumberWithUnit northGap)
      Sets the north gap. This is a gap between the north and the center component.
      Parameter:
      northGap - the north gap
    • getRightMargin

      public NumberWithUnit getRightMargin()
      Returns the right margin.
      Gibt zurück:
      the right margin
    • setRightMargin

      public void setRightMargin(NumberWithUnit rightMargin)
      Sets the right margin.
      Parameter:
      rightMargin - the right margin
    • getSouthGap

      public NumberWithUnit getSouthGap()
      Returns the south gap.
      Gibt zurück:
      the south gap
    • setSouthGap

      public void setSouthGap(NumberWithUnit southGap)
      Sets the south gap. This is a gap between the south and the center component.
      Parameter:
      southGap - the south gap
    • getTopMargin

      public NumberWithUnit getTopMargin()
      Returns the top margin.
      Gibt zurück:
      the top margin
    • setTopMargin

      public void setTopMargin(NumberWithUnit topMargin)
      Sets the top margin.
      Parameter:
      topMargin - the top margin
    • getWestGap

      public NumberWithUnit getWestGap()
      Returns the west gap.
      Gibt zurück:
      the west gap
    • setWestGap

      public void setWestGap(NumberWithUnit westGap)
      Sets the west gap. This is a gap between the west and the center component.
      Parameter:
      westGap - the west gap
    • initCells

      protected void initCells(PercentLayoutPlatformAdapter adapter)
      Initializes the percent layout. This implementation creates a layout with 7 columns and 7 rows and places the contained components in the appropriate cells according to their constraints.
      Angegeben von:
      initCells in Klasse PercentLayoutBase
      Parameter:
      adapter - the platform adapter
    • initConstraints

      protected void initConstraints(boolean north, boolean south, boolean west, boolean east)
      Initializes the column and row constraints for the percent layout. They depend on the occupied positions in the border layout.
      Parameter:
      north - flag whether the north position is occupied
      south - flag whether the south position is occupied
      west - flag whether the west position is occupied
      east - flag whether the east position is occupied