Class ManagedFont

java.lang.Object
org.pentaho.di.ui.core.gui.ManagedFont

public class ManagedFont extends Object
Class to keep track of which font is a system font (managed by the OS) and which is not.
Since:
2006-06-15
Author:
Matt
  • Constructor Summary

    Constructors
    Constructor
    Description
    ManagedFont(org.eclipse.swt.graphics.Font font, boolean systemFont)
     
    ManagedFont(org.eclipse.swt.widgets.Display display, org.eclipse.swt.graphics.FontData fontData)
    Create a new managed font by using fontdata
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Free the managed resource if it hasn't already been done and if this is not a system font
    org.eclipse.swt.graphics.Font
     
    boolean
     
    void
    setFont(org.eclipse.swt.graphics.Font font)
     
    void
    setSystemFont(boolean systemFont)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ManagedFont

      public ManagedFont(org.eclipse.swt.graphics.Font font, boolean systemFont)
      Parameters:
      font - The font
      systemFont - true if this is a system font and doesn't need to be disposed off
    • ManagedFont

      public ManagedFont(org.eclipse.swt.widgets.Display display, org.eclipse.swt.graphics.FontData fontData)
      Create a new managed font by using fontdata
      Parameters:
      display - the display to use
      fontData - The fontdata to create the font with.
  • Method Details

    • dispose

      public void dispose()
      Free the managed resource if it hasn't already been done and if this is not a system font
    • getFont

      public org.eclipse.swt.graphics.Font getFont()
      Returns:
      Returns the font.
    • isSystemFont

      public boolean isSystemFont()
      Returns:
      true if this is a system font.
    • setFont

      public void setFont(org.eclipse.swt.graphics.Font font)
      Parameters:
      font - the font to set
    • setSystemFont

      public void setSystemFont(boolean systemFont)
      Parameters:
      systemFont - the systemFont to set