|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eointerface.swing.EOViewLayout
An EOViewLayout is an AWT layout manager which offers "spring" resizing (like Cocoa views). EOViewLayout implements the geometry options available in Interface Builder's Size inspector. The size of a Component embedded in a Container using this layout scheme will be a function of both its autosizing mask and its initial size.
Field Summary | |
static int |
BothSizable
This constant is used to specify that both width and height of a component may be adjusted. |
static int |
HeightSizable
This constant is used to specify that a component's height may be adjusted. |
static int |
MaxXMargin
This constant is used to specify that the distance between a component's right edge and that of its parent may be adjusted. |
static int |
MaxYMargin
This constant is used to specify that the distance between a component's bottom edge and that of its parent may be adjusted. |
static int |
MinXMargin
This constant is used to specify that the distance between a component's left edge and that of its parent may be adjusted. |
static int |
MinYMargin
This constant is used to specify that the distance between a component's top edge and that of its parent may be adjusted. |
static int |
WidthSizable
This constant is used to specify that a component's width may be adjusted. |
Constructor Summary | |
EOViewLayout()
Constructs a new EOViewLayout. |
Method Summary | |
void |
addLayoutComponent(Component component,
Object constraints)
Registers component with the EOViewLayout. |
void |
addLayoutComponent(String name,
Component component)
Does nothing. |
int |
autosizingMask(Component component)
Returns the autosizing mask of a component layed out by the EOViewLayout. |
float |
getLayoutAlignmentX(Container container)
Returns the alingment of the component container along the x axis. |
float |
getLayoutAlignmentY(Container container)
Returns the alingment of the component container along the y axis. |
void |
invalidateLayout(Container container)
Does nothing. |
Dimension |
lastKnownSize(Component component)
Returns the "last known size" of a component layed out by the EOViewLayout. |
void |
layoutContainer(Container container)
Lays out the subcomponents of the component container . |
Dimension |
maximumLayoutSize(Container container)
Returns the maximum size of the component container . |
Dimension |
minimumLayoutSize(Container container)
Returns the minimum size of the component container . |
Dimension |
preferredLayoutSize(Container container)
Returns the preferred size of the component container . |
void |
removeLayoutComponent(Component component)
Unregisters component from the EOViewLayout. |
void |
setAutosizingMask(Component component,
int autosizingMask)
Sets the autosizing mask of a component layed out by the EOViewLayout to autosizingMask . |
void |
setLastKnownSize(Component component,
Dimension size)
Sets the "last known size" of a component layed out by the EOViewLayout. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BothSizable
public static final int HeightSizable
public static final int MaxXMargin
public static final int MaxYMargin
public static final int MinXMargin
public static final int MinYMargin
public static final int WidthSizable
Constructor Detail |
public EOViewLayout()
Method Detail |
public void addLayoutComponent(String name, Component component)
addLayoutComponent
in interface LayoutManager
name
- component
- public void addLayoutComponent(Component component, Object constraints)
constraints
should be an Integer object representing the autosizing mask for component
.addLayoutComponent
in interface LayoutManager2
component
- the componentconstraints
- an Integer representing the autosizing mask for the componentpublic int autosizingMask(Component component)
component
- the componentMaxXMargin
,
MinXMargin
,
MaxYMargin
,
MinYMargin
,
WidthSizable
,
HeightSizable
,
BothSizable
public float getLayoutAlignmentX(Container container)
container
along the x axis.getLayoutAlignmentX
in interface LayoutManager2
container
- the componentpublic float getLayoutAlignmentY(Container container)
container
along the y axis.getLayoutAlignmentY
in interface LayoutManager2
container
- the componentpublic void invalidateLayout(Container container)
invalidateLayout
in interface LayoutManager2
container
- public Dimension lastKnownSize(Component component)
component
- the componentpublic void layoutContainer(Container container)
container
.
Adjusts the locations and sizes of the subcomponents according to the autosizing masks registered for them.layoutContainer
in interface LayoutManager
container
- the component to lay outpublic Dimension maximumLayoutSize(Container container)
container
.maximumLayoutSize
in interface LayoutManager2
container
- the componentpublic Dimension minimumLayoutSize(Container container)
container
.minimumLayoutSize
in interface LayoutManager
container
- the componentpublic Dimension preferredLayoutSize(Container container)
container
.preferredLayoutSize
in interface LayoutManager
container
- the componentpublic void removeLayoutComponent(Component component)
removeLayoutComponent
in interface LayoutManager
component
- the componentpublic void setAutosizingMask(Component component, int autosizingMask)
autosizingMask
.
This information is subsequently used by the receiver to calculate the new location and
dimensions of component whenever its parent is resized.
The mask should be some bitwise combination of the following constants: MaxXMargin,
MinXMargin, MaxYMargin, MinYMargin,
WidthSizable, HeightSizable, and BothSizable.component
- the componentautosizingMask
- the autosizing mask of the componentMaxXMargin
,
MinXMargin
,
MaxYMargin
,
MinYMargin
,
WidthSizable
,
HeightSizable
,
BothSizable
public void setLastKnownSize(Component component, Dimension size)
component
- the componentsize
- the last known size of the comonent
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |