Package org.eclipse.jface.viewers.StyledString

Examples of org.eclipse.jface.viewers.StyledString.Styler


        btnMoveDown = new ToolItem(toolbar, SWT.PUSH);
        btnMoveDown.setText("Down");
        btnMoveDown.setImage(imgDown);
        btnMoveDown.setEnabled(false);

        final Styler strikeoutStyler = new StrikeoutStyler(StyledString.QUALIFIER_STYLER, JFaceResources.getColorRegistry().get(JFacePreferences.QUALIFIER_COLOR));

        viewer.setLabelProvider(new StyledCellLabelProvider() {
            @Override
            public void update(ViewerCell cell) {
                Object element = cell.getElement();

                String label = null;
                Image image = null;
                Styler styler = null;

                Repository repo = (Repository) element;
                label = repo.toString();
                image = repoImg;
View Full Code Here


        btnMoveDown = new ToolItem(toolbar, SWT.PUSH);
        btnMoveDown.setText("Down");
        btnMoveDown.setImage(imgDown);
        btnMoveDown.setEnabled(false);

        final Styler strikeoutStyler = new StrikeoutStyler(StyledString.QUALIFIER_STYLER, JFaceResources.getColorRegistry().get(JFacePreferences.QUALIFIER_COLOR));

        viewer.setLabelProvider(new StyledCellLabelProvider() {
            @Override
            public void update(ViewerCell cell) {
                Object element = cell.getElement();

                String label = null;
                Image image = null;
                Styler styler = null;

                Repository repo = (Repository) element;
                label = repo.toString();
                image = repoImg;
View Full Code Here

    public void update(ViewerCell cell) {
        IConfigurationElement element = (IConfigurationElement) cell.getElement();

        boolean deprecated = element.getAttribute("deprecated") != null;

        Styler mainStyler = deprecated ? new StrikeoutStyler(null) : null;
        StyledString label = new StyledString(element.getAttribute("name"), mainStyler);

        Styler classStyle = deprecated ? new StrikeoutStyler(StyledString.QUALIFIER_STYLER) : StyledString.QUALIFIER_STYLER;
        label.append(" [" + element.getAttribute("class") + "]", classStyle);

        cell.setText(label.toString());
        cell.setStyleRanges(label.getStyleRanges());
View Full Code Here

      decorated = this.decorator.decorateText(label, element);
    }
    if (decorated == null)
      return styledString;

    Styler style = getDecorationStyle(element);
    return StyledCellLabelProvider.styleDecoratedString(decorated, style, styledString);
  }
View Full Code Here

        private Styler italicStyler;

        ViewConfigurationNameLabelProvider() {
            italicFont = GUIHelper.getFont(new FontData[] { new FontData(
                    "Arial", 8, SWT.ITALIC) }); //$NON-NLS-1$
            italicStyler = new Styler() {
                @Override
                public void applyStyles(TextStyle textStyle) {
                    textStyle.font = italicFont;
                }
            };
View Full Code Here

            String result = element == null ? "" : element.toString();//$NON-NLS-1$
            String prefix = ""; //$NON-NLS-1$
            if (result.equals(getActiveViewConfigurationName())) {
                prefix = "* "; //$NON-NLS-1$
            }
            Styler styler = null;
            if (result.length() == 0) {
                result = Messages
                        .getString("PersistenceDialog.defaultStateConfigName"); //$NON-NLS-1$
                styler = italicStyler;
            }
View Full Code Here

        } else if (lowerStatus.startsWith("error")) {
          image = "red-dot.png";
        }
      }
      if (status != null) {
        Styler style = null;
        StyledString styledString = new StyledString(status, style);
        /*
         * String fileName = bean.getFileName(); if (fileName != null) {
         * styledString.append(fileName, StyledString.COUNTER_STYLER); }
         */
 
View Full Code Here

      String className = log.getClassName();
      // we don't want to display ? as location
      if (className.trim().equals("?"))
        className = null;
      if (className != null) {
        Styler style = null;
        StyledString styledString = new StyledString(className, style);
        String fileName = log.getFileName();
        if (fileName != null) {
          styledString.append(fileName, StyledString.COUNTER_STYLER);
        }
View Full Code Here

     
      // we don't want to display ? as location
      if (className.trim().equals("?")) className = null;
     
      if (className != null) {
        Styler style = null;
        StyledString styledString = new StyledString(className, style );

        String fileName = log.getFileName();
        if (fileName != null) {
          styledString.append(fileName, StyledString.COUNTER_STYLER);
View Full Code Here

        } else if (lowerStatus.startsWith("error")) {
          image = "red-dot.png";
        }
      }
      if (status != null) {
        Styler style = null;
        StyledString styledString = new StyledString(status, style);

        /*
        String fileName = bean.getFileName();
        if (fileName != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.StyledString.Styler

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.