|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JComboBox
com.retek.commons.gui.widget.RComboBox
This class sublcasses the standard JComboBox class in the Swing package to provide custom functionality for the Rcom client application. The popup window is made visible by hitting the SPACE key.
Retek Inc. Copyright (c) 2002
Nested Class Summary |
---|
Nested classes inherited from class javax.swing.JComboBox |
---|
javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JComboBox.KeySelectionManager |
Nested classes inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComboBox |
---|
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, 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 | |
---|---|
RComboBox()
Returns new RComboBox object. |
Method Summary | |
---|---|
void |
clear()
Removes all items from the combo box. |
java.lang.String |
getClusterName()
Retrieves the cluster name of the widget. |
java.lang.Object |
getItemAt(int index)
Retrieves the currently selected item. |
boolean |
getRequired()
Retrieves whether or not a selection is required in the combo box. |
java.lang.String |
getSelectedDescription()
Retrieves the description of the selected item. |
java.lang.Object |
getSelectedItem()
Retrieves the currently selected item. |
java.lang.Object[] |
getSelectedObjects()
Returns an array containing the selected item. |
java.lang.Object |
getType()
Retrieves the type assigned to the combo box. |
boolean |
isEmptySelection()
Retrieves whether or not there is a selection. |
boolean |
isErrorState()
Retrieves whether or not the combo box is in an error state. |
boolean |
isModified()
Retrieves whether or not the combo box has been modified since its previous state. |
void |
keyPressed(java.awt.event.KeyEvent event)
Empty implementation of the KeyListener method. |
void |
keyReleased(java.awt.event.KeyEvent event)
Displays the popup selection window after the SPACE key has been pressed and released. |
void |
keyTyped(java.awt.event.KeyEvent event)
Empty implementation of the KeyListener method. |
void |
removeEmptySelection()
Removes the empty selection from the combo box. |
void |
resetModified()
Resets the modified state of the combo box to not modified. |
void |
setBackground(java.awt.Color color)
|
void |
setClusterName(java.lang.String clusterName)
Sets the cluster name of the widget. |
void |
setDefaultSize(int width,
int height,
int rows)
Sets the minimum and preferred width and height of the combo box as well as the number of rows to display in its popup window. |
void |
setEmptySelection()
Sets the current selection in the combo box to the empty selection. |
void |
setErrorState(boolean errorState)
Sets the error state of the combo box - changing the color of the background and foreground. |
void |
setFocusedState()
Sets the combo box to focused state. |
void |
setForeground(java.awt.Color color)
|
void |
setItems(java.util.Collection collection)
Assigns a series of objects in a collection to the combo box. |
void |
setItems(java.lang.Object[] array)
Assigns a series of objects in an array to the combo box. |
void |
setMinimumSize(int width,
int height)
Sets the minimum and preferred width and height of the combo box. |
void |
setMinimumWidth(int width)
Sets the minimum width of the combo box. |
void |
setRequired(boolean isRequired)
Sets whether or not a selection is required in the combo box. |
void |
setSelectedIndex(int index)
Sets the selected index in the combo box. |
void |
setSelectedItem(java.lang.Object object)
Sets the selected item in the combo box. |
void |
setType(java.lang.Object object)
Assigns a type to the combo box. |
Methods inherited from class javax.swing.JComboBox |
---|
actionPerformed, addActionListener, addItem, addItemListener, addPopupMenuListener, configureEditor, configurePropertiesFromAction, contentsChanged, createActionPropertyChangeListener, createDefaultKeySelectionManager, fireActionEvent, fireItemStateChanged, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getAction, getActionCommand, getActionListeners, getEditor, getItemCount, getItemListeners, getKeySelectionManager, getMaximumRowCount, getModel, getPopupMenuListeners, getPrototypeDisplayValue, getRenderer, getSelectedIndex, 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, setUI, showPopup, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 com.retek.commons.gui.core.WidgetInterface |
---|
getName, setName |
Constructor Detail |
public RComboBox()
Method Detail |
public void setMinimumWidth(int width)
width
- The minimum width in pixels to assign to the combo box.public void setMinimumSize(int width, int height)
width
- The width in pixels to assign to the combo box.height
- The height in pixels to assign to the combo box.public void setDefaultSize(int width, int height, int rows)
width
- The width in pixels to assign to the combo box.height
- The height in pixels to assign to the combo box.rows
- The number of rows to display in the popup window.public void setRequired(boolean isRequired)
isRequired
- True if a selection is required, false if not.public boolean getRequired()
public void setType(java.lang.Object object)
object
- An object to indicate the type of the combo box.public java.lang.Object getType()
public java.lang.String getSelectedDescription()
public java.lang.Object getSelectedItem()
public java.lang.Object getItemAt(int index)
index
- - an integer indicating the list position, where the first item starts at zero
public java.lang.Object[] getSelectedObjects()
getSelectedObjects
in interface java.awt.ItemSelectable
public void setItems(java.util.Collection collection)
NOTE!!!!!! This method will NOT (!!!!) trigger the notification of the item that was selected. Do not rely on the standard SWING notification from the combo box when you add items and the first in the list is selected.
collection
- A collection of objects.public void setItems(java.lang.Object[] array)
NOTE!!!!!! This method will NOT (!!!!) trigger the notification of the item that was selected. Do not rely on the standard SWING notification from the combo box when you add items and the first in the list is selected.
array
- An array of objects.public void setSelectedItem(java.lang.Object object)
object
- The object to select in the combo box.public void setSelectedIndex(int index)
index
- The index to select in the combo box.public void setEmptySelection()
public boolean isEmptySelection()
public void removeEmptySelection()
public void clear()
public void keyPressed(java.awt.event.KeyEvent event)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent event)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent event)
keyTyped
in interface java.awt.event.KeyListener
public void setClusterName(java.lang.String clusterName)
setClusterName
in interface WidgetInterface
clusterName
- The cluster name to assign to the widget.public java.lang.String getClusterName()
getClusterName
in interface WidgetInterface
public boolean isModified()
public void resetModified()
public void setBackground(java.awt.Color color)
in JComboBox.
public void setForeground(java.awt.Color color)
in JComboBox.
public boolean isErrorState()
isErrorState
in interface WidgetInterface
public void setFocusedState()
setFocusedState
in interface WidgetInterface
public void setErrorState(boolean errorState)
setErrorState
in interface WidgetInterface
errorState
- True if the combo box is in an error state, false if not.
/
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |