Examples of FontData


Examples of com.aspose.slides.FontData

    txtVal.setFontBold(NullableBool.True);
    txtVal.setFontHeight(16);
    txtVal.setFontItalic(NullableBool.True);
    txtVal.getFillFormat().setFillType(FillType.Solid);
    txtVal.getFillFormat().getSolidFillColor().setColor(new Color(PresetColor.DarkGreen));
    txtVal.setLatinFont(new FontData("Times New Roman"));

    //Setting value axis title
    chart.getAxes().getVerticalAxis().hasTitle(true);
    chart.getAxes().getVerticalAxis().getTitle().addTextFrameForOverriding("");
    IPortion valtitle = chart.getAxes().getVerticalAxis().getTitle().getTextFrameForOverriding().getParagraphs().get_Item(0).getPortions().get_Item(0);
    valtitle.setText("Primary Axis");
    valtitle.getPortionFormat().getFillFormat().setFillType(FillType.Solid);
    valtitle.getPortionFormat().getFillFormat().getSolidFillColor().setColor(Color.GRAY);
    valtitle.getPortionFormat().setFontHeight(20);
    valtitle.getPortionFormat().setFontBold(NullableBool.True);
    valtitle.getPortionFormat().setFontItalic(NullableBool.True);

    //Setting Major grid lines format for Category axis
    chart.getAxes().getHorizontalAxis().getMajorGridLinesFormat().getLine().getFillFormat().setFillType(FillType.Solid);
    chart.getAxes().getHorizontalAxis().getMajorGridLinesFormat().getLine().getFillFormat().getSolidFillColor().setColor(Color.GREEN);
    chart.getAxes().getHorizontalAxis().getMajorGridLinesFormat().getLine().setWidth(5);

    //Setting Minor grid lines format for Category axis
    chart.getAxes().getHorizontalAxis().getMinorGridLinesFormat().getLine().getFillFormat().setFillType(FillType.Solid);
    chart.getAxes().getHorizontalAxis().getMinorGridLinesFormat().getLine().getFillFormat().getSolidFillColor().setColor(Color.YELLOW);
    chart.getAxes().getHorizontalAxis().getMinorGridLinesFormat().getLine().setWidth(3);

    //Setting Category Axis Text Properties
    IChartPortionFormat txtCat = chart.getAxes().getHorizontalAxis().getTextFormat().getPortionFormat();
    txtCat.setFontBold(NullableBool.True);
    txtCat.setFontHeight(16);
    txtCat.setFontItalic(NullableBool.True);
    txtCat.getFillFormat().setFillType(FillType.Solid) ;
    txtCat.getFillFormat().getSolidFillColor().setColor(Color.BLUE);
    txtCat.setLatinFont(new FontData("Arial"));

    //Setting Category Titile
    chart.getAxes().getHorizontalAxis().hasTitle(true);
    chart.getAxes().getHorizontalAxis().getTitle().addTextFrameForOverriding("");
View Full Code Here

