All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.gui.List

java.lang.Object
   |
   +----com.bulletproof.gui.Component
           |
           +----com.bulletproof.gui.List

public class List
extends Component
implements ItemSelectable, AdjustmentListener
Class List represents an extended list class that allows for auto loading from a database and also tracks key values for dsiplayed values.


Constructor Index

 o List()
Creates a List component.

Method Index

 o addActionListener(ActionListener)
 o addItem(String)
Add an item to the list.
 o addItem(String, String)
Add an item to the list.
 o addItem(String, String, Object[])
Add an item to the list.
 o addItem(String, String[])
Add an item to the list.
 o addItemListener(ItemListener)
 o adjustmentValueChanged(AdjustmentEvent)
 o clear()
Remove all the entries from the List.
 o deselect(int)
Deselect the requested item.
 o deselectAll()
Deselect all of the items.
 o getItem(int)
Get the text value of a specific item.
 o getItem(String)
Get the index value of a specific item.
 o getItemCount()
Get the number of items in the List.
 o getItemKey(int)
Get the key value of the selected item.
 o getKeyItem(String)
Get the item number of this key value.
 o getMultipleSelections()
Allow multiple selections to be made on the list
 o getPreferredSize()
Gets the preferred size of this component.
 o getSelectedIndex()
Get the selected indexes in the List.
 o getSelectedIndexes()
Get the selected indexes in the List.
 o getSelectedItem()
Get the selected indexes in the List.
 o getSelectedKey()
Get the currently selected key value.
 o getSelectedKeys()
Get the currently selected key values.
 o getSelectedKeyValue()
Get an array containing all the key values for the currently selected item.
 o getSelectedObjects()
Returns the selected items or null if no items are selected.
 o isSelected(int)
Check is the requested item is selected.
 o loadList(String[], String[])
Load values into the choice from a set of arrays.
 o loadList(User, Jagg, String, String, String, String, String, String, String)
Load values into the choice from a database table.
 o paint(Graphics)
Paints the component.
 o processMouseEvent(MouseEvent)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
 o remove(int)
Remove an item from the List.
 o remove(String)
Remove an item from the List.
 o removeActionListener(ActionListener)
 o removeItemListener(ItemListener)
 o select(int)
Select the requested item.
 o select(String)
Select the requested item.
 o selectKey(String)
Select the requested item.
 o setItem(int, String)
Sets the displayed value of the specified item.
 o setMasterDrawRegion(Rectangle)
Set the master drawing region for this coomponent.
 o setMultipleSelections(boolean)
Allow multiple selections to be made on the list
 o showSelectedItem()
Display the selected item
 o update(Graphics)
Updates the component.

Constructors

 o List
 public List()
Creates a List component.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.

Methods

 o addActionListener
 public void addActionListener(ActionListener al)
 o removeActionListener
 public void removeActionListener(ActionListener al)
 o addItemListener
 public void addItemListener(ItemListener al)
 o removeItemListener
 public void removeItemListener(ItemListener al)
 o getSelectedObjects
 public Object[] getSelectedObjects()
Returns the selected items or null if no items are selected.

 o loadList
 public void loadList(String displayName[],
                      String actualName[])
Load values into the choice from a set of arrays.

Parameters:
displayName - the array containing the names to load display values from
actualName - the array containing the keys to load the key values
 o loadList
 public void loadList(User user,
                      Jagg jaggSQL,
                      String choiceName,
                      String actualName,
                      String tableName,
                      String whereClause,
                      String orderByClause,
                      String blankItem,
                      String cacheName)
Load values into the choice from a database table.

Parameters:
user - a handle to an instance of User.
Jagg - a handle to an instance of JDPJagg. DSN and CSTR must already be intialized.
choiceName - the database column name to retrieve the choice values from
actualName - the database column name to retrieve the key values from
tableName - the database table data from
whereClause - the where clause to use when selecting rows from the table
orderByClause - the order by clause to use when selecting rows from the table
blankItem - (N/A, blank, null) whether a blank item is required on the pulldown.
cacheName - the unique name to use when caching the data in this list
 o setMultipleSelections
 public void setMultipleSelections(boolean allowMultiple)
Allow multiple selections to be made on the list

Parameters:
allowMultiple - Allow multiple selections to be made on the list
 o getMultipleSelections
 public boolean getMultipleSelections()
Allow multiple selections to be made on the list

Returns:
Allow multiple selections to be made on the list
 o select
 public void select(int item)
