Tabnine Logo
FontData.getStyle
Code IndexAdd Tabnine to your IDE (free)

How to use
getStyle
method
in
org.eclipse.swt.graphics.FontData

Best Java code snippets using org.eclipse.swt.graphics.FontData.getStyle (Showing top 20 results out of 360)

origin: pentaho/pentaho-kettle

public void setDefaultFont( FontData fd ) {
 if ( fd != null ) {
  properties.setProperty( STRING_FONT_DEFAULT_NAME, fd.getName() );
  properties.setProperty( STRING_FONT_DEFAULT_SIZE, "" + fd.getHeight() );
  properties.setProperty( STRING_FONT_DEFAULT_STYLE, "" + fd.getStyle() );
 }
}
origin: pentaho/pentaho-kettle

public void setGraphFont( FontData fd ) {
 properties.setProperty( STRING_FONT_GRAPH_NAME, fd.getName() );
 properties.setProperty( STRING_FONT_GRAPH_SIZE, "" + fd.getHeight() );
 properties.setProperty( STRING_FONT_GRAPH_STYLE, "" + fd.getStyle() );
}
origin: pentaho/pentaho-kettle

public void setNoteFont( FontData fd ) {
 properties.setProperty( STRING_FONT_NOTE_NAME, fd.getName() );
 properties.setProperty( STRING_FONT_NOTE_SIZE, "" + fd.getHeight() );
 properties.setProperty( STRING_FONT_NOTE_STYLE, "" + fd.getStyle() );
}
origin: pentaho/pentaho-kettle

public void setFixedFont( FontData fd ) {
 properties.setProperty( STRING_FONT_FIXED_NAME, fd.getName() );
 properties.setProperty( STRING_FONT_FIXED_SIZE, "" + fd.getHeight() );
 properties.setProperty( STRING_FONT_FIXED_STYLE, "" + fd.getStyle() );
}
origin: pentaho/pentaho-kettle

public void setGridFont( FontData fd ) {
 properties.setProperty( STRING_FONT_GRID_NAME, fd.getName() );
 properties.setProperty( STRING_FONT_GRID_SIZE, "" + fd.getHeight() );
 properties.setProperty( STRING_FONT_GRID_STYLE, "" + fd.getStyle() );
}
origin: pentaho/pentaho-kettle

public FontData getFixedFont() {
 FontData def = getDefaultFontData();
 String name = properties.getProperty( STRING_FONT_FIXED_NAME );
 int size = Const.toInt( properties.getProperty( STRING_FONT_FIXED_SIZE ), def.getHeight() );
 int style = Const.toInt( properties.getProperty( STRING_FONT_FIXED_STYLE ), def.getStyle() );
 return new FontData( name, size, style );
}
origin: pentaho/pentaho-kettle

public FontData getGraphFont() {
 FontData def = getDefaultFontData();
 String name = properties.getProperty( STRING_FONT_GRAPH_NAME, def.getName() );
 int size = Const.toInt( properties.getProperty( STRING_FONT_GRAPH_SIZE ), def.getHeight() );
 int style = Const.toInt( properties.getProperty( STRING_FONT_GRAPH_STYLE ), def.getStyle() );
 return new FontData( name, size, style );
}
origin: pentaho/pentaho-kettle

public FontData getNoteFont() {
 FontData def = getDefaultFontData();
 String name = properties.getProperty( STRING_FONT_NOTE_NAME, def.getName() );
 String ssize = properties.getProperty( STRING_FONT_NOTE_SIZE );
 String sstyle = properties.getProperty( STRING_FONT_NOTE_STYLE );
 int size = Const.toInt( ssize, def.getHeight() );
 int style = Const.toInt( sstyle, def.getStyle() );
 return new FontData( name, size, style );
}
origin: pentaho/pentaho-kettle

public FontData getGridFont() {
 FontData def = getDefaultFontData();
 String name = properties.getProperty( STRING_FONT_GRID_NAME, def.getName() );
 String ssize = properties.getProperty( STRING_FONT_GRID_SIZE );
 String sstyle = properties.getProperty( STRING_FONT_GRID_STYLE );
 int size = Const.toInt( ssize, def.getHeight() );
 int style = Const.toInt( sstyle, def.getStyle() );
 return new FontData( name, size, style );
}
origin: pentaho/pentaho-kettle

public FontData getDefaultFont() {
 FontData def = getDefaultFontData();
 if ( isOSLookShown() ) {
  return def;
 }
 String name = properties.getProperty( STRING_FONT_DEFAULT_NAME, def.getName() );
 int size = Const.toInt( properties.getProperty( STRING_FONT_DEFAULT_SIZE ), def.getHeight() );
 int style = Const.toInt( properties.getProperty( STRING_FONT_DEFAULT_STYLE ), def.getStyle() );
 return new FontData( name, size, style );
}
origin: pentaho/pentaho-kettle

