com.retek.commons.gui.widget
Class RLabel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JLabel
                  extended bycom.retek.commons.gui.widget.RLabel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.swing.SwingConstants, WidgetInterface

public class RLabel
extends javax.swing.JLabel
implements WidgetInterface

This class sublcasses the standard JLabel class in the Swing package to provide custom functionality for the Rcom client application.

Retek Inc. Copyright (c) 2002

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JLabel
javax.swing.JLabel.AccessibleJLabel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int CURRENCY
           
static int NEGATIVE_CURRENCY
           
static int NUMBER
           
static int TEXT
           
 
Fields inherited from class javax.swing.JLabel
labelFor
 
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 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
RLabel()
          Returns new RLabel object.
RLabel(java.lang.String text)
          Returns new RLabel object with display text assigned.
RLabel(java.lang.String text, boolean useSuffix)
          Returns new RetekLabel object with text.
 
Method Summary
 void clear()
          Clears the text of the label.
 java.lang.String getClusterName()
          Retrieves the cluster name of the widget.
 boolean isErrorState()
          Retrieves whether or not the label is in an error state.
 void setBackground(java.awt.Color color)
           
 void setClusterName(java.lang.String clusterName)
          Sets the cluster name of the widget.
 void setErrorState(boolean errorState)
          Sets the error state of the label - changing the color of the background and foreground.
 void setFocusedState()
          Empty implementation to satisfy the widgetinterface method.
 void setFontStyle(java.awt.Color color, int style, float size)
          Sets the font color, style and size for the label.
 void setFontStyle(int style)
          Sets the font style for the label.
 void setFontStyle(int style, float size)
          Sets the font style and size for the label.
 void setForeground(java.awt.Color color)
           
 void setIcon(java.lang.String filename, java.lang.String text)
          Attempts to load an icon from a filename and places it in the button.
 void setLockedWidth(int width)
          Sets the minimum, maximum and preferred width of the label.
 void setMinimumSize(int width, int height)
          Sets the minimum and preferred width and height of the button.
 void setMinimumWidth(int width)
          Sets the minimum and preferred width of the label.
 void setText(java.lang.String text)
          Sets the text to display within the label.
 void setText(java.lang.String text, boolean translate)
          Sets the text to display.
 void setType(int type)
          Sets the label type (valid options are RLabel.TEXT, RLabel.NUMBER, RLabel.CURRENCY, and RLabel.NEGATIVE_CURRENCY).
 
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, 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, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, 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, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.retek.commons.gui.core.WidgetInterface
getName, setName
 

Field Detail

TEXT

public static final int TEXT
See Also:
Constant Field Values

CURRENCY

public static final int CURRENCY
See Also:
Constant Field Values

NEGATIVE_CURRENCY

public static final int NEGATIVE_CURRENCY
See Also:
Constant Field Values

NUMBER

public static final int NUMBER
See Also:
Constant Field Values
Constructor Detail

RLabel

public RLabel()
Returns new RLabel object.


RLabel

public RLabel(java.lang.String text)
Returns new RLabel object with display text assigned.

Parameters:
text - The display text to assign to the label. /

RLabel

public RLabel(java.lang.String text,
              boolean useSuffix)
Returns new RetekLabel object with text.

Parameters:
text - The display text to assign to the label.
useSuffix - True is the label should display the suffix, false if not. /
Method Detail

setLockedWidth

public void setLockedWidth(int width)
Sets the minimum, maximum and preferred width of the label.

Parameters:
width - The width of the label in pixels.

setMinimumWidth

public void setMinimumWidth(int width)
Sets the minimum and preferred width of the label.

Parameters:
width - The width of the label in pixels.

setMinimumSize

public void setMinimumSize(int width,
                           int height)
Sets the minimum and preferred width and height of the button.

Parameters:
width - The width of the button in pixels.
height - The height of the button in pixels.

setType

public void setType(int type)
Sets the label type (valid options are RLabel.TEXT, RLabel.NUMBER, RLabel.CURRENCY, and RLabel.NEGATIVE_CURRENCY).

Parameters:
type - The label type.

setText

public void setText(java.lang.String text)
Sets the text to display within the label. Overrides the superclass method to supply language translation to the text string.

Parameters:
text - The text to display within the label. /

setText

public void setText(java.lang.String text,
                    boolean translate)
Sets the text to display.

Parameters:
text - The text to display with the label.
translate - True if the text should be translated, false if not. /

clear

public void clear()
Clears the text of the label. /


setIcon

public void setIcon(java.lang.String filename,
                    java.lang.String text)
Attempts to load an icon from a filename and places it in the button.

Parameters:
filename - The filename of the icon to place in the button.
text - The replacement text if the icon could not be found.

setFontStyle

public void setFontStyle(int style)
Sets the font style for the label.

Parameters:
style - The style to assign to the font. /

setFontStyle

public void setFontStyle(int style,
                         float size)
Sets the font style and size for the label.

Parameters:
style - The style to assign to the font.
size - The size to assign to the font. /

setFontStyle

public void setFontStyle(java.awt.Color color,
                         int style,
                         float size)
Sets the font color, style and size for the label.

Parameters:
color - The color to assign to the foreground of the label.
style - The style to assign to the font.
size - The size to assign to the font. /

setClusterName

public void setClusterName(java.lang.String clusterName)
Sets the cluster name of the widget. A cluster name associates a group of widgets.

Specified by:
setClusterName in interface WidgetInterface
Parameters:
clusterName - The cluster name to assign to the widget.

getClusterName

public java.lang.String getClusterName()
Retrieves the cluster name of the widget.

Specified by:
getClusterName in interface WidgetInterface

setBackground

public void setBackground(java.awt.Color color)
See Also:
in JLabel.

setForeground

public void setForeground(java.awt.Color color)
See Also:
in JLabel.

setFocusedState

public void setFocusedState()
Empty implementation to satisfy the widgetinterface method.

Specified by:
setFocusedState in interface WidgetInterface

isErrorState

public boolean isErrorState()
Retrieves whether or not the label is in an error state.

Specified by:
isErrorState in interface WidgetInterface
Returns:
True if the label is in an error state, false if not

setErrorState

public void setErrorState(boolean errorState)
Sets the error state of the label - changing the color of the background and foreground.

Specified by:
setErrorState in interface WidgetInterface
Parameters:
errorState - True if the label is in an error state, false if not. /


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28