Class NonWideningText

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

    public class NonWideningText
    extends org.eclipse.swt.widgets.Text
    A Text subclass that changes its preferred size behavior such that it will not prefer to be large enough to contain the longest single line of the text. This enables the embedding containers' layout provider to actually clamp down on the final size of this widget, which is intended to be used with line wrapping.
    Author:
    Rene Schneider - initial API and implementation
    • Field Summary

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

        DELIMITER, LIMIT
      • Fields inherited from class org.eclipse.swt.widgets.Control

        handle
    • Constructor Summary

      Constructors 
      Constructor Description
      NonWideningText​(org.eclipse.swt.widgets.Composite aParent, int aStyle)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkSubclass()  
      org.eclipse.swt.graphics.Point computeSize​(int aWidthHint, int aHeightHint, boolean aChangedFlag)  
      • Methods inherited from class org.eclipse.swt.widgets.Text

        addModifyListener, addSegmentListener, addSelectionListener, addVerifyListener, append, clearSelection, copy, cut, getCaretLineNumber, getCaretLocation, getCaretPosition, getCharCount, getDoubleClickEnabled, getEchoChar, getEditable, getLineCount, getLineDelimiter, getLineHeight, getMessage, getOrientation, getSelection, getSelectionCount, getSelectionText, getTabs, getText, getText, getTextChars, getTextLimit, getTopIndex, getTopPixel, insert, paste, removeModifyListener, removeSegmentListener, removeSelectionListener, removeVerifyListener, selectAll, setDoubleClickEnabled, setEchoChar, setEditable, setFont, setMessage, setOrientation, setRedraw, setSelection, setSelection, setSelection, setTabs, setText, setTextChars, setTextLimit, setTopIndex, showSelection
      • 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, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, 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, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFocus, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRegion, setSize, setSize, setTextDirection, setToolTipText, 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, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.swt.graphics.Drawable

        isAutoScalable
    • Constructor Detail

      • NonWideningText

        public NonWideningText​(org.eclipse.swt.widgets.Composite aParent,
                               int aStyle)
        Constructor.
        Parameters:
        aParent - the parent
        aStyle - the style
    • Method Detail

      • computeSize

        public org.eclipse.swt.graphics.Point computeSize​(int aWidthHint,
                                                          int aHeightHint,
                                                          boolean aChangedFlag)
        Overrides:
        computeSize in class org.eclipse.swt.widgets.Control
      • checkSubclass

        protected void checkSubclass()
        Overrides:
        checkSubclass in class org.eclipse.swt.widgets.Widget