properties.setProperty( STRING_FONT_FIXED_NAME, fd.getName() );
properties.setProperty( STRING_FONT_FIXED_SIZE, "" + fd.getHeight() );
properties.setProperty( STRING_FONT_FIXED_STYLE, "" + fd.getStyle() );
properties.setProperty( STRING_FONT_DEFAULT_STYLE, "" + fd.getStyle() );
properties.setProperty( STRING_FONT_GRAPH_STYLE, "" + fd.getStyle() );
properties.setProperty( STRING_FONT_GRID_STYLE, "" + fd.getStyle() );
properties.setProperty( STRING_FONT_NOTE_STYLE, "" + fd.getStyle() );
origin: pentaho/pentaho-kettle

  .getGraphFont().getStyle() );
fontMedium = new ManagedFont( display, mediumFontData );
  .getGraphFont().getStyle()
  | SWT.BOLD );
fontMediumBold = new ManagedFont( display, mediumFontBoldData );
  .getStyle() );
fontLarge = new ManagedFont( display, largeFontData );
  .getStyle() );
fontTiny = new ManagedFont( display, tinyFontData );
  .getStyle() );
fontSmall = new ManagedFont( display, smallFontData );
  .getDefaultFontData().getStyle()
  | SWT.BOLD );
fontBold = new ManagedFont( display, boldFontData );
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  fixedFontData = new FontData( PropsUI.getInstance().getFixedFont().getName(),
   PropsUI.getInstance().getFixedFont().getHeight(), PropsUI.getInstance().getFixedFont().getStyle() );
  fixedFont.dispose();
  fixedFont = new Font( display, fixedFontData );
  wFFont.redraw();
 }
} );
origin: pentaho/pentaho-kettle

FontData data = array[i];
String style = "NORMAL";
int bits = data.getStyle();
if ( bits != 0 ) {
 if ( ( bits & SWT.BOLD ) != 0 ) {
origin: org.apache.directory.studio/ldapbrowser.common

private boolean isItalic( FontData[] fontDatas )
{
  boolean italic = false;
  for ( FontData fontData : fontDatas )
  {
    if ( ( fontData.getStyle() & SWT.ITALIC ) != SWT.NORMAL )
    {
      italic = true;
    }
  }
  return italic;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

private static FontData[] getModifiedFontData(FontData[] originalData, int additionalStyle) {
  FontData[] styleData = new FontData[originalData.length];
  for (int i = 0; i < styleData.length; i++) {
    FontData base = originalData[i];
    styleData[i] = new FontData(base.getName(), base.getHeight(), base.getStyle() | additionalStyle);
  }
    return styleData;
}
origin: BiglySoftware/BiglyBT

private Font createBoldFont(Font original) {
  FontData[] font_data = original.getFontData();
  for (int i=0; i<font_data.length; i++) {
    font_data[i].setStyle(font_data[i].getStyle() | SWT.BOLD);
  }
  return new Font(original.getDevice(), font_data);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void changeFont(Control control, boolean italic) {
  Display.getCurrent().asyncExec(() -> {
    FontData fd= control.getFont().getFontData()[0];
    int style= italic ? (fd.getStyle() | SWT.ITALIC) : (fd.getStyle() & ~SWT.ITALIC);
    control.setFont(new Font(control.getDisplay(), new FontData(fd.getName(), fd.getHeight(), style)));
    if (control instanceof Composite)
      ((Composite) control).layout();
  });
}
origin: org.eclipse.rap/org.eclipse.rap.jface

/**
 * Returns a copy of the original FontData
 * 
 * @param next FontData to copy
 * @return a copy of the given FontData
 */
public static FontData copy(FontData next) {
  FontData result = new FontData(next.getName(), next.getHeight(), next.getStyle());
  result.setLocale(next.getLocale());
  return result;
}
origin: org.eclipse.mylyn.wikitext/ui

private FontData[] createFontData(FontState fontState, Font baseFont) {
  FontData[] fontData = new FontData[baseFont.getFontData().length];
  int index = -1;
  for (FontData fd : baseFont.getFontData()) {
    fontData[++index] = new FontData(fd.getName(), fd.getHeight(), fd.getStyle());
  }
  return applyFontState(fontState, fontData);
}
org.eclipse.swt.graphicsFontDatagetStyle

Javadoc

Returns the style of the receiver which is a bitwise OR of one or more of the SWT constants NORMAL, BOLD and ITALIC.

Popular methods of FontData

  • getHeight
    Returns the height of the receiver in points.
  • setHeight
    Sets the height of the receiver. The parameter is specified in terms of points, where a point is one
  • getName
    Returns the name of the receiver. On platforms that support font foundries, the return value will be
  • setStyle
    Sets the style of the receiver to the argument which must be a bitwise OR of one or more of the SWT
  • <init>
    Constructs a new font data given the Windows LOGFONT that it should represent.
  • equals
    Compares the argument to the receiver, and returns true if they represent the same object using a c
  • setName
    Sets the name of the receiver. Some platforms support font foundries. On these platforms, the name o
  • hashCode
    Returns an integer hash code for the receiver. Any two objects that return true when passed toequal
  • toString
    Returns a string representation of the receiver which is suitable for constructing an equivalent ins
  • getHeightF
  • getLocale
    Returns the locale of the receiver. The locale determines which platform character set this font is
  • setLocale
    Sets the locale of the receiver. The locale determines which platform character set this font is goi
  • getLocale,
  • setLocale,
  • checkFontStyle,
  • win32_new

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • BoxLayout (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now