Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.StyledText


    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_NOTIFIER_TEXT, text);
  }

  private void createSharingPage(Composite container) {
    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_SHARING_TEXT, text);
  }
View Full Code Here


    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_SHARING_TEXT, text);
  }

  private void createImportExportPage(Composite container) {
    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_IMPORT_EXPORT_TEXT, text);
  }
View Full Code Here

    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_IMPORT_EXPORT_TEXT, text);
  }

  private void createPreferencesPage(Composite container) {
    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_PREFERENCES_TEXT, text);
  }
View Full Code Here

    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_PREFERENCES_TEXT, text);
  }

  private void createTipsPage(Composite container) {
    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_TIPS_TEXT, text);
  }
View Full Code Here

    StyledText text = createStyledText(container);
    applyRichText(Messages.TutorialPage_TIPS_TEXT, text);
  }

  private void createFinishPage(Composite container) {
    StyledText text = createStyledText(container, false);
    applyRichText(Messages.TutorialPage_FINISH_TEXT, text);

    Composite linkContainer = new Composite(container, SWT.NONE);
    linkContainer.setLayout(LayoutUtils.createGridLayout(1, 0, 0));
    linkContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
View Full Code Here

  private StyledText createStyledText(Composite container) {
    return createStyledText(container, true);
  }

  private StyledText createStyledText(Composite container, boolean grabVertical) {
    StyledText text = new StyledText(container, SWT.WRAP | SWT.READ_ONLY);
    text.setEnabled(false);
    text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, grabVertical));
    ((GridData) text.getLayoutData()).widthHint = 500;
    text.setLineSpacing(5);
    return text;
  }
View Full Code Here

      masterContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
      masterContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));
      ((GridLayout) masterContainer.getLayout()).marginBottom = 15;
      ((GridLayout) masterContainer.getLayout()).verticalSpacing = 10;

      StyledText infoText = new StyledText(masterContainer, SWT.WRAP | SWT.READ_ONLY);
      infoText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
      ((GridData) infoText.getLayoutData()).widthHint = 200;
      infoText.setEnabled(false);
      infoText.setBackground(masterContainer.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));

      if (Application.IS_WINDOWS || Application.IS_MAC)
        infoText.setText(Messages.CredentialsPreferencesPage_MASTER_PW_INFO);
      else
        infoText.setText(Messages.CredentialsPreferencesPage_MASTER_PW_MSG);

      /* Use Own Master Password */
      fUseMasterPasswordCheck = new Button(masterContainer, SWT.CHECK);
      fUseMasterPasswordCheck.setText(Messages.CredentialsPreferencesPage_USE_MASTER_PW);
      fUseMasterPasswordCheck.setFocus();
View Full Code Here

   */
  @Override
  protected Control createContents(Composite parent) {
    Composite container = createContainer(parent);

    StyledText infoText = new StyledText(container, SWT.WRAP | SWT.READ_ONLY);
    infoText.setEnabled(false);
    infoText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
    ((GridData) infoText.getLayoutData()).widthHint = 200;
    infoText.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
    infoText.setText(Messages.SharingPreferencesPage_SELECT_COMMUNITY);

    Composite tableContainer = new Composite(container, SWT.NONE);
    tableContainer.setLayout(LayoutUtils.createGridLayout(1, 0, 0));
    tableContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

View Full Code Here

        ISourceViewer sourceViewer = getSourceViewer();
        if (sourceViewer == null) {
            return null;
        }
        StyledText styledText = sourceViewer.getTextWidget();
        if (styledText == null) {
            return null;
        }

        int caret = 0;
        if (sourceViewer instanceof ITextViewerExtension5) {
            ITextViewerExtension5 extension = (ITextViewerExtension5) sourceViewer;
            caret = extension.widgetOffset2ModelOffset(styledText
                .getCaretOffset());
        } else {
            int offset = sourceViewer.getVisibleRegion().getOffset();
            caret = offset + styledText.getCaretOffset();
        }

        IJavaElement element = getElementAt(caret);

        if (!(element instanceof ISourceReference)) {
View Full Code Here

            }

            if (input != null && input.equals(getEditorInput())) {
                ISourceViewer viewer = getSourceViewer();
                if (viewer != null) {
                    StyledText textWidget = viewer.getTextWidget();
                    if (textWidget != null && !textWidget.isDisposed()) {
                        synchronized (this) {
                            fPosted = true;
                            fClassFileEditorInput = input;
                        }
                        textWidget.getDisplay().asyncExec(this);
                    }
                }
            }
        }
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.