All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.gui.ComboBox

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

public class ComboBox
extends Component
implements ActionListener, ItemListener
ComboBox is a component that allows the editing of a single line of text with a pulldown.


Constructor Index

 o ComboBox()
Constructs a new ComboBox.
 o ComboBox(String)
Constructs a new ComboBox initialized with the specified text.
 o ComboBox(String, int)
Constructs a new ComboBox initialized with the specified text.

Method Index

 o actionPerformed(ActionEvent)
 o addActionListener(ActionListener)
 o addItem(String)
Add an item to the list.
 o clear()
Remove all the entries from the List.
 o displayPopup()
 o getCaretPosition()
Returns the position of the text insertion caret for the ComboBox component.
 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 getMinimumSize()
Gets the minimum size of this component.
 o getSelectedText()
Returns the current selected text value this ComboBox
 o getSelectionEnd()
Returns the selected ComboBox's end position.
 o getSelectionStart()
Returns the selected ComboBox's end position.
 o getText()
Returns the current text value this TextField
 o isEditable()
Returns the boolean indicating whether this ComboBox is editable or not.
 o itemStateChanged(ItemEvent)
 o loadChoice(String[])
Load values into the choice from a set of arrays.
 o loadChoice(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 processFocusEvent(FocusEvent)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
 o processKeyEvent(KeyEvent)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
 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 select(int, int)
Sets the new selected text value this ComboBox
 o setCaretPosition(int)
Sets the position of the text insertion caret for the ComboBox
 o setEditable(boolean)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.
 o setText(String)
Sets the new text value this TextField
 o setTextNoRepaint(String)
Sets the new text value this TextField
 o validate()
Sort the entries in the List

Constructors

 o ComboBox
 public ComboBox()
Constructs a new ComboBox.

 o ComboBox
 public ComboBox(String text)
Constructs a new ComboBox initialized with the specified text.

Parameters:
text - the text to be displayed
 o ComboBox
 public ComboBox(String text,
                 int minWidth)
Constructs a new ComboBox initialized with the specified text.

Parameters:
text - the text to be displayed
minWidth - the minimum width in pixels of this ComboBox

Methods

 o addActionListener
 public void addActionListener(ActionListener al)
 o removeActionListener
 public void removeActionListener(ActionListener al)
 o getText
 public String getText()
Returns the current text value this TextField

Returns:
the current text value this TextField
 o setText
 public void setText(String s)
Sets the new text value this TextField

Parameters:
the - new text value this TextField
 o setTextNoRepaint
 public void setTextNoRepaint(String s)
Sets the new text value this TextField

Parameters:
the - new text value this TextField
 o getSelectedText
 public String getSelectedText()
Returns the current selected text value this ComboBox

Returns:
the current selected text value this ComboBox
 o getSelectionStart
 public int getSelectionStart()
Returns the selected ComboBox's end position.

 o getSelectionEnd
 public int getSelectionEnd()
Returns the selected ComboBox's end position.

 o setCaretPosition
 public void setCaretPosition(int position)
Sets the position of the text insertion caret for the ComboBox

Parameters:
position - the position
 o getCaretPosition
 public int getCaretPosition()
Returns the position of the text insertion caret for the ComboBox component.

Returns:
the position of the text insertion caret for the text component.
 o select
 public void select(int s0,
                    int s1)
Sets the new selected text value this ComboBox

Parameters:
the - new selected text from value this ComboBox
the - new selected text to value this ComboBox
 o isEditable
 public boolean isEditable()
Returns the boolean indicating whether this ComboBox is editable or not.

See Also:
setEditable
 o setEditable
 public synchronized void setEditable(boolean b)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.

Parameters:
b - the boolean to be set
See Also:
isEditable
 o 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
 o 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
 o addItem
 public void addItem(String displayItem)
Add an item to the list.

Parameters:
displayItem - the text of the item.
 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 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
 o paint
 public synchronized void paint(Graphics g)
Paints the component.

Overrides:
paint in class Component
 o processKeyEvent
 public synchronized void processKeyEvent(KeyEvent ke)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.

Overrides:
processKeyEvent 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 processFocusEvent
 public synchronized void processFocusEvent(FocusEvent fe)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.

Overrides:
processFocusEvent in class Component
 o actionPerformed
 public void actionPerformed(ActionEvent e)
 o itemStateChanged
 public synchronized void itemStateChanged(ItemEvent e)
 o displayPopup
 public void displayPopup()
 o 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