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.
-
List()
- Creates a List component.
-
addActionListener(ActionListener)
-
-
addItem(String)
- Add an item to the list.
-
addItem(String, String)
- Add an item to the list.
-
addItem(String, String, Object[])
- Add an item to the list.
-
addItem(String, String[])
- Add an item to the list.
-
addItemListener(ItemListener)
-
-
adjustmentValueChanged(AdjustmentEvent)
-
-
clear()
- Remove all the entries from the List.
-
deselect(int)
- Deselect the requested item.
-
deselectAll()
- Deselect all of the items.
-
getItem(int)
- Get the text value of a specific item.
-
getItem(String)
- Get the index value of a specific item.
-
getItemCount()
- Get the number of items in the List.
-
getItemKey(int)
- Get the key value of the selected item.
-
getKeyItem(String)
- Get the item number of this key value.
-
getMultipleSelections()
- Allow multiple selections to be made on the list
-
getPreferredSize()
- Gets the preferred size of this component.
-
getSelectedIndex()
- Get the selected indexes in the List.
-
getSelectedIndexes()
- Get the selected indexes in the List.
-
getSelectedItem()
- Get the selected indexes in the List.
-
getSelectedKey()
- Get the currently selected key value.
-
getSelectedKeys()
- Get the currently selected key values.
-
getSelectedKeyValue()
- Get an array containing all the key values for the currently selected item.
-
getSelectedObjects()
- Returns the selected items or null if no items are selected.
-
isSelected(int)
- Check is the requested item is selected.
-
loadList(String[], String[])
- Load values into the choice from a set of arrays.
-
loadList(User, Jagg, String, String, String, String, String, String, String)
- Load values into the choice from a database table.
-
paint(Graphics)
-
Paints the component.
-
processMouseEvent(MouseEvent)
-
Processes mouse events occurring on this component by
dispatching them to any registered MouseListener objects.
-
remove(int)
- Remove an item from the List.
-
remove(String)
- Remove an item from the List.
-
removeActionListener(ActionListener)
-
-
removeItemListener(ItemListener)
-
-
select(int)
- Select the requested item.
-
select(String)
- Select the requested item.
-
selectKey(String)
- Select the requested item.
-
setItem(int, String)
- Sets the displayed value of the specified item.
-
setMasterDrawRegion(Rectangle)
-
Set the master drawing region for this coomponent.
-
setMultipleSelections(boolean)
- Allow multiple selections to be made on the list
-
showSelectedItem()
- Display the selected item
-
update(Graphics)
-
Updates the component.
List
public List()
- Creates a List component.
- Parameters:
- JDPUser - the global user parameter used to pass handles in JDP.
addActionListener
public void addActionListener(ActionListener al)
removeActionListener
public void removeActionListener(ActionListener al)
addItemListener
public void addItemListener(ItemListener al)
removeItemListener
public void removeItemListener(ItemListener al)
getSelectedObjects
public Object[] getSelectedObjects()
- Returns the selected items or null if no items are selected.
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
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
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
getMultipleSelections
public boolean getMultipleSelections()
- Allow multiple selections to be made on the list
- Returns:
- Allow multiple selections to be made on the list
select
public void select(int item)
- Select the requested item.
- Parameters:
- item - the item to select.
select
public void select(String item)
- Select the requested item.
- Parameters:
- item - the item to select.
selectKey
public void selectKey(String item)
- Select the requested item.
- Parameters:
- item - the item to select.
deselect
public void deselect(int item)
- Deselect the requested item.
- Parameters:
- item - the item to deselect.
deselectAll
public void deselectAll()
- Deselect all of the items.
isSelected
public boolean isSelected(int item)
- Check is the requested item is selected.
- Parameters:
- item - the item to check.
- Returns:
- true if selected
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.
addItem
public void addItem(String displayItem)
- Add an item to the list.
- Parameters:
- displayItem - the text of the item.
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.
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.
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
getItemCount
public int getItemCount()
- Get the number of items in the List.
- Returns:
- the number of items.
getItem
public String getItem(int item)
- Get the text value of a specific item.
- Parameters:
- itemNumber - the item number.
- Returns:
- the item.
getItem
public int getItem(String item)
- Get the index value of a specific item.
- Parameters:
- item - the item.
- Returns:
- the index of the item.
clear
public void clear()
- Remove all the entries from the List.
remove
public void remove(int item)
- Remove an item from the List.
- Parameters:
- itemNumber - the item.
remove
public void remove(String item)
- Remove an item from the List.
- Parameters:
- itemValue - the item.
getKeyItem
public int getKeyItem(String key)
- Get the item number of this key value.
- Parameters:
- the - item key value.
- Returns:
- the item number.
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.
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.
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.
getSelectedKey
public String[] getSelectedKey()
- Get the currently selected key value.
- Returns:
- the item key value.
getItemKey
public String[] getItemKey(int item)
- Get the key value of the selected item.
- Parameters:
- the - item number.
- Returns:
- the item key value.
getSelectedKeys
public String[] getSelectedKeys()
- Get the currently selected key values.
- Returns:
- the item key values.
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.
showSelectedItem
public void showSelectedItem()
- Display the selected item
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
update
public void update(Graphics g)
- Updates the component.
- Overrides:
- update in class Component
paint
public synchronized void paint(Graphics g)
- Paints the component.
- Overrides:
- paint in class Component
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
adjustmentValueChanged
public void adjustmentValueChanged(AdjustmentEvent e)
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