JIDE 3.5.15

com.jidesoft.status
Class LabelStatusBarItem

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.LabelStatusBarItem
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
AbstractCodeEditorStatusBarItem, OvrInsStatusBarItem, ResizeStatusBarItem, TimeStatusBarItem

public class LabelStatusBarItem
extends StatusBarItem

A status bar item with a JLabel.

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
LabelStatusBarItem()
           
LabelStatusBarItem(String name)
          Creates a label status bar item with name.
 
Method Summary
 void addMouseListener(MouseListener listener)
          Adds the specified mouse listener to receive mouse events from this component.
protected  void configureLabel(JLabel label)
          Configures the label.
protected  JLabel createLabel()
          Creates the label component used by LabelStatusBarItem.
 Component getComponent()
          Gets the actual component.
 int getHorizontalAlignment()
          Gets the text horizontal alignment.
 Icon getIcon()
          Gets icon displayed on the label.
 String getItemName()
          Gets item name.
 Dimension getPreferredSize()
          If the preferredSize has been set to a non-null value just returns it.
 String getText()
          Gets text displayed on the label.
 Point getToolTipLocation(MouseEvent event)
           
 String getToolTipText()
          Gets tooltip displayed on the label.
 void setAlignment(int alignment)
          Sets the alignment.
 void setEnabled(boolean enabled)
          Enable or disable the StatusBar Item.
 void setHorizontalAlignment(int alignment)
          Sets the text horizontal alignment.
 void setIcon(Icon icon)
          Sets icon to be displayed on the label.
 void setText(String text)
          Sets text to be displayed on the label.
 void setToolTip(String tooltip)
          Deprecated. replaced it with setToolTipText.
 void setToolTipText(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, 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

LabelStatusBarItem

public LabelStatusBarItem()

LabelStatusBarItem

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

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

createLabel

protected JLabel createLabel()
Creates the label component used by LabelStatusBarItem.

Returns:
the label.

configureLabel

protected void configureLabel(JLabel label)
Configures the label.


setText

public void setText(String text)
Sets text to be displayed on the label.

Parameters:
text -

getText

public String getText()
Gets text displayed on the label.

Returns:
the text on the label

setToolTip

@Deprecated
public void setToolTip(String tooltip)
Deprecated. replaced it with setToolTipText.


setToolTipText

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

Overrides:
setToolTipText in class JComponent
Parameters:
tooltip - the new tooltip.

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

setIcon

public void setIcon(Icon icon)
Sets icon to be displayed on the label.

Parameters:
icon -

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the text horizontal alignment. The valid values for alignment are defined in JLabel.setHorizontalAlignment(int).

Parameters:
alignment -

getHorizontalAlignment

public int getHorizontalAlignment()
Gets the text horizontal alignment.

Returns:
alignment

getIcon

public Icon getIcon()
Gets icon displayed on the label.

Returns:
the icon on the label

setEnabled

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

Overrides:
setEnabled in class JComponent
Parameters:
enabled -

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

setAlignment

public void setAlignment(int alignment)
Sets the alignment.

Parameters:
alignment -

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