|
RADi Runtime Library v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.muntjak.newlayout.NewLayout
public class NewLayout
NewLayout
is RADi's layout manager for panels, folder panels
and internal frames/palettes.
Field Summary | |
---|---|
static int |
ENLARGE_AND_FIT
Weight usage constant: Enlarge if there is free space or the size of components spanning multiple columns/rows exeeds the size of those columns/rows. |
static int |
ENLARGE_ONLY
Weight usage constant: Enlarge only if there is free space. |
static int |
FIT_MULTICOLUMNS_ONLY
Weight usage constant: Enlarge only if the size of components spanning multiple columns exeeds the size of those columns. |
static int |
FIT_MULTIROWS_ONLY
Weight usage constant: Enlarge only if the size of components spanning multiple rows exeeds the size of those rows. |
Constructor Summary | |
---|---|
NewLayout(int[] columnWidths,
int[] rowHeights)
Create a new NewLayout layout manager with the given minimum sizes for columns and rows. |
Method Summary | |
---|---|
void |
addLayoutComponent(Component comp,
Object constraints)
Adds the specified component to the layout, using the specified constraint object. |
void |
addLayoutComponent(String name,
Component comp)
Not supported. |
void |
addSameHeightClass(int[] rows)
Links the heights of several rows. |
void |
addSameWidthClass(int[] columns)
Links the widths of several columns. |
Dimension |
getCurrentGridSize()
Returns the current grid size in pixels. |
float |
getLayoutAlignmentX(Container target)
Always returns 0f . |
float |
getLayoutAlignmentY(Container target)
Always returns 0f . |
void |
invalidateLayout(Container target)
Clears cached values. |
void |
layoutContainer(Container target)
Calculates the container's layout. |
Dimension |
maximumLayoutSize(Container target)
Returns a dimension where both width and height are Integer.MAX_VALUE . |
Dimension |
minimumLayoutSize(Container target)
Calculates and returns the container's minimum layout size. |
Dimension |
preferredLayoutSize(Container target)
Calculates and returns the container's preferred layout size. |
void |
removeLayoutComponent(Component comp)
Removes argument from the layout. |
void |
setColumnWeight(int column,
int weight)
Sets the weight of the specified column to weight . |
void |
setColumnWeight(int column,
int weight,
int weightUsage)
Sets the weight of the specified column to weight and the
weight usage to weightUsage . |
void |
setColumnWeightUsage(int column,
int weightUsage)
Sets the weight usage of the specified column to weightUsage . |
void |
setRowWeight(int row,
int weight)
Sets the weight of the specified row to weight . |
void |
setRowWeight(int row,
int weight,
int weightUsage)
Sets the weight of the specified row to weight and the
weight usage to weightUsage . |
void |
setRowWeightUsage(int row,
int weightUsage)
Sets the weight usage of the specified row to weightUsage . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ENLARGE_AND_FIT
public static final int ENLARGE_ONLY
public static final int FIT_MULTICOLUMNS_ONLY
public static final int FIT_MULTIROWS_ONLY
Constructor Detail |
---|
public NewLayout(int[] columnWidths, int[] rowHeights)
columnWidths
- minimum column widthsrowHeights
- minimum row heights
IllegalArgumentException
- if an element of the argument arrays
isd less than zeroMethod Detail |
---|
public void addLayoutComponent(Component comp, Object constraints)
addLayoutComponent
in interface LayoutManager2
constraints
- must be an instance of NLConstraint
IllegalArgumentException
- if constraints
is not an instance of NLConstraint
or the NLConstraint
object's parameters are invalidpublic void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
UnsupportedOperationException
- because this
method is not supportedpublic void addSameHeightClass(int[] rows)
null
.
rows
- the rows which shall be of the same heightpublic void addSameWidthClass(int[] columns)
null
.
columns
- the columns which shall be of the same widthpublic Dimension getCurrentGridSize()
public float getLayoutAlignmentX(Container target)
0f
.
getLayoutAlignmentX
in interface LayoutManager2
public float getLayoutAlignmentY(Container target)
0f
.
getLayoutAlignmentY
in interface LayoutManager2
public void invalidateLayout(Container target)
invalidateLayout
in interface LayoutManager2
public void layoutContainer(Container target)
layoutContainer
in interface LayoutManager
public Dimension maximumLayoutSize(Container target)
Integer.MAX_VALUE
.
maximumLayoutSize
in interface LayoutManager2
public Dimension minimumLayoutSize(Container target)
minimumLayoutSize
in interface LayoutManager
public Dimension preferredLayoutSize(Container target)
preferredLayoutSize
in interface LayoutManager
public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
public void setColumnWeight(int column, int weight)
weight
.
column
- a valid column indexweight
- the new column weight >= 0
IllegalArgumentException
- if weight
< 0
or column
is not a valid column indexpublic void setColumnWeight(int column, int weight, int weightUsage)
weight
and the
weight usage to weightUsage
.
column
- a valid column indexweight
- the new column weight >= 0weightUsage
- one of ENLARGE_AND_FIT
,
ENLARGE_ONLY
or FIT_MULTICOLUMNS_ONLY
IllegalArgumentException
- if weight
< 0
or column
is not a valid column index or
weightUsage
is not one of ENLARGE_AND_FIT
,
ENLARGE_ONLY
or FIT_MULTICOLUMNS_ONLY
public void setColumnWeightUsage(int column, int weightUsage)
weightUsage
.
column
- a valid column indexweightUsage
- one of ENLARGE_AND_FIT
,
ENLARGE_ONLY
or FIT_MULTICOLUMNS_ONLY
IllegalArgumentException
- if column
is not a valid column index or
weightUsage
is not one of ENLARGE_AND_FIT
,
ENLARGE_ONLY
or FIT_MULTICOLUMNS_ONLY
public void setRowWeight(int row, int weight)
weight
.
row
- a valid row indexweight
- the new row weight >= 0
IllegalArgumentException
- if weight
< 0
or row
is not a valid row indexpublic void setRowWeight(int row, int weight, int weightUsage)
weight
and the
weight usage to weightUsage
.
row
- a valid row indexweight
- the new row weight >= 0weightUsage
- one of ENLARGE_AND_FIT
,
ENLARGE_ONLY
or FIT_MULTIROWS_ONLY
IllegalArgumentException
- if weight
< 0
or row
is not a valid row index or
weightUsage
is not one of ENLARGE_AND_FIT
,
ENLARGE_ONLY
or FIT_MULTIROWS_ONLY
public void setRowWeightUsage(int row, int weightUsage)
weightUsage
.
row
- a valid row indexweightUsage
- one of ENLARGE_AND_FIT
,
ENLARGE_ONLY
or FIT_MULTIROWNS_ONLY
IllegalArgumentException
- if row
is not a valid row index or
weightUsage
is not one of ENLARGE_AND_FIT
,
ENLARGE_ONLY
or FIT_MULTIROWNS_ONLY
|
RADi Runtime Library v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |