net.sourceforge.rssowl.util.shop
Class FontShop

java.lang.Object
  extended bynet.sourceforge.rssowl.util.shop.FontShop

public class FontShop
extends Object

Factory class for some Font / -style concerns in RSSOwl

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
static org.eclipse.swt.graphics.Font dialogBoldFont
          Dialog bold font
static org.eclipse.swt.graphics.Font dialogFont
          Font for the Dialogs
static org.eclipse.swt.graphics.Font headerBoldFont
          Bold Font for the ViewForm headers and TabItem titles
static org.eclipse.swt.graphics.Font headerFont
          Font for the ViewForm headers and TabItem titles
static org.eclipse.swt.graphics.Font tableBoldFont
          Bold Font for the table holding news
static org.eclipse.swt.graphics.Font tableFont
          Font for the table holding news
static org.eclipse.swt.graphics.Font textBoldFont
          Bold font for the Text
static org.eclipse.swt.graphics.Font textFont
          Font for the newstext
static org.eclipse.swt.graphics.Font treeBoldFont
          Font for the tree holding favorites (Bold)
static org.eclipse.swt.graphics.Font treeFont
          Font for the tree holding favorites
 
Constructor Summary
private FontShop()
          This utility class constructor is hidden
 
Method Summary
private static org.eclipse.swt.graphics.Font createBoldFont(org.eclipse.swt.graphics.Font sourceFont)
          Create a new Font using the given one and making it Bold
static org.eclipse.swt.graphics.Font createFont()
          Create a Font using the system font
static org.eclipse.swt.graphics.Font createFont(int height)
          Create a Font from the given height
static org.eclipse.swt.graphics.Font createFont(int height, int style)
          Create a Font from the given height and style
static org.eclipse.swt.graphics.Font createFont(String name, int height, int style)
          Create a Font from the given name, height and style
static void disposeFonts()
          Dispose fonts
static org.eclipse.swt.graphics.FontData[] getFontData()
          Get the FontData array using the given Font information on the system font fontdata
static org.eclipse.swt.graphics.FontData[] getFontData(int height)
          Get the FontData array using the given Font information on the system font fontdata
static org.eclipse.swt.graphics.FontData[] getFontData(String name, int height, int style)
          Get the FontData array using the given Font information on the system font fontdata
private static void initStyledFonts()
          Init all styled (bold) fonts
static boolean isset(org.eclipse.swt.graphics.Font font)
          Check the given Font for being NULL or disposed.
static void setFontForAll(GUI rssOwlGui)
          Update fonts for all controls in RSSOwl
static void updateFonts()
          Update styled fonts and the dialog font used by JFace dialogs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dialogBoldFont

public static org.eclipse.swt.graphics.Font dialogBoldFont
Dialog bold font


dialogFont

public static org.eclipse.swt.graphics.Font dialogFont
Font for the Dialogs


headerBoldFont

public static org.eclipse.swt.graphics.Font headerBoldFont
Bold Font for the ViewForm headers and TabItem titles


headerFont

public static org.eclipse.swt.graphics.Font headerFont
Font for the ViewForm headers and TabItem titles


tableBoldFont

public static org.eclipse.swt.graphics.Font tableBoldFont
Bold Font for the table holding news


tableFont

public static org.eclipse.swt.graphics.Font tableFont
Font for the table holding news


textBoldFont

public static org.eclipse.swt.graphics.Font textBoldFont
Bold font for the Text


textFont

public static org.eclipse.swt.graphics.Font textFont
Font for the newstext


treeBoldFont

public static org.eclipse.swt.graphics.Font treeBoldFont
Font for the tree holding favorites (Bold)


treeFont

public static org.eclipse.swt.graphics.Font treeFont
Font for the tree holding favorites

Constructor Detail

FontShop

private FontShop()
This utility class constructor is hidden

Method Detail

createFont

public static org.eclipse.swt.graphics.Font createFont()
Create a Font using the system font

Returns:
Font The new Font from the system font

createFont

public static org.eclipse.swt.graphics.Font createFont(int height)
Create a Font from the given height

Parameters:
height - The height of the new Font
Returns:
Font The new Font from the given Font information

createFont

public static org.eclipse.swt.graphics.Font createFont(int height,
                                                       int style)
Create a Font from the given height and style

Parameters:
height - The height of the new Font
style - The style of the new Font
Returns:
Font The new Font from the given Font information

createFont

public static org.eclipse.swt.graphics.Font createFont(String name,
                                                       int height,
                                                       int style)
Create a Font from the given name, height and style

Parameters:
name - The name of the new Font
height - The height of the new Font
style - The style of the new Font
Returns:
Font The new Font from the given Font information

disposeFonts

public static void disposeFonts()
Dispose fonts


getFontData

public static org.eclipse.swt.graphics.FontData[] getFontData()
Get the FontData array using the given Font information on the system font fontdata

Returns:
FontData The FontData from the system font

getFontData

public static org.eclipse.swt.graphics.FontData[] getFontData(int height)
Get the FontData array using the given Font information on the system font fontdata

Parameters:
height - The height of the Font
Returns:
FontData The FontData array using the given Font information

getFontData

public static org.eclipse.swt.graphics.FontData[] getFontData(String name,
                                                              int height,
                                                              int style)
Get the FontData array using the given Font information on the system font fontdata

Parameters:
name - The name of the Font
height - The height of the Font
style - The style of the Font
Returns:
FontData The FontData array using the given Font information

isset

public static boolean isset(org.eclipse.swt.graphics.Font font)
Check the given Font for being NULL or disposed. Return false in that case.

Parameters:
font - The font to check
Returns:
boolean TRUE if the font is available

setFontForAll

public static void setFontForAll(GUI rssOwlGui)
Update fonts for all controls in RSSOwl

Parameters:
rssOwlGui - The maincontroller

updateFonts

public static void updateFonts()
Update styled fonts and the dialog font used by JFace dialogs


createBoldFont

private static org.eclipse.swt.graphics.Font createBoldFont(org.eclipse.swt.graphics.Font sourceFont)
Create a new Font using the given one and making it Bold

Parameters:
sourceFont - The source Font object
Returns:
Font The Font in Bold

initStyledFonts

private static void initStyledFonts()
Init all styled (bold) fonts



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo