本文整理匯總了Java中com.jgoodies.forms.layout.FormLayout.LayoutInfo方法的典型用法代碼示例。如果您正苦於以下問題:Java FormLayout.LayoutInfo方法的具體用法?Java FormLayout.LayoutInfo怎麽用?Java FormLayout.LayoutInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.jgoodies.forms.layout.FormLayout
的用法示例。
在下文中一共展示了FormLayout.LayoutInfo方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: dumpGridBounds
import com.jgoodies.forms.layout.FormLayout; //導入方法依賴的package包/類
/**
* Dumps the grid layout info to the console.
*
* @param layoutInfo provides the column and row origins
*/
public static void dumpGridBounds(FormLayout.LayoutInfo layoutInfo) {
System.out.print("COLUMN ORIGINS: ");
for (int col = 0; col < layoutInfo.columnOrigins.length; col++) {
System.out.print(layoutInfo.columnOrigins[col] + " ");
}
System.out.println();
System.out.print("ROW ORIGINS: ");
for (int row = 0; row < layoutInfo.rowOrigins.length; row++) {
System.out.print(layoutInfo.rowOrigins[row] + " ");
}
System.out.println();
}
示例2: getLayoutInfo
import com.jgoodies.forms.layout.FormLayout; //導入方法依賴的package包/類
/**
* Computes and returns the layout's grid origins.
*
* @param container the layout container to inspect
* @return an object that comprises the cell origins and extents
* @throws IllegalArgumentException if the layout is not FormLayout
*/
public static FormLayout.LayoutInfo getLayoutInfo(Container container) {
if (!(container.getLayout() instanceof FormLayout)) {
throw new IllegalArgumentException("The container must use an instance of FormLayout.");
}
FormLayout layout = (FormLayout) container.getLayout();
return layout.getLayoutInfo(container);
}
示例3: dumpGridBounds
import com.jgoodies.forms.layout.FormLayout; //導入方法依賴的package包/類
/**
* Dumps the grid layout info to the console.
*
* @param layoutInfo provides the column and row origins
*/
public static void dumpGridBounds(FormLayout.LayoutInfo layoutInfo) {
System.out.print("COLUMN ORIGINS: ");
for (int columnOrigin : layoutInfo.columnOrigins) {
System.out.print(columnOrigin + " ");
}
System.out.println();
System.out.print("ROW ORIGINS: ");
for (int rowOrigin : layoutInfo.rowOrigins) {
System.out.print(rowOrigin + " ");
}
System.out.println();
}
示例4: getLayoutInfo
import com.jgoodies.forms.layout.FormLayout; //導入方法依賴的package包/類
/**
* Computes and returns the layout's grid origins.
*
* @param container the layout container to inspect
* @return an object that comprises the cell origins and extents
* @throws NullPointerException if {@code container} is {@link NullPointerException}
* @throws IllegalArgumentException if {@code container}'s layout is not FormLayout
*/
public static FormLayout.LayoutInfo getLayoutInfo(Container container) {
checkNotNull(container, MUST_NOT_BE_NULL, "container");
checkArgument(container.getLayout() instanceof FormLayout,
"The container must use an instance of FormLayout.");
FormLayout layout = (FormLayout) container.getLayout();
return layout.getLayoutInfo(container);
}