Ascent Phase Corp.

org.ascentphase.suit
Class ListPopup

java.lang.Object
  |
  +--Canvas
        |
        +--org.ascentphase.suit.Panel
              |
              +--org.ascentphase.suit.InputPopup
                    |
                    +--org.ascentphase.suit.ListPopup
Direct Known Subclasses:
ComboListPopup

public class ListPopup
extends InputPopup

A component that contains a list of options the user can select from. Two buttons: "OK" and "Cancel" are displayed at the bottom. The options are mutually exclusive, therefore multiple items cannot be selected from the list.

Version:
Author:
huyd
See Also:
Serialized Form

Field Summary
protected  org.ascentphase.suit.ItemList items
          ItemList which contains the options to display
protected  java.lang.String popupTitle
          The form title of this popup
protected  org.ascentphase.suit.ScrollList scroll
          Internal scroll list widget
 
Fields inherited from class org.ascentphase.suit.InputPopup
CLOSE_CANCEL, CLOSE_OK, closeCmd, closeState
 
Fields inherited from class org.ascentphase.suit.Panel
clearReq
 
Constructor Summary
  ListPopup(java.lang.String title, org.ascentphase.suit.ItemList list)
          Initializes the popup with the given form title and list of options.
protected ListPopup(java.lang.String title, org.ascentphase.suit.ItemList list, int rows)
          Initializes the popup with the given form title and list of options and has the given number of visible items at a time.
  ListPopup(java.lang.String title, org.ascentphase.suit.ItemList list, java.lang.String selected, int rows)
          Initializes the popup with the given form title and list of options.
 
Method Summary
 java.lang.String getText()
          Returns the selected option that the user selected from the list.
protected  void initialize(int rows)
           
 
Methods inherited from class org.ascentphase.suit.InputPopup
getCloseState, handleCommandEvent, setCloseCommand
 
Methods inherited from class org.ascentphase.suit.Panel
add, add, keyPressed, keyReleased, keyRepeated, paint, pointerDragged, pointerPressed, pointerReleased, remove, setCommandListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

popupTitle

protected java.lang.String popupTitle
The form title of this popup


items

protected org.ascentphase.suit.ItemList items
ItemList which contains the options to display


scroll

protected org.ascentphase.suit.ScrollList scroll
Internal scroll list widget

Constructor Detail

ListPopup

public ListPopup(java.lang.String title,
                 org.ascentphase.suit.ItemList list)
Initializes the popup with the given form title and list of options. A default of 7 items will be visible at a time.

Parameters:
title - the String title of the popup.
list - the list of items to be displayed.

ListPopup

public ListPopup(java.lang.String title,
                 org.ascentphase.suit.ItemList list,
                 java.lang.String selected,
                 int rows)
Initializes the popup with the given form title and list of options. Upon display, the option given by selected will be highlighted by default.

Parameters:
title - the String title of the popup.
list - the list of items to be displayed.
selected - the option to be highlighted by default.
rows - the number of rows that will be visible.

ListPopup

protected ListPopup(java.lang.String title,
                    org.ascentphase.suit.ItemList list,
                    int rows)
Initializes the popup with the given form title and list of options and has the given number of visible items at a time.

Parameters:
title - the String title of the popup.
list - the list of items to be displayed.
rows - the number of rows that will be visible.
Method Detail

initialize

protected void initialize(int rows)

getText

public java.lang.String getText()
Returns the selected option that the user selected from the list.

Specified by:
getText in class InputPopup
Returns:
the text input.

Ascent Phase Corp.

Copyright © 2002 Ascent Phase Corp. All Rights Reserved.