com.nqadmin.swingSet.formatting
Class SSFormattedComboBox

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JComboBox
                  extended by com.nqadmin.swingSet.formatting.SSFormattedComboBox
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ListDataListener

public class SSFormattedComboBox
extends javax.swing.JComboBox
implements java.awt.event.ActionListener

Author:
dags
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComboBox
javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JComboBox.KeySelectionManager
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  SSFormattedComboBoxEditor editor
           
protected  SSFormattedComboBoxRenderer renderer
           
 
Fields inherited from class javax.swing.JComboBox
actionCommand, dataModel, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, selectedItemReminder
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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
SSFormattedComboBox()
          Creates a new instance of SSFormattedComboBox
SSFormattedComboBox(javax.swing.ComboBoxModel model)
           
 
Method Summary
 void configureEditor(javax.swing.ComboBoxEditor anEditor, java.lang.Object anItem)
           
 int getColumnType()
          Returns the column type of the bound column
 SSConnection getConnection()
          Deprecated.  
 java.lang.String getDataColumn()
          Retuns the data column name
 java.awt.Color getEvenRowBackground()
          Returns the background color used for even rows
 java.awt.Color getEvenRowForeground()
          Returns the foreground color used for even rows
 javax.swing.InputVerifier getInputVerifier()
           
 java.lang.String getListColumn()
          Returns the name of the column whose values are displayed as combo box items
 SSDataNavigator getNavigator()
          Deprecated.  
 java.awt.Color getOddRowBackground()
          Returns the background color used for odd rows
 java.awt.Color getOddRowForeground()
          Returns the foreground color used for odd rows
 java.lang.String getOrderBy()
          The column name used for ordering the data
 SSConnection getSSConnection()
          Database connection used for executing the query
 SSDataNavigator getSSDataNavigator()
          Returns the SSDataNavigator object being used
 SSRowSet getSSRowSet()
          Returns the SSRowSet object to which the component is bound
 java.lang.String getTable()
          Returns the database table name being used
 void setColumnType(int colType)
          Sets the type of columns to which this component is bound to.
 void setConnection(SSConnection connection)
          Deprecated.  
 void setDataColumn(java.lang.String dataColumn)
          Sets the column name whose values are used as the underlying values for the displayed items
 void setEvenRowBackground(java.awt.Color color)
          Sets the background color for even rows
 void setEvenRowForeground(java.awt.Color color)
          Sets the foreground color for even rows
 void setListColumn(java.lang.String listColumn)
          Sets the column name whose values should be displayed in the combo box
 void setNavigator(SSDataNavigator navigator)
          Deprecated.  
 void setOddRowBackground(java.awt.Color color)
          Sets the background color for odd rows
 void setOddRowForeground(java.awt.Color color)
          Sets the foreground color for odd rows
 void setOrderBy(java.lang.String orderBy)
          Sets the column name by which the data has to be ordered
 void setSSConnection(SSConnection connection)
          Database connection to be used for executing the query
 void setSSDataNavigator(SSDataNavigator navigator)
          Sets the SSDataNavigator used for navigating the SSRowSet
 void setSSRowSet(SSRowSet rowset)
          Sets the SSRowSet to which the component is bound
 void setTable(java.lang.String table)
          Sets the table name from which data should be pulled
 
Methods inherited from class javax.swing.JComboBox
actionPerformed, addActionListener, addItem, addItemListener, addPopupMenuListener, configurePropertiesFromAction, contentsChanged, createActionPropertyChangeListener, createDefaultKeySelectionManager, fireActionEvent, fireItemStateChanged, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getAction, getActionCommand, getActionListeners, getEditor, getItemAt, getItemCount, getItemListeners, getKeySelectionManager, getMaximumRowCount, getModel, getPopupMenuListeners, getPrototypeDisplayValue, getRenderer, getSelectedIndex, getSelectedItem, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, installAncestorListener, intervalAdded, intervalRemoved, isEditable, isLightWeightPopupEnabled, isPopupVisible, paramString, processKeyEvent, removeActionListener, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectedItemChanged, selectWithKeyChar, setAction, setActionCommand, setEditable, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setSelectedIndex, setSelectedItem, setUI, showPopup, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

editor

protected SSFormattedComboBoxEditor editor

renderer

protected SSFormattedComboBoxRenderer renderer
Constructor Detail

SSFormattedComboBox

public SSFormattedComboBox()
Creates a new instance of SSFormattedComboBox


SSFormattedComboBox

public SSFormattedComboBox(javax.swing.ComboBoxModel model)
Parameters:
model -
Method Detail

setOddRowBackground

public void setOddRowBackground(java.awt.Color color)
Sets the background color for odd rows

