All Packages Class Hierarchy This Package Previous Next Index
Class com.bulletproof.gui.Choice
java.lang.Object
|
+----com.bulletproof.gui.Component
|
+----com.bulletproof.gui.Choice
- public class Choice
- extends Component
- implements ActionListener, ItemListener
Choice is a component that implements a pulldown.
-
Choice()
- Constructs a new Choice.
-
Choice(int)
- Constructs a new Choice.
-
actionPerformed(ActionEvent)
-
-
addActionListener(ActionListener)
-
-
addItem(String)
- Add an item to the list.
-
addItem(String, String)
- Add an item to the list.
-
clear()
- Remove all the entries from the List.
-
deselect(int)
- Select the requested item.
-
displayPopup()
-
-
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.
-
getKeyForItem(String)
- Get the key value of the selected item.
-
getKeyItem(String)
- Get the item number of this key value.
-
getMinimumSize()
- Gets the minimum size of this component.
-
getSelectedIndex()
- Get the selected indexes in the List.
-
getSelectedItem()
- Get the selected indexes in the List.
-
getSelectedKey()
- Get the key value of the selected item.
-
itemStateChanged(ItemEvent)
-
-
loadChoice(String[])
- Load values into the choice from a set of arrays.
-
loadChoice(String[], String[])
- Load values into the choice from a set of arrays.
-
loadChoice(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)
-
-
select(int)
- Select the requested item.
-
select(String)
- Select the requested item.
-
selectKey(String)
- Select the requested item using the key value.
-
showSelectedItem()
- Display the selected item
-
validate()
- Sort the entries in the List
Choice
public Choice()
- Constructs a new Choice.
Choice
public Choice(int minWidth)
- Constructs a new Choice.
- Parameters:
- minWidth - the minimum width in pixels of this ComboBox
addActionListener
public void addActionListener(ActionListener al)
removeActionListener
public void removeActionListener(ActionListener al)
loadChoice
public void loadChoice(String displayName[])
- 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
loadChoice
public void loadChoice(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
loadChoice
public void loadChoice(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
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.
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 using the key value.
- Parameters:
- key - the key value of the item to select.
deselect
public void deselect(int item)
- Select the requested item.
- Parameters:
- item - the item to select.
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.
getKeyItem
public int getKeyItem(String itemKey)
- Get the item number of this key value.
- Parameters:
- the - item key value.
- Returns:
- the item number.
getItemKey
public String getItemKey(int item)
- Get the key value of the selected item.
- Parameters:
- the - item number.
- Returns:
- the item key value.
getKeyForItem
public String getKeyForItem(String item)
- Get the key value of the selected item.
- Parameters:
- the - item number.
- Returns:
- the item key value.
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.
getSelectedKey
public String getSelectedKey()
- Get the key value of the selected item.
- Returns:
- the item key value.
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.
validate
public void validate()
- Sort the entries in the List
- Parameters:
- ignoreCase - choose whether case will be taken into account when sorting
- Overrides:
- validate 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
actionPerformed
public void actionPerformed(ActionEvent e)
itemStateChanged
public void itemStateChanged(ItemEvent e)
showSelectedItem
public void showSelectedItem()
- Display the selected item
displayPopup
public void displayPopup()
getMinimumSize
public Dimension getMinimumSize()
- Gets the minimum size of this component.
- Overrides:
- getMinimumSize in class Component
All Packages Class Hierarchy This Package Previous Next Index