|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbb.gui.ContainerUtil
public final class ContainerUtil
Provides static utility methods that deal with Containers.
Like typical Java GUI code, this class is not multithread safe:
it expects to only be called by EventQueue
's dispatch thread
.
This threading limitation is checked in every public method.
Constructor Summary | |
---|---|
private |
ContainerUtil()
This sole private constructor suppresses the default (public) constructor, ensuring non-instantiability outside of this class. |
Method Summary | |
---|---|
static int |
getAvailableHeight(Container container)
Returns the height which is available for child Components (i.e. takes container's Insets into account). |
static int |
getAvailableWidth(Container container)
Returns the width which is available for child Components (i.e. takes container's Insets into account). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private ContainerUtil()
Method Detail |
---|
public static int getAvailableWidth(Container container) throws IllegalArgumentException, IllegalStateException
IllegalArgumentException
- if container == null
IllegalStateException
- if calling thread is not EventQueue
's dispatch thread
JFrame
public static int getAvailableHeight(Container container) throws IllegalArgumentException, IllegalStateException
IllegalArgumentException
- if container == null
IllegalStateException
- if calling thread is not EventQueue
's dispatch thread
JFrame
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |