congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Font.dispose
Code IndexAdd Tabnine to your IDE (free)

How to use
dispose
method
in
org.eclipse.swt.graphics.Font

Best Java code snippets using org.eclipse.swt.graphics.Font.dispose (Showing top 20 results out of 630)

origin: caoxinyu/RedisClient

/**
 * Dispose all of the cached {@link Font}'s.
 */
public static void disposeFonts() {
  // clear fonts
  for (Font font : m_fontMap.values()) {
    font.dispose();
  }
  m_fontMap.clear();
  // clear bold fonts
  for (Font font : m_fontToBoldFontMap.values()) {
    font.dispose();
  }
  m_fontToBoldFontMap.clear();
}
////////////////////////////////////////////////////////////////////////////
origin: pentaho/pentaho-kettle

/**
 * Free the managed resource if it hasn't already been done and if this is not a system font
 *
 */
public void dispose() {
 // System color and already disposed off colors don't need to be disposed!
 if ( !systemFont && !font.isDisposed() ) {
  font.dispose();
 }
}
origin: pentaho/pentaho-kettle

 @Override
 public void widgetDisposed( DisposeEvent e ) {
  if ( clipboard != null ) {
   clipboard.dispose();
   clipboard = null;
  }
  if ( gridFont != null ) {
   gridFont.dispose();
  }
 }
} );
origin: pentaho/pentaho-kettle

public void dispose() {
 fixedFont.dispose();
 graphFont.dispose();
 noteFont.dispose();
 background.dispose();
 graphColor.dispose();
 tabColor.dispose();
 shell.dispose();
}
origin: pentaho/pentaho-kettle

 public void widgetDisposed( DisposeEvent arg0 ) {
  kettle_image.dispose();
  kettle_icon.dispose();
  exclamation_image.dispose();
  verFont.dispose();
  licFont.dispose();
  devWarningFont.dispose();
  versionWarningForegroundColor.dispose();
  versionWarningBackgroundColor.dispose();
 }
} );
origin: pentaho/pentaho-kettle

public void setFont( String fontName, int fontSize, boolean fontBold, boolean fontItalic ) {
 int swt = SWT.NORMAL;
 if ( fontBold ) {
  swt = SWT.BOLD;
 }
 if ( fontItalic ) {
  swt = swt | SWT.ITALIC;
 }
 Font font = new Font( PropsUI.getDisplay(), fontName, fontSize, swt );
 int index = fonts.indexOf( font );
 if ( index < 0 ) {
  fonts.add( font );
 } else {
  font.dispose();
  font = fonts.get( index );
 }
 gc.setFont( font );
}
origin: pentaho/pentaho-kettle

public void setFont( String fontName, int fontSize, boolean fontBold, boolean fontItalic ) {
 int swt = SWT.NORMAL;
 if ( fontBold ) {
  swt = SWT.BOLD;
 }
 if ( fontItalic ) {
  swt = swt | SWT.ITALIC;
 }
 Font font = new Font( PropsUI.getDisplay(), fontName, fontSize, swt );
 int index = fonts.indexOf( font );
 if ( index < 0 ) {
  fonts.add( font );
 } else {
  font.dispose();
  font = fonts.get( index );
 }
 gc.setFont( font );
}
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  graphFont.dispose();
  graphFontData = props.getDefaultFontData();
  graphFont = new Font( display, graphFontData );
  wGFont.redraw();
 }
} );
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  noteFontData = props.getDefaultFontData();
  noteFont.dispose();
  noteFont = new Font( display, noteFontData );
  wNFont.redraw();
 }
} );
origin: pentaho/pentaho-kettle

public static void setGCFont( GC gc, Device device, FontData fontData ) {
 if ( Const.getOS().startsWith( "Windows" ) ) {
  Font font = new Font( device, fontData );
  gc.setFont( font );
  font.dispose();
 } else {
  gc.setFont( device.getSystemFont() );
 }
}
origin: pentaho/pentaho-kettle

