Class 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 Detail

      • 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 Detail

      • 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:
        SegmentEvent