Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.StyledText.addListener()


    final StyledText widget = editor.getViewer().getTextWidget();
    if (!registeredWidgets.contains(widget)) {
      PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
        @Override
        public void run() {
          widget.addListener(SWT.KeyDown, listener);
          widget.addListener(SWT.MouseDown, listener);
        }
      });
      registeredWidgets.add(widget);
    }
View Full Code Here


    if (!registeredWidgets.contains(widget)) {
      PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
        @Override
        public void run() {
          widget.addListener(SWT.KeyDown, listener);
          widget.addListener(SWT.MouseDown, listener);
        }
      });
      registeredWidgets.add(widget);
    }
  }
View Full Code Here

  protected StyledText newSingleLineStyledText(Composite parent, String tip) {
    StyledText w = new StyledText(parent, SWT.SINGLE | SWT.BORDER);
    w.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    w.setToolTipText(tip);
    w.addListener(SWT.KeyUp, this);
    w.addVerifyKeyListener(this);
    w.addListener(SWT.MouseUp, this); // for paste operation
    return w;
  }
View Full Code Here

    StyledText w = new StyledText(parent, SWT.SINGLE | SWT.BORDER);
    w.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    w.setToolTipText(tip);
    w.addListener(SWT.KeyUp, this);
    w.addVerifyKeyListener(this);
    w.addListener(SWT.MouseUp, this); // for paste operation
    return w;
  }

  public void verifyKey(VerifyEvent event) {
    event.doit = true;
View Full Code Here

        styledText.addLineStyleListener(this);
        styledText.addLineBackgroundListener(this);
        styledText.setEditable(true);
        setFont(console.getFont());
        styledText.addMouseTrackListener(this);
        styledText.addListener(SWT.MouseUp, mouseUpListener);

        ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
        propertyChangeListener = new HyperlinkColorChangeListener();
        colorRegistry.addListener(propertyChangeListener);
View Full Code Here

    styledText.addMouseListener(getCursorListener());
    styledText.addKeyListener(getCursorListener());

    // Disable orientation switching until we fully support it.
    styledText.addListener(SWT.OrientationChange, new Listener() {
      public void handleEvent(Event event) {
        event.doit= false;
      }
    });
View Full Code Here

            redoAction.update();
        }
      });

    // set the cursor when hovering over a link
    textWidget.addListener(SWT.MouseMove, new Listener() {
      public void handleEvent(final Event e) {
        StyleRange styleRange = getStyleRange(e.x, e.y);
        if (styleRange != null && styleRange.underline)
          textWidget.setCursor(SYS_LINK_CURSOR);
        else
View Full Code Here

    t.setFont(UIUtils.getFont(UIPreferences.THEME_CommitMessageFont));

    sys_normalCursor = t.getCursor();

    // set the cursor when hovering over a link
    t.addListener(SWT.MouseMove, new Listener() {
      public void handleEvent(final Event e) {
        StyleRange styleRange = getStyleRange(e.x, e.y);
        if (styleRange != null && styleRange.underline)
          t.setCursor(SYS_LINK_CURSOR);
        else
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.