|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbb.gui.LineLayout.UnitTest
public static class LineLayout.UnitTest
See the Overview page of the project's javadocs for a general description of this unit test class.
Field Summary | |
---|---|
private static Border |
border
|
private static int |
nextX
|
private static int |
nextY
|
Constructor Summary | |
---|---|
private |
LineLayout.UnitTest()
This private constructor suppresses the default (public) constructor, ensuring non-instantiability. |
Method Summary | |
---|---|
private static JPanel |
buildExampleBoxLayoutFails()
Is the result of buildExampleBoxLayoutWorks, but have added below it 2 JButtons (whose total length is significantly less either JLabel) in a sub-JPanel that is center-justified. |
private static JPanel |
buildExampleBoxLayoutWorks()
This adds 2 JLabels into a JPanel with a vertical BoxLayout LayoutManager. |
private static JPanel |
buildExampleLineLayoutDoesFancyAlignment()
Adds 5 JLabels in a vertical Linelayout. |
private static JPanel |
buildExampleLineLayoutWorks()
Is the result of buildExampleBoxLayoutFails, but with a new LineLayout swapped in as a replacement LayoutManager. |
private static JFrame |
buildFrame(String title,
JComponent contents)
|
private static JPanel |
buildTwoHorizontalButtons()
|
static void |
main(String[] args)
This method may be called to demonstrate how Sun's BoxLayout fails while LineLayout works. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Border border
private static int nextX
private static int nextY
Constructor Detail |
---|
private LineLayout.UnitTest()
Method Detail |
---|
public static void main(String[] args)
private static JFrame buildFrame(String title, JComponent contents)
private static JPanel buildExampleBoxLayoutWorks()
private static JPanel buildExampleBoxLayoutFails()
private static JPanel buildTwoHorizontalButtons()
private static JPanel buildExampleLineLayoutWorks()
private static JPanel buildExampleLineLayoutDoesFancyAlignment()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |