Class FormDebugUtils
java.lang.Object
com.jgoodies.forms.debug.FormDebugUtils
Provides static methods that help you understand and fix layout problems
when using the
FormLayout. Dumps information about the layout grid,
layout groups and cell constraints to the console.Implicit values are mapped to concrete. For example, implicit alignments in column and row specifications will be visible. And cell constraint alignments that use or override the column and row defaults are visible too.
ColumnSpec("p") -> ColumnSpec("fill:pref:0");
ColumnSpec("p:1") -> ColumnSpec("fill:pref:1");
RowSpec("p") -> RowSpec("center:pref:0");
RowSpec("p:1") -> RowSpec("center:pref:1");
- Version:
- $Revision: 1.10 $
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDumps all layout state to the console: column and row specifications, column and row groups, grid bounds and cell constraints.static voiddumpColumnGroups(FormLayout layout) Dumps the layout's column groups to the console.static voiddumpColumnSpecs(FormLayout layout) Dumps the layout's column specifications to the console.static voiddumpConstraints(Container container) Dumps the component constraints to the console.static voiddumpGridBounds(FormLayout.LayoutInfo layoutInfo) Dumps the grid layout info to the console.static voiddumpGridBounds(Container container) Dumps the container's grid info to the console if and only if the container's layout is aFormLayout.private static voiddumpGroups(String title, int[][] allGroups) Dumps the given groups to the console.static voiddumpRowGroups(FormLayout layout) Dumps the layout's row groups to the console.static voiddumpRowSpecs(FormLayout layout) Dumps the layout's row specifications to the console.static FormLayout.LayoutInfogetLayoutInfo(Container container) Computes and returns the layout's grid origins.
-
Constructor Details
-
FormDebugUtils
private FormDebugUtils()
-
-
Method Details
-
dumpAll
Dumps all layout state to the console: column and row specifications, column and row groups, grid bounds and cell constraints.- Parameters:
container- the layout container
-
dumpColumnSpecs
Dumps the layout's column specifications to the console.- Parameters:
layout- theFormLayoutto inspect
-
dumpRowSpecs
Dumps the layout's row specifications to the console.- Parameters:
layout- theFormLayoutto inspect
-
dumpColumnGroups
Dumps the layout's column groups to the console.- Parameters:
layout- theFormLayoutto inspect
-
dumpRowGroups
Dumps the layout's row groups to the console.- Parameters:
layout- theFormLayoutto inspect
-
dumpGridBounds
Dumps the container's grid info to the console if and only if the container's layout is aFormLayout.- Parameters:
container- the container to inspect- Throws:
IllegalArgumentException- if the layout is not FormLayout
-
dumpGridBounds
Dumps the grid layout info to the console.- Parameters:
layoutInfo- provides the column and row origins
-
dumpConstraints
Dumps the component constraints to the console.- Parameters:
container- the layout container to inspect
-
dumpGroups
Dumps the given groups to the console.- Parameters:
title- a string title for the dumpallGroups- a two-dimensional array with all groups
-
getLayoutInfo
Computes and returns the layout's grid origins.- Parameters:
container- the layout container to inspect- Returns:
- an object that comprises the cell origins and extents
- Throws:
NullPointerException- ifcontainerisNullPointerExceptionIllegalArgumentException- ifcontainer's layout is not FormLayout
-