Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.FontDescriptor


    description.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    quarter.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    updatedBy.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    Font font = name.getFont();
    FontDescriptor bold = FontDescriptor.createFrom(font);
    bold = bold.setStyle(SWT.BOLD);
    FontDescriptor big = bold.setHeight(18);
    Font boldFont = bold.createFont(font.getDevice());

    name.setFont(big.createFont(font.getDevice()));
    id.setFont(boldFont);
    description.setFont(boldFont);
    quarter.setFont(boldFont);
    updatedBy.setFont(boldFont);
View Full Code Here


  }

  public void createQuestion( Composite parent ) {
    labelQuestion = new Label( parent, SWT.WRAP | SWT.CENTER );
    GridDataFactory.fillDefaults().align( SWT.FILL, SWT.FILL ).grab( true, true ).applyTo( labelQuestion );
    FontDescriptor labelFontDescriptor = FontDescriptor.createFrom( labelQuestion.getFont() );
    FontDescriptor bigFontDescriptor = labelFontDescriptor.setStyle( SWT.BOLD ).increaseHeight( 7 );
    labelQuestion.setFont( bigFontDescriptor.createFont( parent.getDisplay() ) );
    labelQuestion.setForeground( parent.getDisplay().getSystemColor( SWT.COLOR_BLACK ) );
  }
View Full Code Here

    makeBold( resultLabel );
    return resultLabel;
  }

  private void makeBold( Label resultLabel ) {
    FontDescriptor fontDescriptor = FontDescriptor.createFrom( resultLabel.getFont() );
    Font font = fontDescriptor.setStyle( SWT.BOLD ).createFont( resultLabel.getDisplay() );
    resultLabel.setFont( font );
  }
View Full Code Here

  private List<Font> fonts = new ArrayList<Font>();
 
    private static final org.eclipse.sapphire.Color OUTLINE_FOREGROUND = new org.eclipse.sapphire.Color(0xFF, 0xA5, 0x00);

    public DiagramResourceCache() {
    FontDescriptor descriptor = JFaceResources.getDefaultFontDescriptor();
    FontData[] fontData = descriptor.getFontData();
    FontData smallerFontData = new FontData(fontData[0].getName(), fontData[0].getHeight()-1, 0);
    Font defaultFont = new Font(null, new FontData[] { smallerFontData });
    fonts.add(defaultFont);
  }
View Full Code Here

     
      Font font = textStyle.font;
      if(font == null) {
        font = JFaceResources.getDefaultFont();
      }
      FontDescriptor fontDescriptor = FontDescriptor.createFrom(font);
      fontDescriptor = getModifiedFontDescriptor(fontDescriptor);
      textStyle.font = fontDescriptor.createFont(Display.getCurrent());
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.resource.FontDescriptor

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.