Standard Widget Toolkit (SWT) Standalone Example - Text Editor

Introduction

This example demonstrates how to use the StyledText widget to implement a text editor with formatting support.

Running the example

If the Example Launcher is installed, select the Text Editor item from the Standalone category and click Run.  Otherwise, install and run the example manually as per the Standalone Examples Manual Setup instructions.  The executable class is org.eclipse.swt.examples.texteditor.TextEditor.

Details

The example has a typical text editor interface.  The File menu contains Cut, Copy, Paste and Set Font items and the toolbar provides a bold text toggle, three colour tools that operate on the current selection, and a reset to defaults button that also operates on the current selection.

Copyright IBM Corporation 2000, 2001.  All Rights Reserved.