Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.utils
Class SortedListbox

java.lang.Object
  extended by com.ibm.etools.iseries.edit.utils.SortedListbox

public class SortedListbox
extends Object

A listbox that always shows a sorted list.


Nested Class Summary
protected  class SortedListbox.SortComparator
          Comparator for sorting the elements to build a sorted list.
 
Field Summary
protected  List _listbox
           
protected  SortedListboxListener _listener
           
static String copyright
           
 
Constructor Summary
SortedListbox(Composite compositeParent)
           
 
Method Summary
 void deselectAll()
           
 String getSelectedString()
          Returns the currently selected string, or null if none selected.
 void selectString(String itemToSelect)
          Set the selection of the list to the inputted string (if it is in the list).
 void setListener(SortedListboxListener listener)
          A listener that is notified when a choice has been selected.
 void setListItems(String[] straItems)
          Makes a copy of the given list, sorts the copy and gives it to the listbox.
 void widgetDefaultSelected(SelectionEvent e)
          Declared in SelectionListener.
 void widgetSelected(SelectionEvent e)
          Declared in SelectionListener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

_listbox

protected List _listbox

_listener

protected SortedListboxListener _listener
Constructor Detail

SortedListbox

public SortedListbox(Composite compositeParent)
Method Detail

deselectAll

public void deselectAll()

getSelectedString

public String getSelectedString()
Returns the currently selected string, or null if none selected.


selectString

public void selectString(String itemToSelect)
Set the selection of the list to the inputted string (if it is in the list).


setListener

public void setListener(SortedListboxListener listener)
A listener that is notified when a choice has been selected.


setListItems

public void setListItems(String[] straItems)
Makes a copy of the given list, sorts the copy and gives it to the listbox.


widgetDefaultSelected

public void widgetDefaultSelected(SelectionEvent e)
Declared in SelectionListener. This method does nothing.


widgetSelected

public void widgetSelected(SelectionEvent e)
Declared in SelectionListener. Called when the listbox selection has changed. Notifies its listener than the selection has changed.


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.