Parameters:
color - - background color to be used for odd rows

setEvenRowBackground

public void setEvenRowBackground(java.awt.Color color)
Sets the background color for even rows

Parameters:
color - - background color to be used for even rows

setOddRowForeground

public void setOddRowForeground(java.awt.Color color)
Sets the foreground color for odd rows

Parameters:
color - - foreground color to be used for odd rows

setEvenRowForeground

public void setEvenRowForeground(java.awt.Color color)
Sets the foreground color for even rows

Parameters:
color - - foreground color to be used for even rows

getOddRowBackground

public java.awt.Color getOddRowBackground()
Returns the background color used for odd rows

Returns:
- returns the background color used for odd rows

getEvenRowBackground

public java.awt.Color getEvenRowBackground()
Returns the background color used for even rows

Returns:
- returns the background color used for even rows

getOddRowForeground

public java.awt.Color getOddRowForeground()
Returns the foreground color used for odd rows

Returns:
- returns the foreground color used for odd rows

getEvenRowForeground

public java.awt.Color getEvenRowForeground()
Returns the foreground color used for even rows

Returns:
- returns the foreground color used for even rows

setListColumn

public void setListColumn(java.lang.String listColumn)
Sets the column name whose values should be displayed in the combo box

Parameters:
listColumn - - column name whose values should be displayed in the combo box

getListColumn

public java.lang.String getListColumn()
Returns the name of the column whose values are displayed as combo box items

Returns:
- returns the name of the column whose values are displayed as combo box items

setDataColumn

public void setDataColumn(java.lang.String dataColumn)
Sets the column name whose values are used as the underlying values for the displayed items

Parameters:
dataColumn - - column name whose values are used as the underlying values for the displayed items

getDataColumn

public java.lang.String getDataColumn()
Retuns the data column name

Returns:
- returns the data column name used in the query.

setTable

public void setTable(java.lang.String table)
Sets the table name from which data should be pulled

Parameters:
table - - database table name to be used

getTable

public java.lang.String getTable()
Returns the database table name being used

Returns:
returns the database table name being used

setNavigator

public void setNavigator(SSDataNavigator navigator)
Deprecated. 

Sets the SSDataNavigator used for navigating the SSRowSet

Parameters:
navigator - - SSDataNavigator instance used for navigating the SSRowSet

getNavigator

public SSDataNavigator getNavigator()
Deprecated. 

Returns the SSDataNavigator object being used

Returns:
returns the SSDataNavigator object being used

setSSDataNavigator

public void setSSDataNavigator(SSDataNavigator navigator)
Sets the SSDataNavigator used for navigating the SSRowSet

Parameters:
navigator - - SSDataNavigator instance used for navigating the SSRowSet

getSSDataNavigator

public SSDataNavigator getSSDataNavigator()
Returns the SSDataNavigator object being used

Returns:
returns the SSDataNavigator object being used

setSSRowSet

public void setSSRowSet(SSRowSet rowset)
Sets the SSRowSet to which the component is bound

Parameters:
rowset - - SSRowSet object to which the component is bound

getSSRowSet

public SSRowSet getSSRowSet()
Returns the SSRowSet object to which the component is bound

Returns:
returns the SSRowSet object to which the component is bound

setOrderBy

public void setOrderBy(java.lang.String orderBy)
Sets the column name by which the data has to be ordered

Parameters:
orderBy - - column name based on which data should be ordered

getOrderBy

public java.lang.String getOrderBy()
The column name used for ordering the data

Returns:
returns the column name used for ordering the data

setColumnType

public void setColumnType(int colType)
Sets the type of columns to which this component is bound to.

Parameters:
colType - - column type of the bound column

getColumnType

public int getColumnType()
Returns the column type of the bound column

Returns:
- returns the column type of the bound column

setConnection

public void setConnection(SSConnection connection)
Deprecated. 

Database connection to be used for executing the query

Parameters:
connection - - SSConnection object to be used for querying the database

getConnection

public SSConnection getConnection()
Deprecated. 

Database connection used for executing the query

Returns:
connection - SSConnection object used for querying the database

setSSConnection

public void setSSConnection(SSConnection connection)
Database connection to be used for executing the query

Parameters:
connection - - SSConnection object to be used for querying the database

getSSConnection

public SSConnection getSSConnection()
Database connection used for executing the query

Returns:
connection - SSConnection object used for querying the database

configureEditor

public void configureEditor(javax.swing.ComboBoxEditor anEditor,
                            java.lang.Object anItem)
Overrides:
configureEditor in class javax.swing.JComboBox

getInputVerifier

public javax.swing.InputVerifier getInputVerifier()
Overrides:
getInputVerifier in class javax.swing.JComponent