public void dispose() {
 gc.dispose();
 if ( transform != null && transform.isDisposed() == false ) {
  transform.dispose();
 }
 for ( Color color : colors ) {
  color.dispose();
 }
 for ( Font font : fonts ) {
  font.dispose();
 }
}
origin: pentaho/pentaho-kettle

public void dispose() {
 gc.dispose();
 if ( transform != null && transform.isDisposed() == false ) {
  transform.dispose();
 }
 for ( Color color : colors ) {
  color.dispose();
 }
 for ( Font font : fonts ) {
  font.dispose();
 }
}
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  FontDialog fd = new FontDialog( shell );
  fd.setFontList( new FontData[] { fixedFontData } );
  FontData newfd = fd.open();
  if ( newfd != null ) {
   fixedFontData = newfd;
   fixedFont.dispose();
   fixedFont = new Font( display, fixedFontData );
   wFFont.redraw();
  }
 }
} );
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  FontDialog fd = new FontDialog( shell );
  fd.setFontList( new FontData[] { graphFontData } );
  FontData newfd = fd.open();
  if ( newfd != null ) {
   graphFontData = newfd;
   graphFont.dispose();
   graphFont = new Font( display, graphFontData );
   wGFont.redraw();
  }
 }
} );
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  FontDialog fd = new FontDialog( shell );
  fd.setFontList( new FontData[] { noteFontData } );
  FontData newfd = fd.open();
  if ( newfd != null ) {
   noteFontData = newfd;
   noteFont.dispose();
   noteFont = new Font( display, noteFontData );
   wNFont.redraw();
  }
 }
} );
origin: pentaho/pentaho-kettle

 private void refreshTextNote() {
  int swt = SWT.NORMAL;
  if ( wFontBold.getSelection() ) {
   swt = SWT.BOLD;
  }
  if ( wFontItalic.getSelection() ) {
   swt = swt | SWT.ITALIC;
  }
  // dispose of old font only after setting it on wDesc
  Font oldFont = font;
  font = new Font( shell.getDisplay(), wFontName.getText(), wFontSize.getSelection(), swt );
  wDesc.setFont( font );
  if ( oldFont != null && !oldFont.isDisposed() ) {
   oldFont.dispose();
  }
  for ( Control control : wDesc.getChildren() ) {
   control.setBackground( bgColor );
  }

  wFontColor.setBackground( fontColor );
  wBackGroundColor.setBackground( bgColor );
  wBorderColor.setBackground( borderColor );
 }
}
origin: pentaho/pentaho-kettle

public void dispose() {
 props.setScreen( new WindowProperty( shell ) );
 fontColor.dispose();
 bgColor.dispose();
 borderColor.dispose();
 if ( font != null && !font.isDisposed() ) {
  font.dispose();
 }
 shell.dispose();
}
origin: pentaho/pentaho-kettle

licFontSize--;
if ( licFont != null ) {
 licFont.dispose();
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: stackoverflow.com

 Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
Label label = new Label(shell, SWT.NONE);
label.setText("I am italic");
FontData fontData = label.getFont().getFontData()[0];
Font font = new Font(display, new FontData(fontData.getName(), fontData
  .getHeight(), SWT.ITALIC));
label.setFont(font);
shell.open();
while (!shell.isDisposed()) {
 if (!display.readAndDispatch())
  display.sleep();
}
font.dispose();
display.dispose();
org.eclipse.swt.graphicsFontdispose

Popular methods of Font

  • getFontData
    Returns an array of FontDatas representing the receiver. On Windows, only one FontData will be retur
  • <init>
  • isDisposed
    Returns true if the font has been disposed, and false otherwise. This method gets the dispose state
  • equals
    Compares the argument to the receiver, and returns true if they represent the same object using a c
  • getDevice
  • hashCode
    Returns an integer hash code for the receiver. Any two objects that return true when passed toequal
  • init
  • gtk_new
    Invokes platform specific functionality to allocate a new font.IMPORTANT: This method is not part of
  • addTraits
  • checkDevice
  • cocoa_new
    Invokes platform specific functionality to allocate a new font.IMPORTANT: This method is not part of
  • findFontData
  • cocoa_new,
  • findFontData,
  • win32_new

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • From CI to AI: The AI layer in your organization
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