org.argouml.swingext
Class NewspaperLayout
java.lang.Object
|
+--org.argouml.swingext.GridLayout2
|
+--org.argouml.swingext.NewspaperLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.io.Serializable
- public class NewspaperLayout
- extends GridLayout2
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.
- See Also:
- Serialized Form
Field Summary |
protected static org.apache.log4j.Category |
cat
|
Fields inherited from class org.argouml.swingext.GridLayout2 |
BOTH, CENTER, colWidth, EAST, FITPARENT, HORIZONTAL, largestHeight, largestWidth, MAXPREFERRED, NONE, NORTH, NORTHEAST, NORTHWEST, ROWCOLPREFERRED, rowHeight, SOUTH, SOUTHEAST, SOUTHWEST, VERTICAL, WEST |
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)
|
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 |
cat
protected static org.apache.log4j.Category cat
NewspaperLayout
public NewspaperLayout()
NewspaperLayout
public NewspaperLayout(int rows,
int cols)
NewspaperLayout
public NewspaperLayout(int rows,
int cols,
int hgap,
int vgap,
int gridGap)
addLayoutComponent
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
- Description copied from class:
GridLayout2
- Adds the specified component with the specified name to the layout. This is included
to satisfy the LayoutManager interface but is not actually used in this layout
implementation.
- Overrides:
addLayoutComponent
in class GridLayout2
- Following copied from class:
org.argouml.swingext.GridLayout2
- Parameters:
name
- the name of the componentcomp
- the component to be added
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component comp)
- Description copied from class:
GridLayout2
- Removes the specified component with the specified name from the layout. This is included
to satisfy the LayoutManager interface but is not actually used in this layout
implementation.
- Overrides:
removeLayoutComponent
in class GridLayout2
- Following copied from class:
org.argouml.swingext.GridLayout2
- Parameters:
name
- the name of the component
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
- Description copied from class:
GridLayout2
- Determines the preferred size of the container argument using this grid layout.
The preferred size of a grid layout is dependant on the cellSizing scheme.
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.
- Overrides:
preferredLayoutSize
in class GridLayout2
- Following copied from class:
org.argouml.swingext.GridLayout2
- Parameters:
parent
- the container to be laid out- Returns:
- the preferred dimensions to lay out the subcomponents of the specified container
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
- Overrides:
minimumLayoutSize
in class GridLayout2
maximumLayoutSize
public java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Overrides:
layoutContainer
in class GridLayout2