# 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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CoordinateLayout()`
  Allows creating a coordinate layouts that disables the scaling feature
  `CoordinateLayout(int width, int height)`
  This constructor accepts the relative width and height used to define the aspect ratio of the Container
  `CoordinateLayout(Dimension d)`
  This constructor accepts the relative width and height used to define the aspect ratio of the Container

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Dimension`
  `getPreferredSize(Container parent)`
  Returns the container preferred size
  `boolean`
  `isOverlapSupported()`
  This method returns true if the Layout allows Components to Overlap.
  `void`
  `layoutContainer(Container parent)`
  Layout the given parent container children

  ### Methods inherited from class Layout

  `addLayoutComponent, cloneConstraint, equals, getChildrenInTraversalOrder, getComponentConstraint, hashCode, isConstraintTracking, obscuresPotential, overridesTabIndices, removeLayoutComponent, updateTabIndices`

  ### Methods inherited from class Object

  `clone, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## 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`