All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.awt.NavigationLayout
java.lang.Object
|
+----com.sun.wizards.awt.NavigationLayout
- public class NavigationLayout
- extends Object
- implements LayoutManager, LayoutManager2, Serializable
NavigationLayout is the layout manager for the WizardConsole
navigation area.
-----------------------------------------
| | |
| | |
| | |
| | |
| | |
| | |
| Image | Tree |
| | |
| | |
| | |
| | |
| | |
-----------------------------------------
| |
| Navigation |
-----------------------------------------
The Navigation panel has a fixed height, and the width will
vary according to the width of the frame. The NavigationLayout
will have 2 parts: a "Navigation" area and an "Action" area.
These parts will be separated by a small amount to give the
user a sense of function separation.
The buttons placed in the navigation area will facilitate
a navigation function. Examples are: "back", "next", and
"finish".
The buttons placed in the action area will facilitate special
actions that the software may have available. Examples are:
"cancel", "exit", and "help".
Here is the code for this applet:
import java.applet.Applet;
import java.awt.*;
import com.sun.wizards.awt.*;
public class Test extends Applet
{
public void init()
{
setLayout(new NavigationLayout());
add(new Button(" Back "), "Navigation");
add(new Button(" Next "), "Navigation");
add(new Button(" Exit "), "Action");
}
}
-
NavigationLayout()
- Creates a navigation layout with horizontal and
vertical gaps of 5 pixels.
-
NavigationLayout(int, int)
- Creates a navigation layout with the specified
horizontal and vertical gaps.
-
addLayoutComponent(Component, Object)
- Adds the specified component to the layout using the specified
constraint object.
-
addLayoutComponent(String, Component)
- Adds the specified component with the specified constraint
to the layout.
-
getLayoutAlignmentX(Container)
- Returns the alignment along the x axis.
-
getLayoutAlignmentY(Container)
- Returns the alignment along the y axis.
-
invalidateLayout(Container)
- Invalidates the layout, indicating that if the layout maanager has
cached information it should be discarded.
-
layoutContainer(Container)
- Lays out the container in the specified panel.
-
maximumLayoutSize(Container)
- Returns the maximum size of this component.
-
minimumLayoutSize(Container)
- Calculates the minmum size dimensions for the specified
panel given the components in the specified parent container.
-
preferredLayoutSize(Container)
- Calculates the preferred size dimensions for the specified
panel given the components in the specified parent container.
-
removeLayoutComponent(Component)
- Removes the specified component from the layout.
NavigationLayout
public NavigationLayout()
- Creates a navigation layout with horizontal and
vertical gaps of 5 pixels.
NavigationLayout
public NavigationLayout(int hgap,
int vgap)
- Creates a navigation layout with the specified
horizontal and vertical gaps.
- Parameters:
- hgap - The horizontal gap.
- vgap - The vertical gap.
addLayoutComponent
public void addLayoutComponent(String constraint,
Component comp)
- Adds the specified component with the specified constraint
to the layout.
Legal values for constraint are:
"Navigation"
"Action"
"Separator"
- Parameters:
- constraint - The position where the component should be added.
- comp - The component to be added.
addLayoutComponent
public void addLayoutComponent(Component comp,
Object constraints)
- Adds the specified component to the layout using the specified
constraint object. The constraints object for a NavigatioLayout
must be a String indicating which region the component is to
be added to.
Legal values for constraints are: "Navigation", "Action", and "Separator".
- Parameters:
- comp - The component to be added.
- constraints - A string object indicating where the specified
component should be added.
removeLayoutComponent
public void removeLayoutComponent(Component comp)
- Removes the specified component from the layout.
- Parameters:
- comp - The component to be removed.
minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
- Calculates the minmum size dimensions for the specified
panel given the components in the specified parent container.
- Parameters:
- parent - The component to be laid out.
preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
- Calculates the preferred size dimensions for the specified
panel given the components in the specified parent container.
- Parameters:
- parent - The component to be laid out.
layoutContainer
public void layoutContainer(Container parent)
- Lays out the container in the specified panel.
- Parameters:
- parent - The component which needs to be laid out.
maximumLayoutSize
public Dimension maximumLayoutSize(Container parent)
- Returns the maximum size of this component.
- Parameters:
- parent - The parent container.
getLayoutAlignmentX
public float getLayoutAlignmentX(Container parent)
- Returns the alignment along the x axis. This specifies how the component would
like to be aligned relative to other components. The value should be a number
between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the
furthest away from the origin, 0.5 is centered, etc.
- Parameters:
- parent - The parent container.
getLayoutAlignmentY
public float getLayoutAlignmentY(Container parent)
- Returns the alignment along the y axis. This specifies how the component would
like to be aligned relative to other components. The value should be a number
between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the
furthest away from the origin, 0.5 is centered, etc.
- Parameters:
- parent - The parent container.
invalidateLayout
public void invalidateLayout(Container parent)
- Invalidates the layout, indicating that if the layout maanager has
cached information it should be discarded.
- Parameters:
- parent - The parent container.
All Packages Class Hierarchy This Package Previous Next Index