|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.argouml.swingext.GridLayout2 | +--org.argouml.swingext.NewspaperLayout
Similar to GridLayout2
but once the components fill
the height of the container they flow into another grid on the
right until the full width of the container is filled. Once the
containers width is full it flows to the right no more, the grid
depths increase instead so that the user scrolls up/down instead of
left/right.
Field Summary | |
---|---|
protected static Logger |
cat
|
private int |
gridGap
|
private int |
gridWidth
|
private boolean |
horizontalScrollRequired
|
private int |
preferredX
|
private int |
preferredY
|
private boolean |
verticalScrollRequired
|
Fields inherited from class org.argouml.swingext.GridLayout2 |
---|
BOTH, cellSizing, CENTER, colWidth, EAST, FITPARENT, HORIZONTAL, largestHeight, largestWidth, MAXPREFERRED, NONE, NORTH, NORTHEAST, NORTHWEST, ROWCOLPREFERRED, rowHeight, SOUTH, SOUTHEAST, SOUTHWEST, VERTICAL, WEST |
Constructor Summary | |
---|---|
NewspaperLayout()
|
|
NewspaperLayout(int rows,
int cols)
|
|
NewspaperLayout(int rows,
int cols,
int hgap,
int vgap,
int gridGap)
|
Method Summary | |
---|---|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Adds the specified component with the specified name to the layout. |
void |
layoutContainer(java.awt.Container parent)
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
|
private boolean |
positionComponentsExternal(java.awt.Container parent,
int[] colWidth,
int[] rowHeight,
int gridHeight,
int nrows,
int ncols,
int maxGrids)
|
private int |
positionComponentsInternal(java.awt.Container parent,
int[] colWidth,
int[] rowHeight,
int gridHeight,
int nrows,
int ncols)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Determines the preferred size of the container argument using this grid layout. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component with the specified name from the layout. |
Methods inherited from class org.argouml.swingext.GridLayout2 |
---|
calculateSizes, getColumns, getComponentCellHeight, getComponentCellWidth, getHgap, getRows, getVgap, positionComponentInCell, setCols, setHgap, setRows, setVgap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Logger cat
private int gridGap
private int preferredX
private int preferredY
private int gridWidth
private boolean verticalScrollRequired
private boolean horizontalScrollRequired
Constructor Detail |
public NewspaperLayout()
public NewspaperLayout(int rows, int cols)
public NewspaperLayout(int rows, int cols, int hgap, int vgap, int gridGap)
Method Detail |
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
GridLayout2
addLayoutComponent
in interface java.awt.LayoutManager
addLayoutComponent
in class GridLayout2
name
- the name of the componentcomp
- the component to be addedpublic void removeLayoutComponent(java.awt.Component comp)
GridLayout2
removeLayoutComponent
in interface java.awt.LayoutManager
removeLayoutComponent
in class GridLayout2
comp
- the name of the componentpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
GridLayout2
MAXPREFERRED and FITPARENT use the same formula to calculate prefered size.
The prefered width using MAXPREFERRED or FITPARENT is the largest preferred width of any of the widths in the container times the number of columns, plus the horizontal padding times the number of columns plus one, plus the left and right insets of the target container.
The preferred height using MAXPREFERRED or FITPARENT is the largest preferred height of any of the heights in the container times the number of rows, plus the vertical padding times the number of rows plus one, plus the top and bottom insets of the target container.
The prefered width using ROWCOLPREFERRED is the largest preferred is the sum of the widths of of all columns, plus the horizontal padding times the number of columns plus one, plus the left and right insets of the target container.
The prefered height using ROWCOLPREFERRED is the largest preferred is the sum of the heights of of all columns, plus the horizontal padding times the number of columns plus one, plus the left and right insets of the target container.
preferredLayoutSize
in interface java.awt.LayoutManager
preferredLayoutSize
in class GridLayout2
parent
- the container to be laid out
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
minimumLayoutSize
in class GridLayout2
public java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
layoutContainer
in class GridLayout2
private int positionComponentsInternal(java.awt.Container parent, int[] colWidth, int[] rowHeight, int gridHeight, int nrows, int ncols)
private boolean positionComponentsExternal(java.awt.Container parent, int[] colWidth, int[] rowHeight, int gridHeight, int nrows, int ncols, int maxGrids)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |