All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.awt.HeaderPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----com.sun.wizards.awt.InsetsPanel
|
+----com.sun.wizards.awt.HeaderPanel
- public class HeaderPanel
- extends InsetsPanel
The HeaderPanel displays information in a Header banner.
The HeaderPanel is used at the top of wizard panels to
indicate the purpose of the panel. The header consits of a
banner on a panel that is used to visually separate
the header from the other contents occupying the panel.
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 BorderLayout());
HeaderPanel headerPanel = new HeaderPanel("Header Text");
headerPanel.setBackground(Color.red);
add(headerPanel, "North");
}
}
-
HeaderPanel()
- Constructs a new HeaderPanel object with no
text in the banner.
-
HeaderPanel(String)
- Constructs a new HeaderPanel object with the
specified text in the banner.
-
HeaderPanel(String, Container)
-
Constructs a new HeaderPanel object with the
specified text in the banner, and places the
header panel at the top of the specified container.
-
HeaderPanel(String, Container, int)
- Constructs a new HeaderPanel object with the
specified text in the banner, and places the
header panel at the top of the specified container,
and sets the specified preferred height.
-
getMinimumSize()
- Returns the minimum size for this header panel.
-
getPreferredSize()
- Returns the preferred size for this header panel.
-
getText()
- Returns the text currently being displayed in the header
panel.
-
setText(String)
- Sets the text to be displayed in the header panel.
HeaderPanel
public HeaderPanel()
- Constructs a new HeaderPanel object with no
text in the banner.
HeaderPanel
public HeaderPanel(String headerText)
- Constructs a new HeaderPanel object with the
specified text in the banner.
- Parameters:
- headerText - The text to be displayed in
the banner.
HeaderPanel
public HeaderPanel(String headerText,
Container parentContainer)
- Constructs a new HeaderPanel object with the
specified text in the banner, and places the
header panel at the top of the specified container.
- Parameters:
- headerText - The text to be displayed in
the banner.
- parentContainer - The parent object on which this
header will be displayed.
HeaderPanel
public HeaderPanel(String headerText,
Container parentContainer,
int preferredHeight)
- Constructs a new HeaderPanel object with the
specified text in the banner, and places the
header panel at the top of the specified container,
and sets the specified preferred height.
- Parameters:
- headerText - The text to be displayed in
the banner.
- parentContainer - The parent object on which this
header will be displayed.
- preferredHeight - Preferred height of panel
getText
public String getText()
- Returns the text currently being displayed in the header
panel.
setText
public void setText(String headerText)
- Sets the text to be displayed in the header panel.
- Parameters:
- headerText - The desired text for the header.
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size for this header panel.
- Returns:
- This HeaderPanel's preferred size.
- Overrides:
- getPreferredSize in class Container
getMinimumSize
public Dimension getMinimumSize()
- Returns the minimum size for this header panel.
- Returns:
- This HeaderPanel's minimum size.
- Overrides:
- getMinimumSize in class Container
All Packages Class Hierarchy This Package Previous Next Index