Eclipse Draw2d
2.1

org.eclipse.draw2d.widgets
Class MultiLineLabel

java.lang.Object
  |
  +--org.eclipse.swt.widgets.Widget
        |
        +--org.eclipse.swt.widgets.Control
              |
              +--org.eclipse.swt.widgets.Scrollable
                    |
                    +--org.eclipse.swt.widgets.Composite
                          |
                          +--org.eclipse.swt.widgets.Canvas
                                |
                                +--org.eclipse.draw2d.FigureCanvas
                                      |
                                      +--org.eclipse.draw2d.widgets.MultiLineLabel
All Implemented Interfaces:
Drawable

public final class MultiLineLabel
extends FigureCanvas

A widget for displaying a multi-line string. The label will have a vertical or horizontal scrollbar when needed. Unlike the platform Label, this label is focusable and accessible to screen-readers.


Field Summary
 
Fields inherited from class org.eclipse.draw2d.FigureCanvas
ALWAYS, AUTOMATIC, NEVER
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
MultiLineLabel(Composite parent)
          Constructs a new MultiLineLabel with the given parent.
 
Method Summary
 String getText()
          Returns the text in this label.
 void setFont(Font font)
           
 void setText(String text)
          Sets the text for this label.
 
Methods inherited from class org.eclipse.draw2d.FigureCanvas
computeSize, getContents, getHorizontalScrollBarVisibility, getLightweightSystem, getVerticalScrollBarVisibility, getViewport, scrollSmoothTo, scrollTo, scrollToX, scrollToY, setContents, setHorizontalScrollBarVisibility, setScrollBarVisibility, setVerticalScrollBarVisibility, setViewport
 
Methods inherited from class org.eclipse.swt.widgets.Canvas
getCaret, scroll, setCaret
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getDisplay, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isDisposed, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getStyle, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiLineLabel

public MultiLineLabel(Composite parent)
Constructs a new MultiLineLabel with the given parent.

Parameters:
parent - the parent
Method Detail

getText

public String getText()
Returns the text in this label.

Returns:
the text

setFont

public void setFont(Font font)
Overrides:
setFont in class Canvas
See Also:
Canvas.setFont(org.eclipse.swt.graphics.Font)

setText

public void setText(String text)
Sets the text for this label.

Parameters:
text - the new text

Eclipse Draw2d
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.