JIDE 3.5.15

com.jidesoft.status
Class ComboBoxStatusBarItem

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 com.jidesoft.swing.NullPanel
                      extended by com.jidesoft.status.StatusBarItem
                          extended by com.jidesoft.status.ComboBoxStatusBarItem
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ComboBoxStatusBarItem
extends StatusBarItem

A status bar item with a JComboBox.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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
ComboBoxStatusBarItem()
           
ComboBoxStatusBarItem(String name)
          Creates a label status bar item with name.
 
Method Summary
 void addItem(Object item)
          Adds the item to the combobox.
 void addMouseListener(MouseListener listener)
          Adds the specified mouse listener to receive mouse events from this component.
protected  void configureComboBox(JComboBox comboBox)
          Configures the combo box.
protected  JComboBox createComboBox()
          Creates the label component used by LabelStatusBarItem.
 Component getComponent()
          Gets the actual component.
 String getItemName()
          Gets item name.
 Dimension getPreferredSize()
          If the preferredSize has been set to a non-null value just returns it.
 int getSelectedIndex()
          Get the current selected index on the combo box.
 Object getSelectedItem()
          Gets text displayed on the label.
 Point getToolTipLocation(MouseEvent event)
           
 String getToolTipText()
          Gets tooltip displayed on the label.
 void removeItem(Object item)
          Removes the item from the combobox.
 void setEnabled(boolean enabled)
          Enable or disable the StatusBar Item.
 void setSelectedIndex(int index)
          Set the index to be displayed on the combo box.
 void setSelectedItem(Object item)
          Sets the item to be displayed on the combo box.
 void setToolTip(String tooltip)
          Sets tooltip to be displayed on the label.
 
Methods inherited from class com.jidesoft.status.StatusBarItem
getPreferredWidth, setPreferredWidth, updateUI
 
Methods inherited from class com.jidesoft.swing.NullPanel
setBackground, setFont, setForeground
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
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, 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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, 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, 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
 

Constructor Detail

ComboBoxStatusBarItem

public ComboBoxStatusBarItem()

ComboBoxStatusBarItem

public ComboBoxStatusBarItem(String name)
Creates a label status bar item with name.

Parameters:
name - name of the status bar item
Method Detail

createComboBox

protected JComboBox createComboBox()
Creates the label component used by LabelStatusBarItem.

Returns:
the label.

configureComboBox

protected void configureComboBox(JComboBox comboBox)
Configures the combo box.

Parameters:
comboBox - the combo box

setSelectedItem

public void setSelectedItem(Object item)
Sets the item to be displayed on the combo box.

Parameters:
item - the item to be selected.

getSelectedItem

public Object getSelectedItem()
Gets text displayed on the label.

Returns:
the text on the label

setSelectedIndex

public void setSelectedIndex(int index)
Set the index to be displayed on the combo box.

Parameters:
index - the index of the item

getSelectedIndex

public int getSelectedIndex()
Get the current selected index on the combo box.

Returns:
the selected index.

addItem

public void addItem(Object item)
Adds the item to the combobox.

Parameters:
item - the item to be added.

removeItem

public void removeItem(Object item)
Removes the item from the combobox.

Parameters:
item - the item to be removed.

setToolTip

public void setToolTip(String tooltip)
Sets tooltip to be displayed on the label.

Parameters:
tooltip - the tooltip string

getToolTipText

public String getToolTipText()
Gets tooltip displayed on the label.

Overrides:
getToolTipText in class JComponent
Returns:
the tooltip on the label

getToolTipLocation

public Point getToolTipLocation(MouseEvent event)
Overrides:
getToolTipLocation in class JComponent

setEnabled

public void setEnabled(boolean enabled)
Enable or disable the StatusBar Item.

Overrides:
setEnabled in class JComponent
Parameters:
enabled - the flag

addMouseListener

public void addMouseListener(MouseListener listener)
Adds the specified mouse listener to receive mouse events from this component. If listener l is null, no exception is thrown and no action is performed.

Overrides:
addMouseListener in class Component
Parameters:
listener - the mouse listener

getComponent

public Component getComponent()
Gets the actual component.

Returns:
the actual component. In this case, it's a label

getPreferredSize

public Dimension getPreferredSize()
If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize method returns a non null value then return that; otherwise defer to the component's layout manager.

Overrides:
getPreferredSize in class StatusBarItem
Returns:
the value of the preferredSize property
See Also:
JComponent.setPreferredSize(java.awt.Dimension), ComponentUI

getItemName

public String getItemName()
Description copied from class: StatusBarItem
Gets item name.

Specified by:
getItemName in class StatusBarItem
Returns:
item name

JIDE 3.5.15