Class Label


  extended by Object
      extended by Component
          extended by Label
Direct Known Subclasses:
Choice, MenuItem, Ticker

public class Label
extends Component

Label component shows a single line of text. If the text does not fit the assigned area of Label it is cropped and two dots ("..") are appended to end of cropped text.

To access the text after creation use Component.getText() and Component.setText(String) and icon with Component.getImage() and Component.setImage(Image).

Label has following special style customizations:


Constructor Summary
Label(Style style, String label)
          Constructs a new Label component.
 
Method Summary
 
Methods inherited from class Component
add, appendText, clear, find, first, get, getAction, getData, getElement, getFlags, getImage, getLocation, getParent, getShell, getSize, getStyle, getText, getViewPort, hasLinefeed, indexOf, insert, isFocusable, isShown, isVisible, isWrapping, last, operator_get, operator_set, remove, remove, repaint, set, setAction, setData, setElement, setFlags, setImage, setLocation, setPreferredHeight, setPreferredSize, setPreferredWidth, setStyle, setText, size
 
Methods inherited from class Object
toString, equals, hashCode
 
Methods inherited from
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Label

public Label(Style style,
             String label)
Constructs a new Label component.

Parameters:
style - Style to use
label - Text to use