Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.StyleRange


    }

    int charCount = detailListWidget.getCharCount();
    detailListWidget.append(value + "\n");
    if (true == isError) {
      StyleRange style2 = new StyleRange();
      style2.start = charCount;
      style2.length = value.length();
      style2.foreground = errorColor;
      detailListWidget.setStyleRange(style2);
    }
View Full Code Here


       
        linkInfo info = new linkInfo(ofs + det[0], ofs + det[0] + det[1], url );
 
        links.add(info);
 
        StyleRange sr = new StyleRange();
        sr.start = info.ofsStart;
        sr.length = info.ofsEnd - info.ofsStart;
        sr.underline = true;
        sr.foreground = Colors.blue;
       
View Full Code Here

    int offset,
    int length,
    TextAttribute attr) {
    if (attr != null)
      presentation.addStyleRange(
        new StyleRange(
          offset,
          length,
          attr.getForeground(),
          attr.getBackground(),
          attr.getStyle()));
View Full Code Here

    int offset,
    int length,
    TextAttribute attr) {
    if (attr != null)
      presentation.addStyleRange(
        new StyleRange(
          offset,
          length,
          attr.getForeground(),
          attr.getBackground(),
          attr.getStyle()));
View Full Code Here

                color = Colors.red;
              }

              if ( color != Colors.black ){
               
                StyleRange styleRange = new StyleRange();
                styleRange.start = start;
                styleRange.length = str.length();
                styleRange.foreground = color;
                log.setStyleRange(styleRange);
              }
View Full Code Here

     
      log.append( me  );
     
      if ( colour != Colors.black ){
       
        StyleRange styleRange = new StyleRange();
        styleRange.start = start;
        styleRange.length = me.length();
        styleRange.foreground = colour;
        log.setStyleRange(styleRange);
      }
     
      log.append( "\n" );
     
    }else{
      String says = lu.getLocalisedMessageText( "azbuddy.chat.says", new String[]{ buddy_name }) + "\n";
     
      log.append( says );
     
      if ( colour != Colors.black ){
       
        StyleRange styleRange = new StyleRange();
        styleRange.start = start;
        styleRange.length = says.length();
        styleRange.foreground = colour;
        log.setStyleRange(styleRange);
      }
View Full Code Here

              }else{
               
                color = Colors.red;
              }
             
              StyleRange styleRange = new StyleRange();
              styleRange.start = start;
              styleRange.length = str.length();
              styleRange.foreground = color;
              log.setStyleRange(styleRange);
             
View Full Code Here

            //          System.out.println("Got Linecount " + lineCount + ", Charcount " + charCount);

            int lineOfs = helpPanel.getOffsetAtLine(lineCount - 1);
            int lineLen = charCount - lineOfs;
            //          System.out.println("Setting Style : " + lineOfs + ", " + lineLen);
            helpPanel.setStyleRange(new StyleRange(lineOfs, lineLen, fg, bg,
                style));
            helpPanel.setLineBackground(lineCount - 1, 1, bg);
          }
        }
View Full Code Here

              }else{
               
                color = Colors.red;
              }
             
              StyleRange styleRange = new StyleRange();
              styleRange.start = start;
              styleRange.length = str.length();
              styleRange.foreground = color;
              log.setStyleRange(styleRange);
             
View Full Code Here

            + TimeFormatter
                .twoDigits(calendar.get(Calendar.SECOND));
        date = "[" + date + "]";
        log_content.append(date);
               
        StyleRange date_style = new StyleRange();
        date_style.start = date_begin;
        date_style.length = date.length();
        date_style.foreground = date_foreground;
        log_content.setStyleRange(date_style);
       
        log_content.append("  ");
        int style_begin = log_content.getText().length();
        log_content.append(text);
        log_content.append(System.getProperty("line.separator"));
   
        StyleRange style = new StyleRange();
        style.start = style_begin;
        style.length = text.length();
        style.foreground = foreground;
        log_content.setStyleRange(style);
       
View Full Code Here

TOP

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

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.