|
|||||||||||
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
planetj.gui.CMComboBoxJ
Common Swing JComboBox that provides I18N and business object support for loading the combo box with a vector of business objects.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComboBox |
javax.swing.JComboBox.KeySelectionManager |
Nested classes 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 | |
CMComboBoxJ()
Insert the method's description here. |
|
CMComboBoxJ(javax.swing.ComboBoxModel aModel)
CMComboBox constructor comment. |
|
CMComboBoxJ(java.lang.Object[] items)
CMComboBox constructor comment. |
|
CMComboBoxJ(java.util.Vector items)
CMComboBox constructor comment. |
Method Summary | |
void |
addBusinessObject(java.lang.Object obj)
Adds a business object into the business object vector Creation date: (8/8/00 12:11:03 PM) |
void |
addItem(java.lang.Object item)
Translate the items if it is a String and add it to the ComboBox. |
void |
addItemDirectly(java.lang.Object item)
Add an item to the ComboBox with NO translation! Record it as the translated and original! |
void |
blink(int times,
java.awt.Color blinkColor)
Makes the combo box blink |
boolean |
contains(java.lang.Object item)
Check to see if this combo box contains the parameter Creation date: (8/7/2003 8:58:48 PM) |
boolean |
getApplicable()
adds a bit more functionality than enabled alone |
java.util.List |
getBusinessObjects()
Return a Vector of businessObjects |
boolean |
getEnabled()
adds a bit more functionality than enabled alone |
boolean |
getForceUpperCase()
gets the upper case boolean value |
java.lang.String |
getGetterMethod()
Gets the getterMethod String. |
java.util.List |
getItems()
Gets the Items in a List of Strings that has been translated. |
java.util.List |
getOriginalStrings()
Return a List of Strings that are the pre-translated Strings displayed in this component. |
java.lang.Object |
getSelectedBusinessObject()
Return a businessObject that is being selected from the ComboBox Returns -1 if nothing was selected. |
java.lang.String |
getSelectedId()
Should use getSelectedOriginalString(). |
java.lang.String |
getSelectedOriginalString()
Return the original (pre - translation) string that is currently being selected. |
java.awt.Component |
getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object obj,
boolean isSelected,
boolean hasFocus,
int row,
int column)
This ComboBox can act as a TableCellRenderer, |
boolean |
isAllowDuplicates()
This will enforce whether this combo box allows duplicate entries This checks to see if one value equals another. |
boolean |
isAlphabeticalSortRequired()
isAlphabeticalSortRequired method this method returns whether or not the BusinessObjects should be sorted in alphabetical order |
boolean |
isNoneInList()
isNoneInList tells whether or not *NONE appears at the top of the list |
static void |
main(java.lang.String[] args)
main entrypoint - starts the part when it is run as an application |
void |
removeBusinessObject(java.lang.Object obj)
Removes a business object from the business object vector Creation date: (8/8/00 12:11:03 PM) |
void |
selectedItemChanged()
Need to override to trigger the "selectedBusinessObject" property change |
void |
setAllowDuplicates(boolean newAllowDuplicates)
This will enforce whether this combo box allows duplicate entries This checks to see if one value equals another. |
void |
setAlphabeticalSortRequired(boolean value)
setAlphabeticalSortRequired method sets whether or not the BusinessObjects should be sorted. |
void |
setApplicable(boolean e)
adds a bit more functionality than enabled alone |
void |
setBusinessObjects(java.util.List businessObjects)
Set a List of business objects into the JComboBox. |
void |
setEnabled(boolean e)
override the super method to do a bit more |
void |
setForceUpperCase(boolean uc)
Sets the upper case boolean |
void |
setGetterMethod(java.lang.String getterMethod)
Set a methodName to be used to query a business objects for a String that will be used as the items within a JComboBox. |
void |
setItems(java.util.List newItems)
Translate the Vector of Strings and then set the translated Strings in the component. |
void |
setItemsDirectly(java.util.List newTranslation)
Add a List of Strings to the ComboBox directly. |
void |
setNoneInList(boolean value)
setNoneInList sets whether or not *NONE is an option in the list |
void |
setSelectedBusinessObject(java.lang.Object selectedBusinessObject)
Sets the selected item and handles nulls too. |
void |
setSelectedId(java.lang.String selectedId)
Should use setSelectedOriginalString. |
void |
setSelectedOriginalString(java.lang.String originalString)
Set the comboBox's selected index to the position occupied by the originalString |
void |
setTranslation(java.util.List newTranslation)
Should use setItemsDirectly() instead of this method! Sets the Vector of Strings as the items to display in this component. |
Methods inherited from class javax.swing.JComboBox |
actionPerformed, addActionListener, addItemListener, addPopupMenuListener, configureEditor, contentsChanged, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getAction, getActionCommand, getActionListeners, getEditor, getItemAt, getItemCount, getItemListeners, getKeySelectionManager, getMaximumRowCount, getModel, getPopupMenuListeners, getPrototypeDisplayValue, getRenderer, getSelectedIndex, getSelectedItem, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, intervalAdded, intervalRemoved, isEditable, isLightWeightPopupEnabled, isPopupVisible, processKeyEvent, removeActionListener, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectWithKeyChar, setAction, setActionCommand, setEditable, setEditor, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setSelectedIndex, setSelectedItem, 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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, 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, 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, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, 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, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CMComboBoxJ()
public CMComboBoxJ(java.lang.Object[] items)
items
- java.lang.Object[]public CMComboBoxJ(java.util.Vector items)
items
- java.util.Vectorpublic CMComboBoxJ(javax.swing.ComboBoxModel aModel)
aModel
- javax.swing.ComboBoxModelMethod Detail |
public void addBusinessObject(java.lang.Object obj)
obj
- java.lang.Objectpublic final void addItem(java.lang.Object item)
public void addItemDirectly(java.lang.Object item)
public void blink(int times, java.awt.Color blinkColor)
public boolean contains(java.lang.Object item)
public boolean getApplicable()
public java.util.List getBusinessObjects()
public boolean getEnabled()
public boolean getForceUpperCase()
public java.lang.String getGetterMethod()
setGetterMethod(java.lang.String)
public java.util.List getItems()
public java.util.List getOriginalStrings()
public java.lang.Object getSelectedBusinessObject()
public java.lang.String getSelectedId()
public java.lang.String getSelectedOriginalString()
public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object obj, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent
in interface javax.swing.table.TableCellRenderer
public boolean isAllowDuplicates()
public boolean isAlphabeticalSortRequired()
public boolean isNoneInList()
public static void main(java.lang.String[] args)
args
- java.lang.String[]public void removeBusinessObject(java.lang.Object obj)
obj
- java.lang.Objectpublic void selectedItemChanged()
public void setAllowDuplicates(boolean newAllowDuplicates)
newAllowDuplicates
- booleanpublic void setAlphabeticalSortRequired(boolean value)
public void setApplicable(boolean e)
public final void setBusinessObjects(java.util.List businessObjects)
public void setEnabled(boolean e)
public void setForceUpperCase(boolean uc)
public void setGetterMethod(java.lang.String getterMethod)
public void setItems(java.util.List newItems)
public void setItemsDirectly(java.util.List newTranslation)
public void setNoneInList(boolean value)
value
- booleanpublic void setSelectedBusinessObject(java.lang.Object selectedBusinessObject)
public void setSelectedId(java.lang.String selectedId)
public void setSelectedOriginalString(java.lang.String originalString)
public void setTranslation(java.util.List newTranslation)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |