| java.lang.Object org.jfree.layout.FormatLayout
FormatLayout | public class FormatLayout implements LayoutManager,Serializable(Code) | | A layout manager that spaces components over six columns in seven different
formats.
author: David Gilbert |
Field Summary | |
final public static int | C A useful constant representing layout format 1. | final public static int | LC A useful constant representing layout format 2. | final public static int | LCB A useful constant representing layout format 3. | final public static int | LCBLC A useful constant representing layout format 6. | final public static int | LCBLCB A useful constant representing layout format 7. | final public static int | LCLC A useful constant representing layout format 4. | final public static int | LCLCB A useful constant representing layout format 5. |
Constructor Summary | |
public | FormatLayout(int rowCount, int[] rowFormats) Constructs a new layout manager that can be used to create input forms. |
Method Summary | |
public void | addLayoutComponent(Component comp) Not used. | public void | addLayoutComponent(String name, Component comp) Not used. | public void | complete() Finishes of the processing. | public void | layoutContainer(Container parent) Performs the layout of the container. | public Dimension | minimumLayoutSize(Container parent) Returns the minimum size of the component using this layout manager.
Parameters: parent - the parent. | public Dimension | preferredLayoutSize(Container parent) Returns the preferred size of the component using this layout manager.
Parameters: parent - the parent. | public void | removeLayoutComponent(Component comp) Not used. | public void | removeLayoutComponent(String name, Component comp) Not used. | protected void | updateC(int rowIndex, Dimension d0) Processes a row in 'C' format. | protected void | updateLC(int rowIndex, Dimension d0, Dimension d1) Processes a row in 'LC' format. | protected void | updateLCB(int rowIndex, Dimension d0, Dimension d1, Dimension d2) Processes a row in 'LCB' format. | protected void | updateLCBLC(int rowIndex, Dimension d0, Dimension d1, Dimension d2, Dimension d3, Dimension d4) Processes a row in 'LCBLC' format. | protected void | updateLCBLCB(int rowIndex, Dimension d0, Dimension d1, Dimension d2, Dimension d3, Dimension d4, Dimension d5) Processes a row in 'LCBLCB' format. | protected void | updateLCLC(int rowIndex, Dimension d0, Dimension d1, Dimension d2, Dimension d3) Processes a row in 'LCLC' format. | protected void | updateLCLCB(int rowIndex, Dimension d0, Dimension d1, Dimension d2, Dimension d3, Dimension d4) Processes a row in 'LCLCB' format. |
C | final public static int C(Code) | | A useful constant representing layout format 1.
|
LC | final public static int LC(Code) | | A useful constant representing layout format 2.
|
LCB | final public static int LCB(Code) | | A useful constant representing layout format 3.
|
LCBLC | final public static int LCBLC(Code) | | A useful constant representing layout format 6.
|
LCBLCB | final public static int LCBLCB(Code) | | A useful constant representing layout format 7.
|
LCLC | final public static int LCLC(Code) | | A useful constant representing layout format 4.
|
LCLCB | final public static int LCLCB(Code) | | A useful constant representing layout format 5.
|
FormatLayout | public FormatLayout(int rowCount, int[] rowFormats)(Code) | | Constructs a new layout manager that can be used to create input forms.
The layout manager works by arranging components in rows using six
columns (some components will use more than one column).
Any component can be added, but I think of them in terms of Labels,
Components, and Buttons.
The formats available are: C, LC, LCB, LCLC, LCLCB, LCBLC or LCBLCB.
C |
1 component in this row (spread across all six columns). |
LC |
2 components, a label in the 1st column, and a component using the
remaining 5 columns). |
LCB |
3 components, a label in the 1st column, a component spread across
the next 4, and a button in the last column. |
LCLC |
4 components, a label in column 1, a component in 2-3, a label in
4 and a component in 5-6. |
LCLCB |
5 components, a label in column 1, a component in 2-3, a label
in 4, a component in 5 and a button in 6. |
LCBLC |
5 components, a label in column 1, a component in 2, a button in 3,
a label in 4, a component in 5-6. |
LCBLCB |
6 components, one in each column. |
Columns 1 and 4 expand to accommodate the widest label, and 3 and 6 to
accommodate the widest button.
Each row will contain the number of components indicated by the format.
Be sure to specify enough row formats to cover all the components you
add to the layout.
Parameters: rowCount - the number of rows. Parameters: rowFormats - the row formats. |
addLayoutComponent | public void addLayoutComponent(Component comp)(Code) | | Not used.
Parameters: comp - the component. |
addLayoutComponent | public void addLayoutComponent(String name, Component comp)(Code) | | Not used.
Parameters: name - the component name. Parameters: comp - the component. |
complete | public void complete()(Code) | | Finishes of the processing.
|
layoutContainer | public void layoutContainer(Container parent)(Code) | | Performs the layout of the container.
Parameters: parent - the parent. |
minimumLayoutSize | public Dimension minimumLayoutSize(Container parent)(Code) | | Returns the minimum size of the component using this layout manager.
Parameters: parent - the parent. the minimum size of the component |
preferredLayoutSize | public Dimension preferredLayoutSize(Container parent)(Code) | | Returns the preferred size of the component using this layout manager.
Parameters: parent - the parent. the preferred size of the component. |
removeLayoutComponent | public void removeLayoutComponent(Component comp)(Code) | | Not used.
Parameters: comp - the component. |
removeLayoutComponent | public void removeLayoutComponent(String name, Component comp)(Code) | | Not used.
Parameters: name - the component name. Parameters: comp - the component. |
updateC | protected void updateC(int rowIndex, Dimension d0)(Code) | | Processes a row in 'C' format.
Parameters: rowIndex - the row index. Parameters: d0 - dimension 0. |
updateLC | protected void updateLC(int rowIndex, Dimension d0, Dimension d1)(Code) | | Processes a row in 'LC' format.
Parameters: rowIndex - the row index. Parameters: d0 - dimension 0. Parameters: d1 - dimension 1. |
updateLCB | protected void updateLCB(int rowIndex, Dimension d0, Dimension d1, Dimension d2)(Code) | | Processes a row in 'LCB' format.
Parameters: rowIndex - the row index. Parameters: d0 - dimension 0. Parameters: d1 - dimension 1. Parameters: d2 - dimension 2. |
updateLCBLC | protected void updateLCBLC(int rowIndex, Dimension d0, Dimension d1, Dimension d2, Dimension d3, Dimension d4)(Code) | | Processes a row in 'LCBLC' format.
Parameters: rowIndex - the row index. Parameters: d0 - dimension 0. Parameters: d1 - dimension 1. Parameters: d2 - dimension 2. Parameters: d3 - dimension 3. Parameters: d4 - dimension 4. |
updateLCBLCB | protected void updateLCBLCB(int rowIndex, Dimension d0, Dimension d1, Dimension d2, Dimension d3, Dimension d4, Dimension d5)(Code) | | Processes a row in 'LCBLCB' format.
Parameters: rowIndex - the row index. Parameters: d0 - dimension 0. Parameters: d1 - dimension 1. Parameters: d2 - dimension 2. Parameters: d3 - dimension 3. Parameters: d4 - dimension 4. Parameters: d5 - dimension 5. |
updateLCLC | protected void updateLCLC(int rowIndex, Dimension d0, Dimension d1, Dimension d2, Dimension d3)(Code) | | Processes a row in 'LCLC' format.
Parameters: rowIndex - the row index. Parameters: d0 - dimension 0. Parameters: d1 - dimension 1. Parameters: d2 - dimension 2. Parameters: d3 - dimension 3. |
updateLCLCB | protected void updateLCLCB(int rowIndex, Dimension d0, Dimension d1, Dimension d2, Dimension d3, Dimension d4)(Code) | | Processes a row in 'LCLCB' format.
Parameters: rowIndex - the row index. Parameters: d0 - dimension 0. Parameters: d1 - dimension 1. Parameters: d2 - dimension 2. Parameters: d3 - dimension 3. Parameters: d4 - dimension 4. |
|
|