Example usage for org.eclipse.swt.custom StyledText getWordWrap

List of usage examples for org.eclipse.swt.custom StyledText getWordWrap

Introduction

In this page you can find the example usage for org.eclipse.swt.custom StyledText getWordWrap.

Prototype

public boolean getWordWrap() 

Source Link

Document

Returns whether the widget wraps lines.

Usage

From source file:StyledTextWordWrap.java

public static void main(String[] args) {
    final Display display = new Display();
    final Shell shell = new Shell(display);

    StyledText text1 = new StyledText(shell, SWT.V_SCROLL | SWT.BORDER);

    text1.setWordWrap(!text1.getWordWrap());

    text1.setBounds(10, 10, 100, 100);/*from ww  w.j  a  v  a 2s.c om*/
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) {
            display.sleep();
        }
    }
    display.dispose();

}