public class GridColumn
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
int |
align |
The default alignment for Prints in this column.
|
static int |
DEFAULT_ALIGN |
The default alignment used when alignment is not specified.
|
static int |
DEFAULT_SIZE |
The default size used when size is not specified.
|
static int |
DEFAULT_WEIGHT |
The default weight used when weight is not specified.
|
int |
size |
The size property for this GridColumn.
|
int |
weight |
The weight of this column.
|
| Constructor | Description |
|---|---|
GridColumn(int align,
int size,
int weight) |
Constructs a GridColumn.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object obj) |
|
int |
hashCode() |
|
static GridColumn |
parse(java.lang.String spec) |
Parses the given column spec and returns a GridColumn matching that spec.
|
public static final int DEFAULT_ALIGN
public static final int DEFAULT_SIZE
public static final int DEFAULT_WEIGHT
public final int size
size
points wide (72pts = 1").
public final int align
Cells that span multiple columns use the alignment of the left-most cell in the cell span.
public final int weight
public GridColumn(int align,
int size,
int weight)
align - The default alignment for Prints in this column.size - The size this column should be given.weight - The weight this column should be given.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic static GridColumn parse(java.lang.String spec)
Format:
[align:]size[:grow]
align = L | LEFT |
C | CENTER |
R | RIGHT
size = P | PREF | PREFERRED |
D | DEF | DEFAULT |
(Positive number)[PT|IN|INCH|CM|MM]
weight = N | NONE |
G | GROW | G(#) | GROW(#)
The default alignment is LEFT. The
weight argument expresses the weight property: NONE
indicates a weight of 0; GROW indicates a weight of 1; and GROW(3)
indicates a weight of 3. The default weight (if weight is
omitted) is 0.
Examples:
LEFT:DEFAULT:GROW // left-aligned, default size, weight=1 R:72PT:N // light-aligned, 72 points (1") wide, weight=0 right:72 // identical to previous line c:pref:none // center-aligned, preferred size, weight=0 p // left-aligned (default), preferred size, weight=0 r:2inch // right-aligned, 2 inches (50.8mm) r:50.8mm // right-aligned, 50.8 mm (2")