Class StructuredTextSegmentListener

java.lang.Object
org.eclipse.jface.util.StructuredTextSegmentListener
All Implemented Interfaces:
EventListener, SegmentListener, SWTEventListener

public class StructuredTextSegmentListener extends Object implements SegmentListener
Segment listener that implements bidi-structured text reordering. The reordering is specified by the structured text type that is passed to the constructor.

Note: This class only works if the org.eclipse.equinox.bidi bundle is on the classpath!

Since:
3.9
Restriction:
This class is not intended to be subclassed by clients.
  • Constructor Details

    • StructuredTextSegmentListener

      public StructuredTextSegmentListener(String textType)
      Creates a new structured text segment listener.
      Parameters:
      textType - the structured text type. Possible values are the structured text type ids supported by StructuredTextTypeHandlerFactory.getHandler(String).
      Throws:
      IllegalArgumentException - if textType is not a known type identifier
    • StructuredTextSegmentListener

      public StructuredTextSegmentListener(StructuredTextTypeHandler textTypeHandler)
      Creates a new structured text segment listener.
      Parameters:
      textTypeHandler - the structured text type handler
      Throws:
      IllegalArgumentException - if the handler is null
  • Method Details

    • getSegments

      public void getSegments(SegmentEvent event)
      Description copied from interface: SegmentListener
      This method is called when text content is being modified.

      The following event fields are used:

      • event.lineText text content (input)
      • event.segments text offsets for segment characters (output)
      • event.segmentsChars characters that should be inserted (output, optional)
      Specified by:
      getSegments in interface SegmentListener
      Parameters:
      event - the given event
      See Also: