Examples of BidiSegmentListener


Examples of org.eclipse.swt.custom.BidiSegmentListener

    private Color fForegroundColor;

    public PythonSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
        super(parent, ruler, styles);
        StyledText text = this.getTextWidget();
        text.addBidiSegmentListener(new BidiSegmentListener() {
            public void lineGetSegments(BidiSegmentEvent event) {
                try {
                    event.segments = getBidiLineSegments(event.lineOffset);
                } catch (BadLocationException x) {
                    // ignore
View Full Code Here

Examples of org.eclipse.swt.custom.BidiSegmentListener

  private void configureHardWrap() {
    if (shouldHardWrap()) {
      if (hardWrapSegmentListener == null) {
        final StyledText textWidget = getTextWidget();
        hardWrapSegmentListener = new BidiSegmentListener() {
          public void lineGetSegments(BidiSegmentEvent e) {
            int[] segments = calculateWrapOffsets(e.lineText, MAX_LINE_WIDTH);
            if (segments != null) {
              char[] segmentsChars = new char[segments.length];
              Arrays.fill(segmentsChars, '\n');
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.