planetj.gui
Class CMLabelJ

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--planetj.gui.CMLabelJ
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants

public class CMLabelJ
extends JLabel

Provides I18N functionality.

See Also:
Serialized Form

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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CMLabelJ()
          CMLabelJ constructor comment.
CMLabelJ(Icon image)
          CMLabelJ constructor comment.
CMLabelJ(Icon image, int horizontalAlignment)
          CMLabelJ constructor comment.
CMLabelJ(String text)
          CMLabelJ constructor comment.
CMLabelJ(String text, Icon icon, int horizontalAlignment)
          CMLabelJ constructor comment.
CMLabelJ(String text, int horizontalAlignment)
          CMLabelJ constructor comment.
 
Method Summary
 String getLabel()
           
 String getTranslation()
          Gets the translated String.
 String getTranslationId()
          Gets the key of the translated String.
 boolean isBlank()
          Returns true if this Label is blank or contains no text.
static void main(String[] args)
          main entrypoint - starts the part when it is run as an application
 void setLabel(String key)
          Overrides the superclass to set the key for the translated String.
 void setText(String key)
          Overrides the superclass to set the key for the translated String.
 void setToolTipText(String toolTip)
          Sets the toolTipText property (java.lang.String) value.
 void setTranslation(String newTranslation)
          Sets the String without translating it.
 
Methods inherited from class javax.swing.JLabel
getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setUI, setVerticalAlignment, setVerticalTextPosition, 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, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, 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, 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

CMLabelJ

public CMLabelJ()
CMLabelJ constructor comment.


CMLabelJ

public CMLabelJ(String text)
CMLabelJ constructor comment.

Parameters:
text - java.lang.String

CMLabelJ

public CMLabelJ(String text,
                int horizontalAlignment)
CMLabelJ constructor comment.

Parameters:
text - java.lang.String
horizontalAlignment - int

CMLabelJ

public CMLabelJ(String text,
                Icon icon,
                int horizontalAlignment)
CMLabelJ constructor comment.

Parameters:
text - java.lang.String
icon - javax.swing.Icon
horizontalAlignment - int

CMLabelJ

public CMLabelJ(Icon image)
CMLabelJ constructor comment.

Parameters:
image - javax.swing.Icon

CMLabelJ

public CMLabelJ(Icon image,
                int horizontalAlignment)
CMLabelJ constructor comment.

Parameters:
image - javax.swing.Icon
horizontalAlignment - int
Method Detail

getLabel

public String getLabel()

getTranslation

public String getTranslation()
Gets the translated String.


getTranslationId

public String getTranslationId()
Gets the key of the translated String.


main

public static void main(String[] args)
main entrypoint - starts the part when it is run as an application

Parameters:
args - java.lang.String[]

setLabel

public void setLabel(String key)
Overrides the superclass to set the key for the translated String.


setText

public void setText(String key)
Overrides the superclass to set the key for the translated String.

Overrides:
setText in class JLabel

setToolTipText

public void setToolTipText(String toolTip)
Sets the toolTipText property (java.lang.String) value.

Overrides:
setToolTipText in class JComponent
Parameters:
toolTip - The new value for the property.
See Also:
JComponent.getToolTipText()

setTranslation

public void setTranslation(String newTranslation)
Sets the String without translating it.


isBlank

public boolean isBlank()
Returns true if this Label is blank or contains no text. This will return true if this TextField only contains spaces Creation date: (7/8/2003 2:37:18 PM)