1 |
/* LayoutManager2.java -- Enhanced layout manager. |
/* LayoutManager2.java -- enhanced layout manager |
2 |
Copyright (C) 1999 Free Software Foundation, Inc. |
Copyright (C) 1999, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
39 |
package java.awt; |
package java.awt; |
40 |
|
|
41 |
/** |
/** |
42 |
* Layout manager for laying out containers based on contraints. |
* Layout manager for laying out containers based on contraints. The |
43 |
* |
* constraints control how the layout will proceed. |
44 |
* @author Aaron M. Renn (arenn@urbanophile.com) |
* |
45 |
*/ |
* @author Aaron M. Renn <arenn@urbanophile.com> |
46 |
|
* @see LayoutManager |
47 |
|
* @see Container |
48 |
|
* @since 1.0 |
49 |
|
* @status updated to 1.4 |
50 |
|
*/ |
51 |
public interface LayoutManager2 extends LayoutManager |
public interface LayoutManager2 extends LayoutManager |
52 |
{ |
{ |
53 |
|
/** |
54 |
/** |
* Adds the specified component to the layout, with the specified |
55 |
* Adds the specified component to the layout, with the specified |
* constraint object. |
56 |
* constraint object. |
* |
57 |
* |
* @param component the component to add |
58 |
* @param component The component to add. |
* @param constraint the constraint to satisfy |
59 |
* @param constraint The constraint object. |
*/ |
60 |
*/ |
void addLayoutComponent(Component component, Object contraint); |
61 |
public abstract void |
|
62 |
addLayoutComponent(Component component, Object contraint); |
/** |
63 |
|
* Determines the maximum size of the specified target container. |
64 |
/*************************************************************************/ |
* |
65 |
|
* @param target the container to lay out |
66 |
/** |
* @return the maximum size of the container |
67 |
* Determines the minimum size of the specified target container. |
* @see Component#getMaximumSize() |
68 |
* |
*/ |
69 |
* @param target The target container. |
Dimension maximumLayoutSize(Container target); |
70 |
*/ |
|
71 |
public abstract Dimension |
/** |
72 |
maximumLayoutSize(Container target); |
* Returns the preferred X axis alignment for the specified target |
73 |
|
* container. This value will range from 0 to 1 where 0 is alignment |
74 |
/*************************************************************************/ |
* closest to the origin, 0.5 is centered, and 1 is aligned furthest |
75 |
|
* from the origin. |
76 |
/** |
* |
77 |
* Returns the preferred X axis alignment for the specified target |
* @param target the target container |
78 |
* container. This value will range from 0 to 1 where 0 is alignment |
* @return the x-axis alignment preference |
79 |
* closest to the origin, 0.5 is centered, and 1 is aligned furthest |
*/ |
80 |
* from the origin. |
float getLayoutAlignmentX(Container target); |
81 |
* |
|
82 |
* @param target The target container. |
/** |
83 |
*/ |
* Returns the preferred Y axis alignment for the specified target |
84 |
public abstract float |
* container. This value will range from 0 to 1 where 0 is alignment |
85 |
getLayoutAlignmentX(Container target); |
* closest to the origin, 0.5 is centered, and 1 is aligned furthest |
86 |
|
* from the origin. |
87 |
/*************************************************************************/ |
* |
88 |
|
* @param target the target container |
89 |
/** |
* @return the y-axis alignment preference |
90 |
* Returns the preferred Y axis alignment for the specified target |
*/ |
91 |
* container. This value will range from 0 to 1 where 0 is alignment |
float getLayoutAlignmentY(Container target); |
92 |
* closest to the origin, 0.5 is centered, and 1 is aligned furthest |
|
93 |
* from the origin. |
/** |
94 |
* |
* Forces the layout manager to purge any cached information about the |
95 |
* @param target The target container. |
* layout of the target container. This will force it to be recalculated. |
96 |
*/ |
* |
97 |
public abstract float |
* @param target the target container |
98 |
getLayoutAlignmentY(Container target); |
*/ |
99 |
|
void invalidateLayout(Container target); |
100 |
/*************************************************************************/ |
} // interface LayoutManager2 |
|
|
|
|
/** |
|
|
* Forces the layout manager to purge any cached information about |
|
|
* the layout of the target container. This will force it to be |
|
|
* recalculated. |
|
|
* |
|
|
* @param target The target container. |
|
|
*/ |
|
|
public abstract void |
|
|
invalidateLayout(Container target); |
|
|
|
|
|
} // interface LayoutManager2 |
|
|
|
|