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:
SpinnerItemRenderer, TableViewCellRenderer

public class Label
extends Component

Component that displays a string of text.


Nested Class Summary
static interface Label.TextBindMapping
          Translates between text and context data during data binding.
 
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<LabelBindingListener> getLabelBindingListeners()
           
 ListenerList<LabelListener> getLabelListeners()
           
 String getText()
           
 Label.TextBindMapping getTextBindMapping()
           
 BindType getTextBindType()
           
 String getTextKey()
          Returns the label's text key.
 void load(Object context)
          Copies bound values from the bind context to the component.
 void setText(String text)
           
 void setTextBindMapping(Label.TextBindMapping textBindMapping)
           
 void setTextBindType(BindType textBindType)
           
 void setTextKey(String textKey)
          Sets the label's text key.
 void store(Object context)
          Copies bound values from the component to the bind context.
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, contains, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getSize, getSkin, getStyles, getTooltipDelay, getTooltipText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, installSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, layout, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, paint, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setCursor, setDragSource, setDropTarget, setEnabled, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setParent, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setVisible, setWidth, setWidthLimits, setWidthLimits, setX, setY, 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.

getTextBindType

public BindType getTextBindType()

setTextBindType

public void setTextBindType(BindType textBindType)

getTextBindMapping

public Label.TextBindMapping getTextBindMapping()

setTextBindMapping

public void setTextBindMapping(Label.TextBindMapping textBindMapping)

load

public void load(Object 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(Object 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()

getLabelBindingListeners

public ListenerList<LabelBindingListener> getLabelBindingListeners()