Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.StyledText


    }

    int offset= widgetRange.getOffset();
    int length= widgetRange.getLength();

    StyledText text= fViewer.getTextWidget();
   
    // support for bidi
    Point minLocation= getMinimumLocation(text, offset, length);
    Point maxLocation= getMaximumLocation(text, offset, length);

    int x1= minLocation.x;
    int x2= minLocation.x + maxLocation.x - minLocation.x - 1;
    int y= minLocation.y + text.getLineHeight() - 1;
   
    GC gc= event.gc;
    gc.setForeground(fFrameColor);
    gc.drawLine(x1, y, x2, y);
  }
View Full Code Here


    if (widgetRange == null) {
       leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
       return;       
    }
   
    StyledText text= fViewer.getTextWidget();
    if (text != null && !text.isDisposed()) 
      text.redrawRange(widgetRange.getOffset(), widgetRange.getLength(), true);
  }
View Full Code Here

    if (widgetRange == null) {
       leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
       return;  
    }

    StyledText text= fViewer.getTextWidget();
    if (text != null && !text.isDisposed()) {
      int start= widgetRange.getOffset();
      int end= widgetRange.getLength() + start;
      text.setSelection(start, end);
    }
  }
View Full Code Here

       leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
       return;  
    }
   
    int offset= widgetRange.getOffset() + fCaretOffset;
    StyledText text= fViewer.getTextWidget();
    if (text != null && !text.isDisposed())
      text.setCaretOffset(offset);
  }
View Full Code Here

      public void menuAboutToShow(IMenuManager mgr) {
        fillContextMenu(mgr);
      }
    });

    StyledText text= fPatternEditor.getTextWidget();   
    Menu menu= manager.createContextMenu(text);
    text.setMenu(menu);
  }
View Full Code Here

    // only accept "default" or field options.
    return context.getCurrentNode().getText().equals(CLOSING_BRACKET.toString());
  }

  private boolean isLastWordFromCaretPositionEqualTo(String word, ContentAssistContext context) {
    StyledText styledText = context.getViewer().getTextWidget();
    int valueLength = word.length();
    int start = styledText.getCaretOffset() - valueLength;
    if (start < 0) {
      return false;
    }
    String previousWord = styledText.getTextRange(start, valueLength);
    return word.equals(previousWord);
  }
View Full Code Here

  private IEventListener eventListener;
 
  public void createPartControl(Composite parent) {
    parent.setLayout(new GridLayout());
   
    styledText = new StyledText(parent, SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL);
    styledText.setEditable(false);
    styledText.setLayoutData(new GridData(GridData.FILL_BOTH));
   
    Composite chatMessageComposite = new Composite(parent, SWT.NONE);
    chatMessageComposite.setLayout(new GridLayout(2, false));
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void createPartControl(Composite parent) {
    styledText = new StyledText(parent, SWT.WRAP);
    styledText.setText("Client Console...\n");
    styledText.setEditable(false);
   
    ConsoleService.getInstance().addMessageListener(new IConsoleListener() {

View Full Code Here

   * {@inheritDoc}
   */
  public void createPartControl(Composite parent) {
    parent.setLayout(new GridLayout());
   
    styledText = new StyledText(parent, SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL);
    styledText.setEditable(false);
    styledText.setLayoutData(new GridData(GridData.FILL_BOTH));
   
    Composite chatMessageComposite = new Composite(parent, SWT.NONE);
    chatMessageComposite.setLayout(new GridLayout(2, false));
View Full Code Here

  private IEventListener eventListener; 

  public static final String VIEW_ID = "org.knapper.server.ui.ConsoleView";

  public void createPartControl(Composite parent) {
    styledText = new StyledText(parent, SWT.WRAP | SWT.V_SCROLL);
    styledText.setEditable(false);

    eventListener = new IEventListener() {

      public void handleEvent(IEvent event) {
View Full Code Here

TOP

Related Classes of org.eclipse.swt.custom.StyledText

Copyright © 2018 www.massapicom. 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.