Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.TextStyle


                : fSymbolicFontName;
        Font font = JFaceResources.getFont(symbolicFontName);
        fTextLayout.setFont(font);
        fTextLayout.setWidth(-1);
        font = JFaceResources.getFontRegistry().getBold(symbolicFontName);
        fBoldStyle = new TextStyle(font, null, null);

        // Compute and set tab width
        fTextLayout.setText("    "); //$NON-NLS-1$
        final int tabWidth = fTextLayout.getBounds().width;
        fTextLayout.setTabs(new int[] { tabWidth });
View Full Code Here


      text += string;
    }
    tlayout.setText(text);

    tlayout.setStyle(new TextStyle(null, pathColor, null), blackLength,
        text.length());
    if (!matches) {
      tlayout.setStyle(new TextStyle(null, matchColor, null), text
          .length()
          - string.length(), text.length());
    }
    if (filter != null) {
      Point match = filter.match(getName(trace));
      if (match != null) {
        tlayout.setStyle(new TextStyle(null, null, matchColor),
            match.x, match.y + match.x - 1);
      }
    }
    tlayout.draw(event.gc, event.x + getMaxSize(), event.y);
  }
View Full Code Here

    fTextLayout.setWidth(-1);
    FontData[] fontData= font.getFontData();
    for (int i= 0; i < fontData.length; i++)
      fontData[i].setStyle(SWT.BOLD);
    font= new Font(getShell().getDisplay(), fontData);
    fBoldStyle= new TextStyle(font, null, null);
   
    // Compute and set tab width
    fTextLayout.setText("    "); //$NON-NLS-1$
    int tabWidth = fTextLayout.getBounds().width;
    fTextLayout.setTabs(new int[] {tabWidth});
View Full Code Here

    // italicsFont = resourceManager.createFont(FontDescriptor.createFrom(
    // table.getFont()).setStyle(SWT.ITALIC));
    grayColor = resourceManager.createColor(ColorUtil.blend(table
        .getBackground().getRGB(), table.getForeground().getRGB()));
    final TextStyle boldStyle = new TextStyle(boldFont, null, null);
    Listener listener = new Listener() {
      public void handleEvent(Event event) {
        QuickAccessEntry entry = (QuickAccessEntry) event.item
            .getData();
        if (entry != null) {
View Full Code Here

    {
        if( this.textControl.isEnabled() )
        {
            if( this.hyperlinkActive )
            {
                final TextStyle style = new TextStyle( this.textControl.getFont(), null, null );
                style.underline = true;
                style.foreground = JFaceColors.getActiveHyperlinkText( this.display );
                style.underlineColor = style.foreground;
               
                paintTextOverlay( event.gc, style, getTextWithOverlay() );
            }
            else if( ! this.textControl.isFocusControl() && this.textControl.getText().length() == 0 )
            {
                final String overlay = this.controller.overlay();
               
                if( overlay != null && overlay.length() > 0 )
                {
                    final TextStyle style = new TextStyle( this.textControl.getFont(), null, null );
                    style.foreground = this.display.getSystemColor( SWT.COLOR_GRAY );
                   
                    paintTextOverlay( event.gc, style, overlay );
                }
            }
View Full Code Here

    String symbolicFontName= fSymbolicFontName == null ? JFaceResources.DIALOG_FONT : fSymbolicFontName;
    Font font= JFaceResources.getFont(symbolicFontName);
    fTextLayout.setFont(font);
    fTextLayout.setWidth(-1);
    font= JFaceResources.getFontRegistry().getBold(symbolicFontName);
    fBoldStyle= new TextStyle(font, null, null);

    // Compute and set tab width
    fTextLayout.setText("    "); //$NON-NLS-1$
    int tabWidth= fTextLayout.getBounds().width;
    fTextLayout.setTabs(new int[] { tabWidth });
View Full Code Here

            {
                final Display display = this.table.getDisplay();
                final String text = item.getText( i );

                final Font font = item.getFont( i );
                final TextStyle style = new TextStyle( font, null, null );
               
                if( this.mouseOverColumn == i )
                {
                    final Color hyperlinkColor = JFaceColors.getActiveHyperlinkText( display );
                    style.underline = true;
View Full Code Here

  }
  /**
   * 初始化样式
   * */
  private void initSayStyle() {
    ISAYSTYLE = new TextStyle();
    USERSAYSTYLE = new TextStyle();
    Color darkgreen = Display.getDefault().getSystemColor(SWT.COLOR_DARK_GREEN);
    Color darkblue = Display.getDefault().getSystemColor(SWT.COLOR_DARK_BLUE);
    Color white = Display.getDefault().getSystemColor(SWT.COLOR_WHITE);
    ISAYSTYLE.background = USERSAYSTYLE.background = white;
    ISAYSTYLE.foreground = darkblue;
View Full Code Here

TOP

Related Classes of org.eclipse.swt.graphics.TextStyle

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.