LumiSoft.UI.Controls
Class WComboBox

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by LumiSoft.UI.Controls.WControl
                      extended by LumiSoft.UI.Controls.WButtonEdit_base
                          extended by LumiSoft.UI.Controls.WComboBox
All Implemented Interfaces:
java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, IDisposable

public class WComboBox
extends WButtonEdit_base
implements java.awt.event.FocusListener, java.awt.event.KeyListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WComboBox()
          Default constructor.
 
Method Summary
 void addSelectionChangedListener(java.awt.event.ActionListener l)
          Adds the specified action listener to receive action events from this button.
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 boolean getAcceptsAddKey()
          Gets if + key simulates button click.
 java.awt.Font getFont()
          Gets font.
 WComboItems getItems()
          Gets combobox items collection.
 int getMaxVisibleItems()
          Gets maximum allowed visible items in combo popup before it starts to scroll.
 int getSelectedIndex()
          Gets currently selected item index or -1 if ite, isn't selected.
 WComboItem getSelectedItem()
          Gets currently selected item or null if item isn't selected.
 int getSelectionEnd()
          Gets text selection end position.
 int getSelectionStart()
          Gets text selection start position.
 java.lang.String getText()
          Gets currently visible text in combobox.
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void removeSelectionChangedListener(java.awt.event.ActionListener l)
          Removes the specified action listener so it no longer receives action events from this button.
 void SelectItemByTag(java.lang.Object itemTag)
          Selects item by specified item tag.
 void SelectItemByText(java.lang.String text)
          Selects first item which has specified text.
 void setAcceptsAddKey(boolean value)
          Sets if + key simulates button click.
 void setEditable(boolean value)
          Sets if control is editable.
 void setEnabled(boolean value)
          Sets if enabled.
 void setFont(java.awt.Font value)
          Sets font.
 void setMaxVisibleItems(int value)
          Sets maximum allowed visible items in combo popup before it starts to scroll.
 void setSelectedIndex(int value)
          Selects item with specified index.
 void setSelectionEnd(int value)
          Sets text selection end position.
 void setSelectionStart(int value)
          Sets text selection start position.
 void setText(java.lang.String text)
          Sets currently visible text in combobox.
 
Methods inherited from class LumiSoft.UI.Controls.WButtonEdit_base
addButtonClickedListener, getButtonImage, getEditable, getSelectable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintComponent, removeButtonClickedListener, setButtonImage, setDrawBorders, setSelectable
 
Methods inherited from class LumiSoft.UI.Controls.WControl
Dispose, FlashControl, getAnchorStyle, getViewStyle, getWText, setAnchorStyle, setBounds, setViewStyle, setWText
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getWidth, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WComboBox

public WComboBox()
Default constructor.

Method Detail

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

SelectItemByTag

public void SelectItemByTag(java.lang.Object itemTag)
Selects item by specified item tag.

Parameters:
tag -

SelectItemByText

public void SelectItemByText(java.lang.String text)
Selects first item which has specified text. If item with specified text doesn't exist, nothing is done.

Parameters:
text -

getFont

public java.awt.Font getFont()
Gets font.

Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component

setFont

public void setFont(java.awt.Font value)
Sets font.

Overrides:
setFont in class javax.swing.JComponent

getSelectedItem

public WComboItem getSelectedItem()
Gets currently selected item or null if item isn't selected.

Returns:

getSelectedIndex

public int getSelectedIndex()
Gets currently selected item index or -1 if ite, isn't selected.

Returns:

setSelectedIndex

public void setSelectedIndex(int value)
Selects item with specified index. If item with specified index doesn't exist, nothing is done.

Parameters:
value -

getSelectionStart

public int getSelectionStart()
Gets text selection start position.

Returns:

setSelectionStart

public void setSelectionStart(int value)
Sets text selection start position.

Parameters:
value -

getSelectionEnd

public int getSelectionEnd()
Gets text selection end position.

Returns:

setSelectionEnd

public void setSelectionEnd(int value)
Sets text selection end position.

Parameters:
value -

getMaxVisibleItems

public int getMaxVisibleItems()
Gets maximum allowed visible items in combo popup before it starts to scroll.

Returns:

setMaxVisibleItems

public void setMaxVisibleItems(int value)
Sets maximum allowed visible items in combo popup before it starts to scroll.

Parameters:
value -

getAcceptsAddKey

public boolean getAcceptsAddKey()
Gets if + key simulates button click.

Returns:

setAcceptsAddKey

public void setAcceptsAddKey(boolean value)
Sets if + key simulates button click.

Parameters:
value -

getItems

public WComboItems getItems()
Gets combobox items collection.

Returns:

getText

public java.lang.String getText()
Gets currently visible text in combobox.

Returns:

setText

public void setText(java.lang.String text)
Sets currently visible text in combobox.

Parameters:
text -

setEnabled

public void setEnabled(boolean value)
Sets if enabled.

Overrides:
setEnabled in class javax.swing.JComponent

setEditable

public void setEditable(boolean value)
Sets if control is editable.

Overrides:
setEditable in class WButtonEdit_base

addSelectionChangedListener

public void addSelectionChangedListener(java.awt.event.ActionListener l)
Adds the specified action listener to receive action events from this button.

Parameters:
l - the action listener

removeSelectionChangedListener

public void removeSelectionChangedListener(java.awt.event.ActionListener l)
Removes the specified action listener so it no longer receives action events from this button.

Parameters:
l - the action listener