|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.GridLayout | +--com.klg.jclass.util.swing.JCGridLayout | +--com.klg.jclass.util.swing.JCAlignLayout
A layout that provides a simple way to lay out a vertically arranged group of control components, each with an associated label (or other component) placed to its left.
Properties
Name | Method |
---|---|
LabelDefaultAlignment | setLabelDefaultAlignment |
LabelVerticalAlignment | setLabelVerticalAlignment |
ResizeHeight | setResizeHeight |
ResizeWidth | setResizeWidth |
Field Summary | |
protected Hashtable |
alignment
|
static int |
BOTTOM
|
static int |
MIDDLE
|
protected Hashtable |
resize_height
|
protected Hashtable |
resize_width
|
static int |
TOP
|
Fields inherited from class com.klg.jclass.util.swing.JCGridLayout |
col_widths, cols, hgap, row_heights, rows, VARIABLE, vgap |
Constructor Summary | |
JCAlignLayout()
Creates an aligner layout with 2 columns, a variable number of rows, and a gap of 5 pixels. |
|
JCAlignLayout(int cols,
int hgap,
int vgap)
Creates an aligner layout with the specified number of columns and gaps. |
Method Summary | |
int |
getLabelVerticalAlignment(Component child)
Gets the vertical position of a label relative to its control. |
boolean |
getResizeHeight(Component child)
Gets the component's RezizeHeight value. |
boolean |
getResizeWidth(Component child)
Gets the component's RezizeWidth value. |
protected boolean |
isLabel(int col)
|
protected void |
setBounds(int pos,
int row,
int col,
Component comp,
int x,
int y,
int col_width,
int row_height)
Positions the component. |
void |
setLabelVerticalAlignment(Component child,
int align)
Sets the vertical position of a label relative to its control. |
void |
setResizeHeight(Component child,
boolean v)
Sets whether the control should be resized vertically to the height of the largest component in its row (default is false ). |
void |
setResizeWidth(Component child,
boolean v)
Sets whether the control should be resized horizontally to its parent's right edge if it is in the last column (default is false ). |
Methods inherited from class com.klg.jclass.util.swing.JCGridLayout |
getGridSizes, layoutContainer, minimumLayoutSize, preferredLayoutSize |
Methods inherited from class java.awt.GridLayout |
addLayoutComponent, getColumns, getHgap, getRows, getVgap, removeLayoutComponent, setColumns, setHgap, setRows, setVgap, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TOP
public static final int MIDDLE
public static final int BOTTOM
protected Hashtable alignment
protected Hashtable resize_width
protected Hashtable resize_height
Constructor Detail |
public JCAlignLayout()
public JCAlignLayout(int cols, int hgap, int vgap)
cols
- the number of columns (should be a multiple of 2)hgap
- the horizontal gap variablevgap
- the vertical gap variable
IllegalArgumentException
- If the rows and columns are invalid.Method Detail |
public int getLabelVerticalAlignment(Component child)
child
-
setLabelVerticalAlignment(java.awt.Component, int)
public void setLabelVerticalAlignment(Component child, int align)
align
- TOP
, MIDDLE
(default), or
BOTTOM
child
-
IllegalArgumentException
- If an invalid value is set.public boolean getResizeWidth(Component child)
RezizeWidth
value.
child
-
setResizeWidth(java.awt.Component, boolean)
public void setResizeWidth(Component child, boolean v)
false
).
child
- v
- public boolean getResizeHeight(Component child)
RezizeHeight
value.
child
-
setResizeHeight(java.awt.Component, boolean)
public void setResizeHeight(Component child, boolean v)
false
). This value is
ignored for labels (the components in odd columns).
child
- v
- protected boolean isLabel(int col)
protected void setBounds(int pos, int row, int col, Component comp, int x, int y, int col_width, int row_height)
setBounds
in class JCGridLayout
pos
- the component's index in its parents child listrow
- component's positioncol
- component's positioncol_width
- comp
- row_height
- x
- y
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |