|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.miginfocom.layout.LayoutUtil
public final class LayoutUtil
A utility class that has only static helper methods.
Field Summary | |
---|---|
static boolean |
HAS_BEANS
|
static int |
INF
A substitute value for aa really large value. |
static int |
MAX
|
static int |
MIN
|
static int |
PREF
|
Method Summary | |
---|---|
static int |
getDesignTimeEmptySize()
The size of an empty row or columns in a grid during design time. |
static int |
getGlobalDebugMillis()
If global debug should be on or off. |
static java.lang.Object |
getSerializedObject(java.lang.Object caller)
Returns the serialized object that are associated with caller . |
static int |
getSizeSafe(int[] sizes,
int sizeType)
|
static java.lang.String |
getVersion()
Returns the current version of MiG Layout. |
static boolean |
isDesignTime(ContainerWrapper cw)
Returns if design time is turned on for a Container in ContainerWrapper . |
static boolean |
isLeftToRight(LC lc,
ContainerWrapper container)
Returns if left-to-right orientation is used. |
static java.lang.Object |
readAsXML(java.io.ObjectInput in)
Reads an object from in using the |
static void |
setDesignTime(ContainerWrapper cw,
boolean b)
Sets if design time is turned on for a Container in ContainerWrapper . |
static void |
setDesignTimeEmptySize(int pixels)
The size of an empty row or columns in a grid during design time. |
static void |
setGlobalDebugMillis(int millis)
If global debug should be on or off. |
static void |
setSerializedObject(java.lang.Object caller,
java.lang.Object o)
Sets the serialized object and associates it with caller . |
static void |
writeAsXML(java.io.ObjectOutput out,
java.lang.Object o)
Writes an object to XML. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INF
public static final int MIN
public static final int PREF
public static final int MAX
public static final boolean HAS_BEANS
Method Detail |
---|
public static java.lang.String getVersion()
public static int getGlobalDebugMillis()
LC.setDebugMillis(int)
public static void setGlobalDebugMillis(int millis)
Note! This is a passive value and will be read by panels when the needed, which is normally when they repaint/layout.
millis
- The new debug milliseconds. 0 turns of global debug and leaves debug up to every
individual panel.LC.setDebugMillis(int)
public static void setDesignTime(ContainerWrapper cw, boolean b)
ContainerWrapper
.
cw
- The container to set design time for. null
is 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.
b
- true
means design time on.public static boolean isDesignTime(ContainerWrapper cw)
ContainerWrapper
.
cw
- The container to set design time for. null
is legal will return true
if there is at least one ContainerWrapper
(or null
) that have design time
turned on.
cw
.public static int getDesignTimeEmptySize()
public static void setDesignTimeEmptySize(int pixels)
pixels
- 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.public static int getSizeSafe(int[] sizes, int sizeType)
public static boolean isLeftToRight(LC lc, ContainerWrapper container)
parent
is used.
lc
- The constraint if there is one. Can be null
.container
- The parent that may be used to get the left-to-right if ffc does not specify this.
public static void writeAsXML(java.io.ObjectOutput out, java.lang.Object o) throws java.io.IOException
out
- The boject out to write to. Will not be closed.o
- The object to write.
java.io.IOException
public static java.lang.Object readAsXML(java.io.ObjectInput in) throws java.io.IOException
in
using the
in
- The object input to read from.
null
.
java.io.IOException
- If there was a problem saving as XMLpublic static void setSerializedObject(java.lang.Object caller, java.lang.Object o)
caller
.
caller
- The object created o
o
- The just serialized object.public static java.lang.Object getSerializedObject(java.lang.Object caller)
caller
. It also removes it from the list.
caller
- The original creator of the object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |