Class CoordinateLayout
java.lang.Object
com.codename1.ui.layouts.Layout
com.codename1.ui.layouts.CoordinateLayout
Allows laying out components based on absolute positions/sizes
that are adapted based on available space for the layout.
The layout
-
Constructor Summary
ConstructorsConstructorDescriptionAllows creating a coordinate layouts that disables the scaling featureCoordinateLayout(int width, int height) This constructor accepts the relative width and height used to define the aspect ratio of the ContainerThis constructor accepts the relative width and height used to define the aspect ratio of the Container -
Method Summary
Modifier and TypeMethodDescriptiongetPreferredSize(Container parent) Returns the container preferred sizebooleanThis method returns true if the Layout allows Components to Overlap.voidlayoutContainer(Container parent) Layout the given parent container childrenMethods inherited from class Layout
addLayoutComponent, cloneConstraint, equals, getChildrenInTraversalOrder, getComponentConstraint, hashCode, isConstraintTracking, obscuresPotential, overridesTabIndices, removeLayoutComponent, updateTabIndices
-
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
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
Layout the given parent container children
Parameters
parent: the given parent container
- Specified by:
layoutContainerin classLayout
-
getPreferredSize
Returns the container preferred size
Parameters
parent: the parent container
Returns
the container preferred size
- Specified by:
getPreferredSizein classLayout
-
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:
isOverlapSupportedin classLayout
-