com.jgoodies.forms.debug
Class FormDebugUtils

java.lang.Object
  extended by com.jgoodies.forms.debug.FormDebugUtils

public final class FormDebugUtils
extends java.lang.Object

Provides static methods that help you understand and fix layout problems when using the FormLayout. Therefore it can dump information about the layout grid, layout groups and cell constraints to the console.

Version:
$Revision: 1.1 $
Author:
Karsten Lentzsch

Constructor Summary
FormDebugUtils()
           
 
Method Summary
static void dumpAll(java.awt.Container container)
          Dumps all layout state to the console: column and row specifications, column and row groups, grid bounds and cell constraints.
static void dumpColumnGroups(FormLayout layout)
          Dumps the layout's column groups to the console.
static void dumpColumnSpecs(FormLayout layout)
          Dumps the layout's column specifications to the console.
static void dumpConstraints(java.awt.Container container)
          Dumps the component constraints to the console.
static void dumpGridBounds(java.awt.Container container)
          Dumps the container's grid info to the console if and only if the container's layout is a FormLayout.
static void dumpGridBounds(FormLayout.LayoutInfo layoutInfo)
          Dumps the grid layout info to the console.
static void dumpRowGroups(FormLayout layout)
          Dumps the layout's row groups to the console.
static void dumpRowSpecs(FormLayout layout)
          Dumps the layout's row specifications to the console.
static FormLayout.LayoutInfo getLayoutInfo(java.awt.Container container)
          Computes and answers the layout's grid origins.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormDebugUtils

public FormDebugUtils()
Method Detail

dumpAll

public static void dumpAll(java.awt.Container container)
Dumps all layout state to the console: column and row specifications, column and row groups, grid bounds and cell constraints.


dumpColumnSpecs

public static void dumpColumnSpecs(FormLayout layout)
Dumps the layout's column specifications to the console.

Parameters:
layout - the FormLayout to inspect

dumpRowSpecs

public static void dumpRowSpecs(FormLayout layout)
Dumps the layout's row specifications to the console.

Parameters:
layout - the FormLayout to inspect

dumpColumnGroups

public static void dumpColumnGroups(FormLayout layout)
Dumps the layout's column groups to the console.

Parameters:
layout - the FormLayout to inspect

dumpRowGroups

public static void dumpRowGroups(FormLayout layout)
Dumps the layout's row groups to the console.

Parameters:
layout - the FormLayout to inspect

dumpGridBounds

public static void dumpGridBounds(java.awt.Container container)
Dumps the container's grid info to the console if and only if the container's layout is a FormLayout.

Parameters:
container - the container to inspect
Throws:
java.lang.IllegalArgumentException - if the layout is not FormLayout

dumpGridBounds

public static void dumpGridBounds(FormLayout.LayoutInfo layoutInfo)
Dumps the grid layout info to the console.

Parameters:
layoutInfo - provides the column and row origins

dumpConstraints

public static void dumpConstraints(java.awt.Container container)
Dumps the component constraints to the console.

Parameters:
container - the layout container to inspect

getLayoutInfo

public static FormLayout.LayoutInfo getLayoutInfo(java.awt.Container container)
Computes and answers the layout's grid origins.

Parameters:
container - the layout container to inspect
Returns:
an object that comprises the cell origins and extents
Throws:
java.lang.IllegalArgumentException - if the layout is not FormLayout