public class CoordinateLayout
Allows laying out components based on absolute positions/sizes
that are adapted based on available space for the layout.
The layout
Constructors
public CoordinateLayout() | Allows creating a coordinate layouts that disables the scaling feature |
public CoordinateLayout(int width, int height) | This constructor accepts the relative width and height used to define the aspect ratio of the Container |
public CoordinateLayout(Dimension d) | This constructor accepts the relative width and height used to define the aspect ratio of the Container |
Methods
public void layoutContainer(Container parent) | Layout the given parent container children |
public Dimension getPreferredSize(Container parent) | Returns the container preferred size |
public boolean isOverlapSupported() | This method returns true if the Layout allows Components to Overlap. |
Inherited methods
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
CoordinateLayout
public CoordinateLayout(Dimension d)This constructor accepts the relative width and height used to define the
aspect ratio of the Container
Parameters
dDimension- the width/height
Method details
layoutContainer
public void layoutContainer(Container parent)Layout the given parent container children
Parameters
parentContainer- the given parent container
getPreferredSize
public Dimension getPreferredSize(Container parent)Returns the container preferred size
Parameters
parentContainer- the parent container
Returns
the container preferred size
isOverlapSupported
public boolean isOverlapSupported()This method returns true if the Layout allows Components to
Overlap.
Returns
true if Components may intersect in this layout