Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.FontDescriptor.createFont()


    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 ) );
  }

  private void createAnswers( Composite parent ) {
    Composite result = new Composite( parent, SWT.NONE );
View Full Code Here

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

TOP
Copyright © 2018 www.massapi.com. 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.