Select the requested item.

Parameters:
item - the item to select.
 o select
 public void select(String item)
Select the requested item.

Parameters:
item - the item to select.
 o selectKey
 public void selectKey(String item)
Select the requested item.

Parameters:
item - the item to select.
 o deselect
 public void deselect(int item)
Deselect the requested item.

Parameters:
item - the item to deselect.
 o deselectAll
 public void deselectAll()
Deselect all of the items.

 o isSelected
 public boolean isSelected(int item)
Check is the requested item is selected.

Parameters:
item - the item to check.
Returns:
true if selected
 o setItem
 public void setItem(int index,
                     String displayItem)
Sets the displayed value of the specified item.

Parameters:
index - the item number to set the new text.
displayItem - the text of the item.
 o addItem
 public void addItem(String displayItem)
Add an item to the list.

Parameters:
displayItem - the text of the item.
 o addItem
 public void addItem(String displayItem,
                     String actualItem)
Add an item to the list.

Parameters:
displayItem - the text of the item.
actualItem - the matching key value.
 o addItem
 public void addItem(String displayItem,
                     String actualValues[])
Add an item to the list.

Parameters:
displayItem - the text of the item.
actualValues - the matching key values.
 o addItem
 public void addItem(String displayItem,
                     String actualItem,
                     Object sortKeys[])
Add an item to the list.

Parameters:
displayItem - the text of the item. If multiple items are to be displayed they should be concatenated in the displayItem separated by the '|' character.
actualItem - the matching key value.
icon - the icon to display.
sortKeys - the objects for sorting the columns of the list if multiple columns are present.
See Also:
JDPTreePicker
 o getItemCount
 public int getItemCount()
Get the number of items in the List.

Returns:
the number of items.
 o getItem
 public String getItem(int item)
Get the text value of a specific item.

Parameters:
itemNumber - the item number.
Returns:
the item.
 o getItem
 public int getItem(String item)
Get the index value of a specific item.

Parameters:
item - the item.
Returns:
the index of the item.
 o clear
 public void clear()
Remove all the entries from the List.

 o remove
 public void remove(int item)
Remove an item from the List.

Parameters:
itemNumber - the item.
 o remove
 public void remove(String item)
Remove an item from the List.

Parameters:
itemValue - the item.
 o getKeyItem
 public int getKeyItem(String key)
Get the item number of this key value.

Parameters:
the - item key value.
Returns:
the item number.
 o getSelectedItem
 public String getSelectedItem()
Get the selected indexes in the List. Presently multiple selections are not supported so this function only returns one item.

Returns:
the list indexes that are selected.
 o getSelectedIndex
 public int getSelectedIndex()
Get the selected indexes in the List. Presently multiple selections are not supported so this function only returns one item.

Returns:
the list indexes that are selected.
 o getSelectedIndexes
 public int[] getSelectedIndexes()
Get the selected indexes in the List. Presently multiple selections are not supported so this function only returns one item.

Returns:
the list indexes that are selected.
 o getSelectedKey
 public String[] getSelectedKey()
Get the currently selected key value.

Returns:
the item key value.
 o getItemKey
 public String[] getItemKey(int item)
Get the key value of the selected item.

Parameters:
the - item number.
Returns:
the item key value.
 o getSelectedKeys
 public String[] getSelectedKeys()
Get the currently selected key values.

Returns:
the item key values.
 o getSelectedKeyValue
 public String[] getSelectedKeyValue()
Get an array containing all the key values for the currently selected item. (presently this only returns a one dimensional array as keys can only be one dimension).

Returns:
the item key values.
 o showSelectedItem
 public void showSelectedItem()
Display the selected item

 o setMasterDrawRegion
 public void setMasterDrawRegion(Rectangle region)
Set the master drawing region for this coomponent.

Parameters:
region - the specified master drawing region
Overrides:
setMasterDrawRegion in class Component
 o update
 public void update(Graphics g)
Updates the component.

Overrides:
update in class Component
 o paint
 public synchronized void paint(Graphics g)
Paints the component.

Overrides:
paint in class Component
 o processMouseEvent
 public synchronized void processMouseEvent(MouseEvent me)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

Overrides:
processMouseEvent in class Component
 o adjustmentValueChanged
 public void adjustmentValueChanged(AdjustmentEvent e)
 o getPreferredSize
 public Dimension getPreferredSize()
Gets the preferred size of this component.

Overrides:
getPreferredSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index