|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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 component
MaxXMargin
,
MinXMargin
,
MaxYMargin
,
MinYMargin
,
WidthSizable
,
HeightSizable
,
BothSizable
public float getLayoutAlignmentX(Container container)
container
along the x axis.
getLayoutAlignmentX
in interface LayoutManager2
container
- the component
public float getLayoutAlignmentY(Container container)
container
along the y axis.
getLayoutAlignmentY
in interface LayoutManager2
container
- the component
public void invalidateLayout(Container container)
invalidateLayout
in interface LayoutManager2
container
- public Dimension lastKnownSize(Component component)
component
- the component
public 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 component
public Dimension minimumLayoutSize(Container container)
container
.
minimumLayoutSize
in interface LayoutManager
container
- the component
public Dimension preferredLayoutSize(Container container)
container
.
preferredLayoutSize
in interface LayoutManager
container
- the component
public 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 Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |