Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.ExtendedModifyListener


          input.replaceTextRange(insertPos, 0, insertCode);
          input.setCaretOffset(insertPos + 1);
        }
      });
      // prevent selected text from disappearing when you hit enter
      input.addExtendedModifyListener(new ExtendedModifyListener() {

        public void modifyText(ExtendedModifyEvent e) {
          String text = ((StyledText) e.widget).getText();
          if (text.contains("" + SWT.CR))
            ((StyledText) e.widget).setText((text.substring(0,
View Full Code Here


        }
      }
    });

    // Add the syntax coloring handler
    styledText.addExtendedModifyListener(new ExtendedModifyListener() {
      public void modifyText(ExtendedModifyEvent event) {
        int end = event.start + event.length - 1;

        // If they typed something, get it
        if (event.start <= end) {
View Full Code Here

    spec.horizontalAlignment = GridData.FILL;
    spec.grabExcessHorizontalSpace = true;
    spec.verticalAlignment = GridData.FILL;
    spec.grabExcessVerticalSpace = true;
    text.setLayoutData(spec);
    text.addExtendedModifyListener(new ExtendedModifyListener() {
      public void modifyText(ExtendedModifyEvent e) {
        handleExtendedModify(e);
      }
    });
  }
View Full Code Here

            });

            /**
             * Set it to the location we've set it to be.
             */
            addExtendedModifyListener(new ExtendedModifyListener() {

                public void modifyText(ExtendedModifyEvent event) {
                    if (internalCaretSet != -1) {
                        if (internalCaretSet != getCaretOffset()) {
                            setCaretOffset(internalCaretSet);
View Full Code Here

TOP

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

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.