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, updateTabIndicesModifier and TypeMethodDescriptionvoidaddLayoutComponent(Object value, Component comp, Container c) Some layouts can optionally track the addition of elements with meta-data that allows the user to "hint" on object positioning.cloneConstraint(Object constraint) booleanIndicates whether some other object is "equal to" this one.protected Component[]getChildrenInTraversalOrder(Container parent) Gets the children of the parent container in the order that they should be traversed when tabbing through a form.Returns the optional component constraintinthashCode()Returns a hash code value for the object.booleanIf this method returns true, the addLayoutComponent method will be called when replacing a layout for every component within the containerbooleanobscuresPotential(Container parent) Some layout managers can obscure their child components in some cases this returns true if the basic underpinnings are in place for that.booleanoverridesTabIndices(Container parent) If a layout specifies a different traversal order of its components than the component index, then it should override this method to return true, and it should also override#getChildrenInTraversalOrder(com.codename1.ui.Container)to set the tab indices of a container's children.voidRemoves the component from the layout this operation is only useful if the layout maintains references to components within itfinal intupdateTabIndices(Container parent, int offset) Updates the tab traversal orderMethods inherited from class Object
clone, getClass, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()final ClassgetClass()Returns the runtime class of an object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
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
-