All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class att.grappa.PopUpCard

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----att.grappa.PopUpCard

public class PopUpCard
extends Frame
A frame for displaying several categories of information about an item. The frame uses a card layout to hold some number of panels that serve to display whatever information is needed. By default, Grappa uses a PopUpCard and an AttributePanel to display attribute information about graph elements.

Version:
1.1, 30 Sep 1999; Copyright 1996 - 1999 by AT&T Corp.
Author:
John Mocenigo, Research @ AT&T Labs
See Also:
properties

Constructor Index

 o PopUpCard(String)
Create a PopUpCard instance with the given title.
 o PopUpCard(String, String[])
Create a PopUpCard instance with the given title and panel labels.

Method Index

 o addLabelAndPanel(String, Panel)
Add a panel to this card.
 o getPanels()
Get the panels associated with this card.
 o insertLabelAndPanelAt(String, Panel, int)
Add a panel to this card.
 o labels()
Get a count of panel labels.
 o layoutPanel(int, String, Panel)
Used when extending the PopUpCard class.
 o setTitle(String)
Set the frame title.

Constructors

 o PopUpCard
 public PopUpCard(String title)
Create a PopUpCard instance with the given title.

Parameters:
title - the frame title
 o PopUpCard
 public PopUpCard(String title,
                  String lbls[])
Create a PopUpCard instance with the given title and panel labels.

Parameters:
title - the frame title
lbls - labels for identifying and selecting the panels managed by the card layout.

Methods

 o getPanels
 public Vector getPanels()
Get the panels associated with this card.

Returns:
a vector of Panel objects
 o labels
 public int labels()
Get a count of panel labels.

Returns:
the number of labels for selecting and identifying panels
 o setTitle
 public void setTitle(String title)
Set the frame title. This method sets the frame title to the supplied argument when there is only one label, otherwise it sets the frame title to the title supplied when this object was created.

Parameters:
title - the candidate frame title
Overrides:
setTitle in class Frame
 o layoutPanel
 protected void layoutPanel(int nbr,
                            String label,
                            Panel panel)
Used when extending the PopUpCard class. It could have been abstract since as defined it is a no-op, but then one could not use the base class which is usable by means of addLabelAndPanel.

Parameters:
nbr - identifies the panel to be laid out
label - label to use for Choice
the - panel to which components will be added
 o addLabelAndPanel
 public int addLabelAndPanel(String label,
                             Panel panel)
Add a panel to this card. It is added as the last panel.

Parameters:
label - the label for selecting and identifying the panel
panel - the panel to be added
 o insertLabelAndPanelAt
 public int insertLabelAndPanelAt(String label,
                                  Panel panel,
                                  int pos)
Add a panel to this card. It is added at the specified position.

Parameters:
label - the label for selecting and identifying the panel
panel - the panel to be added
pos - the position at which the panel is to be placed
Returns:
the actual position assigned (in case the supplied position was out-of-bounds).

All Packages  Class Hierarchy  This Package  Previous  Next  Index