Examples of de.matthiasmann.twlthemeeditor.fontgen.FontData

    }

    int fontSize = ((Integer)fontSizeSpinner.getValue()).intValue();

    try {
      fontData = new FontData(new File(path), fontSize);
    } catch (IOException ex) {
      ex.printStackTrace();
      renderer.font = null;
      return;
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData


    public Font getFont(Object element, int columnIndex) {
        Font font = Display.getCurrent().getFocusControl().getFont();
        if (columnIndex == 1) {
            font = new Font(Display.getCurrent(), new FontData("Arial", 10, SWT.NORMAL));
        }
        return font;
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

    final Composite composite = new Composite(viewComposite,SWT.BORDER);
    composite.setBackgroundMode(SWT.INHERIT_DEFAULT);
    composite.setBackground(ColorCache.getColor(composite.getDisplay(), "#F1F9F8"));
   
    Font font = composite.getFont();
    FontData fDatas[] = font.getFontData();
    for(int i = 0 ; i < fDatas.length ; i++) {
      fDatas[i].setHeight(150 * fDatas[i].getHeight() / 100);
      if(Constants.isWindows) {
        fDatas[i].setStyle(SWT.BOLD);
      }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

    layout = new GridLayout(1,false);
    layout.marginWidth = 15;
    container1.setLayout(layout);
   
    Label jmule_version = new Label(container1,SWT.LEFT);
    FontData data = skin.getLabelFont().getFontData()[0];
   
    Font bold_font = new Font(display,data.getName(),data.getHeight(),SWT.BOLD);
    jmule_version.setText(JMConstants.JMULE_FULL_NAME);
    jmule_version.setFont(bold_font);
   
    Label copyright = new Label(container1,SWT.LEFT);
    copyright.setText("Copyright (C) 2007-2010 JMule Team");
    copyright.setFont(bold_font);
   
    new Label(container1,SWT.NONE);
   
    StyledText about_text = new StyledText(container1,SWT.LEFT | SWT.READ_ONLY);
    about_text.setText(_._("aboutwindow.tab.general.label.about"));
    about_text.setWordWrap(true);
    about_text.setBackground(shell.getBackground());
    layout_data = new GridData(GridData.FILL_HORIZONTAL);
    about_text.setLayoutData(layout_data);
   
    Composite links_container = new Composite(content,SWT.NONE);
    links_container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    layout = new GridLayout(2,false);
    layout.marginWidth = 15;
    links_container.setLayout(layout);
   
    FontData link_font_data = skin.getLabelFont().getFontData()[0];
    Font link_font = new Font(SWTThread.getDisplay(),link_font_data.getName(), link_font_data.getHeight(), SWT.UNDERLINE_SINGLE);
   
    CLabel link;
   
    link = new CLabel(links_container,SWT.NONE);
    link.setText(_._("aboutwindow.tab.general.label.home_page") + " : ");
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

    label.setForeground(skin.getDefaultColor());
    label.setText(JMConstants.JMULE_NAME + " " + _._("updaterwindow.label.jmule_version") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    user_version = new Label(window_content,SWT.NONE);
    FontData data = skin.getDefaultFont().getFontData()[0];
    Font font = new Font(SWTThread.getDisplay(),data.getName(),data.getHeight(),SWT.BOLD );
    user_version.setFont(font);
    user_version.setText(JMConstants.CURRENT_JMULE_VERSION);
    user_version.setForeground(green_color);
   
    label = new Label(window_content,SWT.NONE);
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

  }

  private void initResources(Shell splash) {

    /* Font */
    FontData fontData = splash.getDisplay().getSystemFont().getFontData()[0];
    fVersionFont = new Font(splash.getDisplay(), fontData.getName(), 8, SWT.BOLD);

    /* Color */
    fVersionColor = new Color(splash.getDisplay(), new RGB(53, 53, 53));
  }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

    FontData[] oldFontDatas = registry.getFontData(NEWS_TEXT_FONT_ID);
    FontData[] newFontDatas = new FontData[oldFontDatas.length];

    /* Set Height */
    for (int i = 0; i < oldFontDatas.length; i++) {
      FontData oldFontData = oldFontDatas[i];
      int oldHeight = oldFontData.getHeight();

      if (reset)
        newFontDatas[i] = new FontData(oldFontData.getName(), DEFAULT_NEWS_TEXT_FONT_HEIGHT, oldFontData.getStyle());
      else
        newFontDatas[i] = new FontData(oldFontData.getName(), zoomIn ? oldHeight + 1 : Math.max(oldHeight - 1, 0), oldFontData.getStyle());
    }

    registry.put(NEWS_TEXT_FONT_ID, newFontDatas);

    /* Store in Preferences */
 
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

  }

  private void initResources(Shell splash) {

    /* Font */
    FontData fontData = splash.getDisplay().getSystemFont().getFontData()[0];
    fVersionFont = new Font(splash.getDisplay(), fontData.getName(), 8, SWT.BOLD);

    /* Color */
    fVersionColor = new Color(splash.getDisplay(), new RGB(53, 53, 53));
  }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

 
 
 
  public void updateFont(TreeItem item) {

    FontData fontDatas[] = item.getFont().getFontData();
    FontData data = fontDatas[0];
    boolean isBold = false;

    TreeData data_ = (TreeData) item.getData();
   
    if(data_ == null || data_.getElement() == null)
      return;     
     
    int type = data_.getType();
    Element elem = data_.getElement();
   
    if (type == Editor.EVERYDAY) {     
      if(!elem.getChildren("period").isEmpty() || !elem.getChildren("at").isEmpty())
        isBold = true;
     
    } else if(type == Editor.DAYS) {     
      if(!elem.getChildren("date").isEmpty())
        isBold = true;
     
    } else if(type == Editor.WEEKDAYS) {
      if(item.getData("key") != null && item.getData("key").equals("holidays_@_weekdays")) {
        if(elem.getChild("holidays") != null && !elem.getChild("holidays").getChildren("weekdays").isEmpty()) {
          isBold = true;
        }         
      } else {
        if(!elem.getChildren("weekdays").isEmpty())
          isBold = true;
      }

    } else if(type == Editor.MONTHDAYS) {     
      if(!elem.getChildren("monthdays").isEmpty() && !elem.getChild("monthdays").getChildren("day").isEmpty())
        isBold = true;         

    } else if(type == Editor.ULTIMOS) {
      if(!elem.getChildren("ultimos").isEmpty())
        isBold = true;         

    } else if(type == Editor.SPECIFIC_WEEKDAYS) {
      if(!elem.getChildren("monthdays").isEmpty() && !elem.getChild("monthdays").getChildren("weekday").isEmpty())
        isBold = true;
    } else if(type == Editor.SPECIFIC_MONTHS) {
      if(!elem.getChildren("month").isEmpty())
        isBold = true;
    } else if(type == Editor.RUNTIME) {
      elem = elem.getChild("run_time");
      if(elem != null) {
        /*int hasAttribute = Utils.getAttributeValue("begin", elem).length() + Utils.getAttributeValue("end", elem).length() +
        (Utils.getAttributeValue("let_run", elem).equals("yes") ? 1 : 0) +
        (Utils.getAttributeValue("once", elem).equals("yes") ? 1 : 0);
       
        if(hasAttribute > 0)
        */
        if(elem.getAttributes().size()>0)
          isBold = true;
      }
    }

    Font font = null;
    if(isBold){
      font = new Font(Display.getCurrent(), data.getName(), data.getHeight(), SWT.BOLD);           
    } else {     
      font = new Font(Display.getCurrent(), data.getName(), data.getHeight(), SWT.NONE);

    }
    item.setFont(font);

  }
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.