public class JComboBoxWithImageIconItems extends JComboBox implements Serializable
JComboBox.AccessibleJComboBox, JComboBox.KeySelectionManager
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ROW_COUNT |
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
JComboBoxWithImageIconItems()
Default constructor
|
JComboBoxWithImageIconItems(ComboBoxImageIconModel aModel)
Default constructor with a 'ComboBoxImageIconModel' as parameter
|
JComboBoxWithImageIconItems(Object[] items)
Default constructor with an array of 'ImageIconItemInfo' as parameters
|
JComboBoxWithImageIconItems(Vector items)
Default constructor with a Vector of 'ImageIconItemInfo' as parameter
|
Modifier and Type | Method and Description |
---|---|
void |
addImageIconItem(ImageIconItemInfo imageIconItem)
Adds an image icon URL path, image icon loaded (or null if not), and tool tip text (tool tip text could be "")
|
void |
addImageIconItem(String imageIconPath,
ImageIcon imageIcon,
String imageIconToolTipText,
Object item_Value)
Adds an image icon URL path, image icon loaded (or null if not), tool tip text (tool tip text could be "") and if it's neccessary (it's optional)
another associated value to this item (if there is no associated value, the 'item_Value' param should be null)
|
void |
addImageIconItems(ImageIconItemInfo[] imageIconItems)
Sets some image icons that their information to load is stored in an array of ImageIconItemInfo
|
void |
addImageIconItems(Vector imageIconItems)
Sets some image icons that their information to load is stored in a Vector of ImageIconItemInfo
|
Dimension |
getJComboBoxRendererPreferredSize() |
boolean |
getShowImageIconAndTextProperty() |
void |
removeAllImageIconItems()
Removes all image icons
|
void |
removeImageIconItem(ImageIconItemInfo imageIconItem)
Removes an image icon URL path, tool tip text (tool tip text could be "") and the item value
If no item matches, does nothing
(The image icon parameter is ignored)
|
void |
removeImageIconItem(String imageIconPath,
String imageIconToolTipText,
String item_Value)
Adds an image icon URL path, tool tip text (tool tip text could be "") and the item value
If no item matches, does nothing
(The image icon parameter is ignored)
|
void |
removeImageIconItems(ImageIconItemInfo[] imageIconItems)
Removes some image icons that their path, tool tip text and item value are stored in an array
If no item matches, does nothing
(The image icon parameter is ignored)
|
void |
removeImageIconItems(Vector imageIconItems)
Removes some image icons that their paths, tool tip text and item value are stored in a Vector
(The image icon parameter is ignored)
|
void |
setJComboBoxRendererPreferredSize(Dimension d) |
void |
setShowImageIconAndTextProperty(boolean b) |
actionPerformed, actionPropertyChanged, addActionListener, addItem, addItemListener, addPopupMenuListener, configureEditor, 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
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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
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, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
public static final int DEFAULT_ROW_COUNT
public JComboBoxWithImageIconItems()
public JComboBoxWithImageIconItems(ComboBoxImageIconModel aModel)
aModel
- org.gvsig.gui.beans.swing.jComboBoxWithImageIconItems.JComboBoxWithImageIconItems.ComboBoxImageIconModelpublic JComboBoxWithImageIconItems(Object[] items)
items
- Each item must be an 'ImageIconItemInfo' objectpublic JComboBoxWithImageIconItems(Vector items)
items
- Each item must be an 'ImageIconItemInfo' objectpublic void addImageIconItem(String imageIconPath, ImageIcon imageIcon, String imageIconToolTipText, Object item_Value)
imageIconPath
- A pathimageIcon
- An image icon loaded or null if haven't been loadedimageIconToolTipText
- Textitem_Value
- Another extra value associated to the item added (null if no extra value)public void addImageIconItem(ImageIconItemInfo imageIconItem)
imageIconItem
- Information for load an image icon and set its tool tip textpublic void removeImageIconItem(String imageIconPath, String imageIconToolTipText, String item_Value)
imageIconPath
- A pathimageIconToolTipText
- Textitem_Value
- An extra valuepublic void removeImageIconItem(ImageIconItemInfo imageIconItem)
imageIconPath
- Information for remove the itempublic void removeAllImageIconItems()
public void addImageIconItems(ImageIconItemInfo[] imageIconItems)
imagePaths
- An array of ImageIconItemInfo with the URL path, image icon loaded (or null if not), and tool tip text to each imagepublic void addImageIconItems(Vector imageIconItems)
imagePaths
- A Vector of ImageIconItemInfo with the URL path, image icon loaded (or null if not), and tool tip text to each imagepublic void removeImageIconItems(ImageIconItemInfo[] imageIconItems)
imageIconPaths
- An array with the ImageIconItemInfopublic void removeImageIconItems(Vector imageIconItems)
imageIconPaths
- A Vector with the ImageIconItemInfopublic void setShowImageIconAndTextProperty(boolean b)
public boolean getShowImageIconAndTextProperty()
public void setJComboBoxRendererPreferredSize(Dimension d)
ComboBoxRenderer#setPreferredSize(Dimension)
public Dimension getJComboBoxRendererPreferredSize()
ComboBoxRenderer#getPreferredSize()