|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
java.lang.Objectjava.awt.GridBagConstraints
public class GridBagConstraints
GridBagConstraints
��ָ��ʹ�� GridBagLayout
�಼�õ������Լ����
GridBagLayout
,
���л������ֶ�ժҪ | |
---|---|
static int |
ABOVE_BASELINE
anchor �ֶεĿ���ֵ�� |
static int |
ABOVE_BASELINE_LEADING
anchor �ֶεĿ���ֵ�� |
static int |
ABOVE_BASELINE_TRAILING
anchor �ֶεĿ���ֵ�� |
int |
anchor
�����С������ʾ����ʱʹ�ô��ֶΡ� |
static int |
BASELINE
anchor �ֶεĿ���ֵ�� |
static int |
BASELINE_LEADING
anchor �ֶεĿ���ֵ�� |
static int |
BASELINE_TRAILING
anchor �ֶεĿ���ֵ�� |
static int |
BELOW_BASELINE
anchor �ֶεĿ���ֵ�� |
static int |
BELOW_BASELINE_LEADING
anchor �ֶεĿ���ֵ�� |
static int |
BELOW_BASELINE_TRAILING
anchor �ֶεĿ���ֵ�� |
static int |
BOTH
��ˮƽ����ʹ�ֱ������ͬʱ���������С�� |
static int |
CENTER
�������������ʾ��������ġ� |
static int |
EAST
�������������ʾ������Ҳ������ڴ�ֱ�����Ͼ��С� |
int |
fill
���������ʾ������������������ʾ����Ĵ�Сʱʹ�ô��ֶΡ� |
static int |
FIRST_LINE_END
�����������ʾ�����һ�ǣ��ڸ������У���ǰ ComponentOrienation ��ҳ��ĵ�һ���ı������������� |
static int |
FIRST_LINE_START
�������������ʾ�����һ�ǣ���һ�ǵ�λ����ҳ�������һ���ı��а��յ�ǰ�� ComponentOrienation ��ҳ���еĿ�ʼλ�á� |
int |
gridheight
ָ���������ʾ�����һ���еĵ�Ԫ������ |
int |
gridwidth
ָ�������ʾ�����ijһ���еĵ�Ԫ������ |
int |
gridx
ָ�������������ʾ����ʼ�ߵĵ�Ԫ�������еĵ�һ����Ԫ��Ϊ gridx=0 �� |
int |
gridy
ָ��λ�������ʾ����Ķ����ĵ�Ԫ���������ϱߵĵ�Ԫ��Ϊ gridy=0 �� |
static int |
HORIZONTAL
��ˮƽ��������Ǵ�ֱ�����ϵ��������С�� |
Insets |
insets
���ֶ�ָ��������ⲿ��䣬�����������ʾ�����Ե֮�������С���� |
int |
ipadx
���ֶ�ָ��������ڲ���䣬�����������С�������Ӷ��Ŀռ䡣 |
int |
ipady
���ֶ�ָ���ڲ���䣬�����������С�߶����Ӷ��Ŀռ䡣 |
static int |
LAST_LINE_END
�������������ʾ�����һ�ǣ���һ�ǵ�λ����ҳ�������һ���ı��а��յ�ǰ�� ComponentOrienation ��ҳ���еĽ���λ�á� |
static int |
LAST_LINE_START
�������������ʾ�����һ�ǣ���һ�ǵ�λ����ҳ�������һ���ı��а��յ�ǰ�� ComponentOrienation ��ҳ���еĿ�ʼλ�á� |
static int |
LINE_END
����ʾ����ı�Ե���з���������ڸ������У���ǰ ComponentOrienation ���ı������������� |
static int |
LINE_START
����ʾ����ı�Ե���з���������ڸ������У���ǰ ComponentOrienation ���ı���������ʼ�� |
static int |
NONE
�����µ��������С�� |
static int |
NORTH
�������������ʾ����Ķ���������ˮƽ�����Ͼ��С� |
static int |
NORTHEAST
�������������ʾ��������Ͻǡ� |
static int |
NORTHWEST
�������������ʾ��������Ͻǡ� |
static int |
PAGE_END
����ʾ����ı�Ե���з������������ʾ�����뵱ǰ ComponentOrienation ��ҳ�����������ء� |
static int |
PAGE_START
����ʾ����ı�Ե���з������������ʾ�����뵱ǰ ComponentOrienation ��ҳ�濪ʼ������ء� |
static int |
RELATIVE
ָ�������Ϊ���л��У� gridwidth ��gridheight ���еĵ����ڶ�������������ô������������ǰ���ӵ������gridx ��gridy ��֮�� |
static int |
REMAINDER
ָ������������л����е����һ������� |
static int |
SOUTH
�������������ʾ����ĵײ�������ˮƽ�����Ͼ��С� |
static int |
SOUTHEAST
�������������ʾ��������½ǡ� |
static int |
SOUTHWEST
�������������ʾ��������½ǡ� |
static int |
VERTICAL
�ڴ�ֱ���������ˮƽ�����ϵ��������С�� |
double |
weightx
ָ����ηֲ������ˮƽ�ռ䡣 |
double |
weighty
ָ����ηֲ�����Ĵ�ֱ�ռ䡣 |
static int |
WEST
�������������ʾ����������ڴ�ֱ�����Ͼ��С� |
���췽��ժҪ | |
---|---|
GridBagConstraints()
����һ�� GridBagConstraint �����������ֶζ�����ΪĬ��ֵ�� |
|
GridBagConstraints(int gridx,
int gridy,
int gridwidth,
int gridheight,
double weightx,
double weighty,
int anchor,
int fill,
Insets insets,
int ipadx,
int ipady)
����һ�� GridBagConstraints �����������ֶζ�����Ϊ��������� |
����ժҪ | |
---|---|
Object |
clone()
�����������Լ����grid bag constraint���ĸ����� |
���� java.lang.Object �̳еķ��� |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
�ֶ���ϸ��Ϣ |
---|
public static final int RELATIVE
gridwidth
��gridheight
���еĵ����ڶ�������������ô������������ǰ���ӵ������gridx
��gridy
��֮��
gridwidth
,
gridheight
,
gridx
,
gridy
,
�����ֶ�ֵpublic static final int REMAINDER
public static final int NONE
public static final int BOTH
public static final int HORIZONTAL
public static final int VERTICAL
public static final int CENTER
public static final int NORTH
public static final int NORTHEAST
public static final int EAST
public static final int SOUTHEAST
public static final int SOUTH
public static final int SOUTHWEST
public static final int WEST
public static final int NORTHWEST
public static final int PAGE_START
ComponentOrienation
��ҳ�濪ʼ������ء���ͬ��ˮƽ����� NORTH��
public static final int PAGE_END
ComponentOrienation
��ҳ�����������ء���ͬ��ˮƽ����� SOUTH��
public static final int LINE_START
ComponentOrienation
���ı���������ʼ����ͬ��ˮƽ�ġ������ҷ���� WEST���Լ�ˮƽ�ġ����ҵ������ EAST��
public static final int LINE_END
ComponentOrienation
���ı���������������ͬ��ˮƽ�ġ������ҷ���� EAST���Լ�ˮƽ�ġ����ҵ������ WEST��
public static final int FIRST_LINE_START
ComponentOrienation
��ҳ���еĿ�ʼλ�á���ͬ��ˮƽ�ġ������ҷ���� NORTHWEST���Լ�ˮƽ�ġ����ҵ������ NORTHEAST��
public static final int FIRST_LINE_END
ComponentOrienation
��ҳ��ĵ�һ���ı���������������ͬ��ˮƽ�ġ������ҷ���� NORTHEAST���Լ�ˮƽ�ġ����ҵ������ NORTHWEST��
public static final int LAST_LINE_START
ComponentOrienation
��ҳ���еĿ�ʼλ�á���ͬ��ˮƽ�ġ������ҵ� SOUTHWEST���Լ�ˮƽ�ġ����ҵ������ SOUTHEAST��
public static final int LAST_LINE_END
ComponentOrienation
��ҳ���еĽ���λ�á���ͬ��ˮƽ�ġ������ҵ� SOUTHEAST���Լ�ˮƽ�ġ����ҵ������ SOUTHWEST��
public static final int BASELINE
anchor
�ֶεĿ���ֵ��ָ�����Ӧ������Ҫ�еĻ���ˮƽ���кʹ�ֱ���롣������û�л��ߣ���ô���ᴹֱ���ж��롣
public static final int BASELINE_LEADING
anchor
�ֶεĿ���ֵ��ָ�����Ӧ�ؿ�ʼ��ˮƽ���á����ڴ����ҷ�����������ʼ������ߡ��������Ҫ�еĻ��ߴ�ֱ���롣������û�л��ߣ���ô���ᴹֱ���ж��롣
public static final int BASELINE_TRAILING
anchor
�ֶεĿ���ֵ��ָ�����Ӧ�ؽ�β��ˮƽ���á����ڴ����ҷ�����������β�����ұߡ��������Ҫ�еĻ��ߴ�ֱ���롣������û�л��ߣ���ô���ᴹֱ���ж��롣
public static final int ABOVE_BASELINE
anchor
�ֶεĿ���ֵ��ָ�����Ӧ��ˮƽ���ж��롣��ֱ���������ʹ���ĵױ߽Ӵ�����ʼ�еĻ��ߡ������ʼ��û�л��ߣ���ô���ᴹֱ���ж��롣
public static final int ABOVE_BASELINE_LEADING
anchor
�ֶεĿ���ֵ��ָ�����Ӧ�ؿ�ʼ��ˮƽ���á����ڴ����ҷ�����������ʼ������ߡ���ֱ���������ʹ���ĵױ߽Ӵ�����ʼ�еĻ��ߡ������ʼ��û�л��ߣ���ô���ᴹֱ���ж��롣
public static final int ABOVE_BASELINE_TRAILING
anchor
�ֶεĿ���ֵ��ָ�����Ӧ�ؽ�β��ˮƽ���á����ڴ����ҷ�����������β�����ұߡ���ֱ���������ʹ���ĵױ߽Ӵ�����ʼ�еĻ��ߡ������ʼ��û�л��ߣ���ô���ᴹֱ���ж��롣
public static final int BELOW_BASELINE
anchor
�ֶεĿ���ֵ��ָ�����Ӧ��ˮƽ���ж��롣��ֱ���������ʹ���ĵױ߽Ӵ�����ʼ�еĻ��ߡ������ʼ��û�л��ߣ���ô���ᴹֱ���ж��롣
public static final int BELOW_BASELINE_LEADING
anchor
�ֶεĿ���ֵ��ָ�����Ӧ�ؿ�ʼ��ˮƽ���á����ڴ����ҷ�����������ʼ������ߡ���ֱ���������ʹ���ĵױ߽Ӵ�����ʼ�еĻ��ߡ������ʼ��û�л��ߣ���ô���ᴹֱ���ж��롣
public static final int BELOW_BASELINE_TRAILING
anchor
�ֶεĿ���ֵ��ָ�����Ӧ�ؽ�β��ˮƽ���á����ڴ����ҷ�����������β�����ұߡ���ֱ���������ʹ���ĵױ߽Ӵ�����ʼ�еĻ��ߡ������ʼ��û�л��ߣ���ô���ᴹֱ���ж��롣
public int gridx
gridx=0
�������ʾ����Ŀ�ʼ��ָ����ˮƽ�ġ������ҵ����������Ե���Լ�ˮƽ�ġ����ҵ�����������ұ�Ե��ֵ RELATIVE
ָ����������������Ӵ����֮ǰ�ո����ӵ������е�����ĺ��档
Ĭ��ֵΪ RELATIVE
��gridx
ӦΪ�Ǹ�ֵ��
clone()
,
gridy
,
ComponentOrientation
public int gridy
gridy=0
��ֵ RELATIVE
ָ����������������Ӵ����֮ǰ�ո����ӵ������е���������档
Ĭ��ֵΪ RELATIVE
��gridy
ӦΪ�Ǹ�ֵ��
clone()
,
gridx
public int gridwidth
ʹ�� REMAINDER
ָ���������ʾ��������ķ�Χ�Ǵ� gridx
�����е����һ����Ԫ��ʹ�� RELATIVE
ָ���������ʾ��������ķ�Χ�Ǵ� gridx
���������еĵ����ڶ�����Ԫ��
gridwidth
ӦΪ�Ǹ���Ĭ��ֵΪ 1��
clone()
,
gridheight
public int gridheight
ʹ�� REMAINDER
ָ���������ʾ��������ķ�Χ�Ǵ� gridy
�����е����һ����Ԫ��ʹ�� RELATIVE
ָ���������ʾ��������ķ�Χ�Ǵ� gridy
���������еĵ����ڶ�����Ԫ��
gridheight
ӦΪ�Ǹ���Ĭ��ֵΪ 1��
clone()
,
gridwidth
public double weightx
��������ֹ�����������е�Ȩ�ؽ����е�������������� weightx
������õ��IJ�����ˮƽ�����ϱ���Ҫ��������С����ôϵͳ�Ὣ����Ŀռ䰴����Ȩ�ر����ֲ���ÿһ�С�Ȩ��Ϊ����в���õ�����Ŀռ䡣
������е�Ȩ�ض�Ϊ�㣬�����еĶ���ռ䶼�������ڵ�Ԫ�������֮������ұ�Ե֮�䡣
���ֶε�Ĭ��ֵΪ 0
��weightx
ӦΪ�Ǹ�ֵ��
clone()
,
weighty
public double weighty
��������ֹ�����������е�Ȩ�ؽ����е�������������� weighty
������õ��IJ����ڴ�ֱ�����ϱ���Ҫ��������С����ϵͳ�Ὣ����Ŀռ䰴����Ȩ�ر����ֲ���ÿһ�С�Ȩ��Ϊ����в���õ�����Ŀռ䡣
������е�Ȩ�ض�Ϊ�㣬�����еĶ���ռ䶼�������ڵ�Ԫ�������֮������±�Ե֮�䡣
���ֶε�Ĭ��ֵΪ 0
��weighty
ӦΪ�Ǹ�ֵ��
clone()
,
weightx
public int anchor
���ܵ�ֵ�����֣�����ڷ����ֵ������ڻ��ߵ�ֵ�;���ֵ������ڷ����ֵ�����������������������Խ��н��͵ģ�����ڻ���ֵ������ڻ��߽��н��͵ģ�����ֵ��Ȼ������ֵ�У�CENTER
��NORTH
��NORTHEAST
��EAST
��SOUTHEAST
��SOUTH
��SOUTHWEST
��WEST
�� NORTHWEST
���������ֵ�У�PAGE_START
��PAGE_END
��LINE_START
��LINE_END
��FIRST_LINE_START
��FIRST_LINE_END
��LAST_LINE_START
�� LAST_LINE_END
������ڻ��ߵ�ֵ�У�BASELINE
��BASELINE_LEADING
��BASELINE_TRAILING
��ABOVE_BASELINE
��ABOVE_BASELINE_LEADING
��ABOVE_BASELINE_TRAILING
��BELOW_BASELINE
��BELOW_BASELINE_LEADING
�� BELOW_BASELINE_TRAILING
��Ĭ��ֵΪ CENTER
��
clone()
,
ComponentOrientation
public int fill
����ֵ������ fill
��
NONE
���������������
HORIZONTAL
���ӿ������ʹ����ˮƽ��������������ʾ�����Dz��ı�߶ȡ�
VERTICAL
���Ӹ������ʹ���ڴ�ֱ��������������ʾ�����Dz��ı���ȡ�
BOTH
��ʹ�����ȫ��������ʾ����
Ĭ��ֵΪ NONE
��
clone()
public Insets insets
Ĭ��ֵΪ new Insets(0, 0, 0, 0)
��
clone()
public int ipadx
ipadx
���ء�
Ĭ��ֵΪ 0
��
clone()
,
ipady
public int ipady
ipady
���ء�
Ĭ��ֵΪ 0��
clone()
,
ipadx
���췽����ϸ��Ϣ |
---|
public GridBagConstraints()
GridBagConstraint
�����������ֶζ�����ΪĬ��ֵ��
public GridBagConstraints(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets, int ipadx, int ipady)
GridBagConstraints
�����������ֶζ�����Ϊ���������ע����Ϊʹ�ô˹��췽�������Դ����Ŀɶ��ԣ����Դ˹��췽�������Զ�Դ�������ɹ���ʹ�á�
gridx
- ��ʼ gridx ֵ��gridy
- ��ʼ gridy ֵ��gridwidth
- ��ʼ gridwidth ֵ��gridheight
- ��ʼ gridheight ֵ��weightx
- ��ʼ weightx ֵ��weighty
- ��ʼ weighty ֵ��anchor
- ��ʼ anchor ֵ��fill
- ��ʼ fill ֵ��insets
- ��ʼ insets ֵ��ipadx
- ��ʼ ipadx ֵ��ipady
- ��ʼ ipady ֵ��gridx
,
gridy
,
gridwidth
,
gridheight
,
weightx
,
weighty
,
anchor
,
fill
,
insets
,
ipadx
,
ipady
������ϸ��Ϣ |
---|
public Object clone()
Object
�е� clone
Cloneable
|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������