Package org.eclipse.jface.util
Class StructuredTextSegmentListener
java.lang.Object
org.eclipse.jface.util.StructuredTextSegmentListener
- All Implemented Interfaces:
EventListener
,SegmentListener
,SWTEventListener
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
-
Constructor Summary
ConstructorsConstructorDescriptionStructuredTextSegmentListener
(String textType) Creates a new structured text segment listener.StructuredTextSegmentListener
(StructuredTextTypeHandler textTypeHandler) Creates a new structured text segment listener. -
Method Summary
Modifier and TypeMethodDescriptionvoid
getSegments
(SegmentEvent event) This method is called when text content is being modified.
-
Constructor Details
-
StructuredTextSegmentListener
Creates a new structured text segment listener.- Parameters:
textType
- the structured text type. Possible values are the structured text type ids supported byStructuredTextTypeHandlerFactory.getHandler(String)
.- Throws:
IllegalArgumentException
- iftextType
is not a known type identifier
-
StructuredTextSegmentListener
Creates a new structured text segment listener.- Parameters:
textTypeHandler
- the structured text type handler- Throws:
IllegalArgumentException
- if thehandler
isnull
-
-
Method Details
-
getSegments
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 interfaceSegmentListener
- Parameters:
event
- the given event- See Also:
-