Class CoordinateLayout

java.lang.Object
com.codename1.ui.layouts.Layout
com.codename1.ui.layouts.CoordinateLayout

public class CoordinateLayout extends Layout

Allows laying out components based on absolute positions/sizes that are adapted based on available space for the layout. The layout

Deprecated

the usage of this layout is strongly discouraged as elements will not adapt to the right position/size

  • Constructor Details

    • CoordinateLayout

      public CoordinateLayout()
      Allows creating a coordinate layouts that disables the scaling feature
    • CoordinateLayout

      public CoordinateLayout(int width, int height)

      This constructor accepts the relative width and height used to define the aspect ratio of the Container

      Parameters
      • width

      • height

    • CoordinateLayout

      public CoordinateLayout(Dimension d)

      This constructor accepts the relative width and height used to define the aspect ratio of the Container

      Parameters
      • d: the width/height
  • Method Details

    • layoutContainer

      public void layoutContainer(Container parent)

      Layout the given parent container children

      Parameters
      • parent: the given parent container
      Specified by:
      layoutContainer in class Layout
    • getPreferredSize

      public Dimension getPreferredSize(Container parent)

      Returns the container preferred size

      Parameters
      • parent: the parent container
      Returns

      the container preferred size

      Specified by:
      getPreferredSize in class Layout
    • isOverlapSupported

      public boolean isOverlapSupported()

      This method returns true if the Layout allows Components to Overlap.

      Returns

      true if Components may intersect in this layout

      Overrides:
      isOverlapSupported in class Layout