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