Class DtLabel

  • All Implemented Interfaces:
    org.eclipse.swt.graphics.Drawable

    public class DtLabel
    extends org.eclipse.swt.custom.CLabel
    Special version of CLabel that trims its text at the end, not at the middle as original CLabel.
    • Field Summary

      • Fields inherited from class org.eclipse.swt.widgets.Control

        handle
    • Constructor Summary

      Constructors 
      Constructor Description
      DtLabel​(org.eclipse.swt.widgets.Composite parent, int style)
      Instantiates a new DT label.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static DtLabel createAndAdapt​(org.eclipse.ui.forms.widgets.FormToolkit toolkit, org.eclipse.swt.widgets.Composite parent, String text, int style)
      Creates DtLabel instance, adapted to selected toolkit.
      protected String shortenText​(org.eclipse.swt.graphics.GC gc, String text, int width)  
      • Methods inherited from class org.eclipse.swt.custom.CLabel

        computeSize, getAlignment, getBottomMargin, getImage, getLeftMargin, getRightMargin, getStyle, getText, getToolTipText, getTopMargin, setAlignment, setBackground, setBackground, setBackground, setBackground, setBottomMargin, setFont, setImage, setLeftMargin, setMargins, setRightMargin, setText, setToolTipText, setTopMargin
      • Methods inherited from class org.eclipse.swt.widgets.Canvas

        drawBackground, getCaret, getIME, scroll, setCaret, setIME
      • Methods inherited from class org.eclipse.swt.widgets.Composite

        changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
      • Methods inherited from class org.eclipse.swt.widgets.Scrollable

        computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
      • Methods inherited from class org.eclipse.swt.widgets.Control

        addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
      • Methods inherited from class org.eclipse.swt.widgets.Widget

        addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
      • Methods inherited from interface org.eclipse.swt.graphics.Drawable

        isAutoScalable
    • Constructor Detail

      • DtLabel

        public DtLabel​(org.eclipse.swt.widgets.Composite parent,
                       int style)
        Instantiates a new DT label.
        Parameters:
        parent - the parent.
        style - the style.
    • Method Detail

      • createAndAdapt

        public static DtLabel createAndAdapt​(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                                             org.eclipse.swt.widgets.Composite parent,
                                             String text,
                                             int style)
        Creates DtLabel instance, adapted to selected toolkit.
        Parameters:
        toolkit - the toolkit
        parent - the parent composite
        text - the label text
        style - the style
        Returns:
        the label instance
      • shortenText

        protected String shortenText​(org.eclipse.swt.graphics.GC gc,
                                     String text,
                                     int width)
        Overrides:
        shortenText in class org.eclipse.swt.custom.CLabel