public class TableLayoutHelper
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static int |
FILL_LASTCOL_AND_ROW |
static int |
FILL_LASTCOLUMN |
static int |
FILL_LASTROW |
static int |
FILL_NONE |
限定符和类型 | 方法和说明 |
---|---|
static javax.swing.JPanel |
createCommonTableLayoutPane(java.awt.Component[][] components,
double[] rowSize,
double[] columnSize,
double gap) |
static javax.swing.JPanel |
createDiffVGapTableLayoutPane(java.awt.Component[][] components,
double[] rowSize,
double[] columnSize,
double horizontalGap,
double[] verticalGap) |
static javax.swing.JPanel |
createGapTableLayoutPane(java.awt.Component[][] components,
double[] rowSize,
double[] columnSize,
double horizontalGap,
double verticalGap) |
static javax.swing.JPanel |
createGapTableLayoutPane(java.awt.Component[][] components,
double[] rowSize,
double[] columnSize,
int[][] rowCount,
double horizontalGap,
double verticalGap) |
static javax.swing.JPanel |
createGapTableLayoutPane(java.awt.Component[][] components,
int fillType,
double horizontalGap,
double verticalGap) |
static javax.swing.JPanel |
createTableLayoutPane(java.awt.Component[][] components,
double[] rowSize,
double[] columnSize) |
static javax.swing.JPanel |
createTableLayoutPane(java.awt.Component[][] components,
int fillType)
最常用的最后一行列fill或者都是prefer的tablelayout
|
static javax.swing.JPanel |
createTableLayoutPane4Chart(java.lang.String[] title,
java.awt.Component[][] components,
double[] rowSize,
double[] columnSize)
图表属性表用的比较多的一种布局,第一行是title,下面的components相当于二级菜单
二级菜单和上层面板的间距在layoutconstants里定义
|
static javax.swing.JPanel |
createTableLayoutPaneWithTitle(java.lang.String title,
java.awt.Component component)
标题布局(二级菜单距左边框46)
|
static javax.swing.JPanel |
createTitlePane(java.lang.String title,
java.awt.Component component,
int gap) |
static javax.swing.JPanel |
createTitlePaneWithUILabel(UILabel label,
java.awt.Component component,
int gap)
标题布局(指定gap)
|
static void |
main(java.lang.String[] args) |
static void |
modifyTableLayoutIndexHGap(java.awt.Container container,
int index,
double hgap)
修改TableLayout布局的容器指定位置水平间距的大小。
|
static void |
modifyTableLayoutIndexVGap(java.awt.Container container,
int index,
double vgap)
修改TableLayout布局的容器指定位置垂直间距的大小。
|
public static final int FILL_NONE
public static final int FILL_LASTCOLUMN
public static final int FILL_LASTROW
public static final int FILL_LASTCOL_AND_ROW
public static javax.swing.JPanel createTableLayoutPane(java.awt.Component[][] components, int fillType)
components
- 组件public static javax.swing.JPanel createTableLayoutPane(java.awt.Component[][] components, double[] rowSize, double[] columnSize)
public static javax.swing.JPanel createTableLayoutPaneWithTitle(java.lang.String title, java.awt.Component component)
title
- 标题component
- 组件public static javax.swing.JPanel createTitlePane(java.lang.String title, java.awt.Component component, int gap)
public static javax.swing.JPanel createTitlePaneWithUILabel(UILabel label, java.awt.Component component, int gap)
label
- 标题labelcomponent
- 组件gap
- 距左侧距离public static javax.swing.JPanel createCommonTableLayoutPane(java.awt.Component[][] components, double[] rowSize, double[] columnSize, double gap)
public static javax.swing.JPanel createGapTableLayoutPane(java.awt.Component[][] components, int fillType, double horizontalGap, double verticalGap)
public static javax.swing.JPanel createGapTableLayoutPane(java.awt.Component[][] components, double[] rowSize, double[] columnSize, double horizontalGap, double verticalGap)
public static javax.swing.JPanel createDiffVGapTableLayoutPane(java.awt.Component[][] components, double[] rowSize, double[] columnSize, double horizontalGap, double[] verticalGap)
public static javax.swing.JPanel createGapTableLayoutPane(java.awt.Component[][] components, double[] rowSize, double[] columnSize, int[][] rowCount, double horizontalGap, double verticalGap)
public static void modifyTableLayoutIndexVGap(java.awt.Container container, int index, double vgap)
container
- 容器index
- vgap的索引,Container{vGapA[ComponentA]vGapB[ComponentB]vGapC},vGapB index=2,
详情见TableLayout.setRow(int, double)
vgap
- vgap的新值public static void modifyTableLayoutIndexHGap(java.awt.Container container, int index, double hgap)
container
- 容器index
- hgap的索引,Container{hGapA[ComponentA]hGapB[ComponentB]},hGapB index=2,
详情见TableLayout.setColumn(int, double)
hgap
- hgap的新值public static javax.swing.JPanel createTableLayoutPane4Chart(java.lang.String[] title, java.awt.Component[][] components, double[] rowSize, double[] columnSize)
title
- components
- 二级菜单的内容rowSize
- 二级菜单的行数columnSize
- 二级菜单的列数public static void main(java.lang.String[] args)