|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.BorderLayout org.opensourcephysics.display.OSPLayout
public class OSPLayout
A OSP layout lays out a container, arranging and resizing its components to fit in the corners or in one of the border layout regions.
Field Summary | |
---|---|
static java.lang.String |
BOTTOM_LEFT_CORNER
The bottom left corner layout constraint. |
static java.lang.String |
BOTTOM_RIGHT_CORNER
The bottom right layout constraint. |
static java.lang.String |
CENTERED
The bottom right layout constraint. |
static int |
macOffset
|
static java.lang.String |
TOP_LEFT_CORNER
The top left corner layout constraint. |
static java.lang.String |
TOP_RIGHT_CORNER
The top right corner layout constraint. |
Fields inherited from class java.awt.BorderLayout |
---|
AFTER_LAST_LINE, AFTER_LINE_ENDS, BEFORE_FIRST_LINE, BEFORE_LINE_BEGINS, CENTER, EAST, LINE_END, LINE_START, NORTH, PAGE_END, PAGE_START, SOUTH, WEST |
Constructor Summary | |
---|---|
OSPLayout()
Constructs a new OSP layout with no gaps between components. |
|
OSPLayout(int hgap,
int vgap)
Constructs a new OSP layout with the specified gaps between components. |
Method Summary | |
---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
|
void |
checkLayoutRect(java.awt.Container c,
java.awt.Rectangle viewRect)
|
java.awt.Component[] |
getComponents()
|
void |
layoutContainer(java.awt.Container target)
Lays out the container argument using this layout. |
boolean |
quickLayout(java.awt.Container target,
java.awt.Component c)
Lays out a single component by setting the component's bounds. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from this border layout. |
Methods inherited from class java.awt.BorderLayout |
---|
addLayoutComponent, getConstraints, getHgap, getLayoutAlignmentX, getLayoutAlignmentY, getLayoutComponent, getLayoutComponent, getVgap, invalidateLayout, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, setHgap, setVgap, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int macOffset
public static final java.lang.String TOP_LEFT_CORNER
public static final java.lang.String TOP_RIGHT_CORNER
public static final java.lang.String BOTTOM_LEFT_CORNER
public static final java.lang.String BOTTOM_RIGHT_CORNER
public static final java.lang.String CENTERED
Constructor Detail |
---|
public OSPLayout()
public OSPLayout(int hgap, int vgap)
hgap
and the vertical gap is specified by vgap
.
hgap
- the horizontal gap.vgap
- the vertical gap.Method Detail |
---|
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
addLayoutComponent
in interface java.awt.LayoutManager2
addLayoutComponent
in class java.awt.BorderLayout
public void removeLayoutComponent(java.awt.Component comp)
remove
or
removeAll
methods. Most applications do not call this
method directly.
removeLayoutComponent
in interface java.awt.LayoutManager
removeLayoutComponent
in class java.awt.BorderLayout
comp
- the component to be removed.Container.remove(java.awt.Component)
,
Container.removeAll()
public void layoutContainer(java.awt.Container target)
layoutContainer
in interface java.awt.LayoutManager
layoutContainer
in class java.awt.BorderLayout
target
- Containerpublic boolean quickLayout(java.awt.Container target, java.awt.Component c)
target
- Containerpublic void checkLayoutRect(java.awt.Container c, java.awt.Rectangle viewRect)
public java.awt.Component[] getComponents()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |