org.apache.pivot.wtk
Class Label

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.apache.pivot.wtk.Label
All Implemented Interfaces:
ConstrainedVisual, Visual
Direct Known Subclasses:
NodeRenderer, SpinnerItemRenderer, TableViewCellRenderer

public class Label
extends Component

Component that displays a string of text.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Constructor Summary
Label()
           
Label(String text)
           
 
Method Summary
 void clear()
          Clears any bound values in the component.
 ListenerList<LabelListener> getLabelListeners()
           
 String getText()
           
 String getTextKey()
          Returns the label's text key.
 void load(Dictionary<String,?> context)
          Copies bound values from the bind context to the component.
 void setText(String text)
           
 void setTextKey(String textKey)
          Sets the label's text key.
 void store(Dictionary<String,?> context)
          Copies bound values from the component to the bind context.
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, getAttributes, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getLocation, getMaximumPreferredHeight, getMaximumPreferredWidth, getMenuHandler, getMinimumPreferredHeight, getMinimumPreferredWidth, getParent, getPreferredHeight, getPreferredHeight, getPreferredHeightLimits, getPreferredSize, getPreferredWidth, getPreferredWidth, getPreferredWidthLimits, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installThemeSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, layout, load, mapPointFromAncestor, mapPointToAncestor, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, paint, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttributes, setAutomationID, setCursor, setCursor, setDragSource, setDropTarget, setEnabled, setHeight, setLocation, setLocation, setMaximumPreferredHeight, setMaximumPreferredWidth, setMenuHandler, setMinimumPreferredHeight, setMinimumPreferredWidth, setParent, setPreferredHeight, setPreferredHeightLimits, setPreferredHeightLimits, setPreferredSize, setPreferredSize, setPreferredWidth, setPreferredWidthLimits, setPreferredWidthLimits, setSize, setSize, setSkin, setStyles, setStyles, setStyles, setTooltipText, setVisible, setWidth, setX, setY, store, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Label

public Label()

Label

public Label(String text)
Method Detail

getText

public String getText()

setText

public void setText(String text)

getTextKey

public String getTextKey()
Returns the label's text key.

Returns:
The text key, or null if no text key is set.

setTextKey

public void setTextKey(String textKey)
Sets the label's text key.

Parameters:
textKey - The text key, or null to clear the binding.

load

public void load(Dictionary<String,?> context)
Description copied from class: Component
Copies bound values from the bind context to the component. This functionality must be provided by the subclass; the base implementation is a no-op.

Overrides:
load in class Component

store

public void store(Dictionary<String,?> context)
Description copied from class: Component
Copies bound values from the component to the bind context. This functionality must be provided by the subclass; the base implementation is a no-op.

Overrides:
store in class Component

clear

public void clear()
Description copied from class: Component
Clears any bound values in the component.

Overrides:
clear in class Component

getLabelListeners

public ListenerList<LabelListener> getLabelListeners()