Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class LayoutUtil
- Object
- LayoutUtil
Fields
Methods
Inherited methods
Field details
INF
public static final int INF = 2097051MIN
public static final int MIN = 0PREF
public static final int PREF = 1MAX
public static final int MAX = 2HORIZONTAL
public static final int HORIZONTAL = 0VERTICAL
public static final int VERTICAL = 1HAS_BEANS
public static final boolean HAS_BEANSMethod details
getVersion
public static String getVersion()Returns
getGlobalDebugMillis
public static int getGlobalDebugMillis()Returns
See also
setGlobalDebugMillis
public static void setGlobalDebugMillis(int millis)If global debug should be on or off. If > 0 then debug is turned on for all MigLayout instances.
Note! This is a passive value and will be read by panels when the needed, which is normally when they repaint/layout.
Parameters
millisint- The new debug milliseconds. 0 turns of global debug and leaves debug up to every individual panel.
See also
setDesignTime
public static void setDesignTime(ContainerWrapper cw, boolean b)ContainerWrapper.Parameters
cwContainerWrapperThe container to set design time for.
nullis legal and can be used as a key to turn on/off design time “in general”. Note though that design time “in general” is always on as long as there is at least one ContainerWrapper with design time.If this method has not ever been called it will default to what
Beans.isDesignTime()returns. This means that if you call this method you indicate that you will take responsibility for the design time value.bbooleantruemeans design time on.
isDesignTime
public static boolean isDesignTime(ContainerWrapper cw)ContainerWrapper.Parameters
cwContainerWrapper- The container to set design time for.
nullis legal will returntrueif there is at least oneContainerWrapper(ornull) that have design time turned on.
Returns
cw.getDesignTimeEmptySize
public static int getDesignTimeEmptySize()Returns
setDesignTimeEmptySize
public static void setDesignTimeEmptySize(int pixels)Parameters
pixelsint- The number of pixels. Default is 0 (it was 15 prior to v3.7.2, but since that meant different behaviour under design time by default it was changed to be 0, same as non-design time). IDE vendors can still set it to 15 to get the old behaviour.
getSizeSafe
public static int getSizeSafe(int[] sizes, int sizeType)isLeftToRight
public static boolean isLeftToRight(LC lc, ContainerWrapper container)parent is used.Parameters
lcLC- The constraint if there is one. Can be
null. containerContainerWrapper- The parent that may be used to get the left-to-right if ffc does not specify this.
Returns
setSerializedObject
public static void setSerializedObject(Object caller, Object o)caller.Parameters
callerObject- The object created
o oObject- The just serialized object.
getSerializedObject
public static Object getSerializedObject(Object caller)caller. It also removes it from the list.Parameters
callerObject- The original creator of the object.