Platypus

org.pz.platypus
Class FontDirectoryList

java.lang.Object
  extended by org.pz.platypus.FontDirectoryList

public class FontDirectoryList
extends java.lang.Object

List of directories containing font files.


Field Summary
private  java.util.LinkedList<java.lang.String> fontDirs
          list of directories containing font files
private  GDD gdd
          the GDD.
 
Constructor Summary
FontDirectoryList(GDD Gdd)
          We only ever load the default list of directories.
 
Method Summary
private  void addFontDir(java.util.LinkedList<java.lang.String> dirList, java.lang.String dirName)
          verifies that the directory name exists on this system.
 java.lang.String[] getDirs()
          Get the names of the default locations for font files and return those locations as an array of strings
 void loadDefaultFontDirs(java.util.LinkedList<java.lang.String> dirs)
          Create a list of the directories on the system that contain fonts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fontDirs

private java.util.LinkedList<java.lang.String> fontDirs
list of directories containing font files


gdd

private GDD gdd
the GDD. Used to obtain the PLATYPUS_HOME directory

Constructor Detail

FontDirectoryList

public FontDirectoryList(GDD Gdd)
We only ever load the default list of directories. At some future point, we will allow users to specify directories that contain additional fonts.

Parameters:
Gdd - the GDD
Method Detail

loadDefaultFontDirs

public void loadDefaultFontDirs(java.util.LinkedList<java.lang.String> dirs)
Create a list of the directories on the system that contain fonts. We use the directories that are employed by iText and we add the Platypus font directory (in PLATYPUS_HOME) and the font files included with the Java JVM.

Parameters:
dirs - the linked list of directories to add fonts to

addFontDir

private void addFontDir(java.util.LinkedList<java.lang.String> dirList,
                        java.lang.String dirName)
verifies that the directory name exists on this system. If so, adds it to the directory list; otherwise, does nothing.

Parameters:
dirList - list of directories to which the new directory is added
dirName - new directory to add. If an error occurs, no directory is added.

getDirs

public java.lang.String[] getDirs()
Get the names of the default locations for font files and return those locations as an array of strings

Returns:
an array of strings, each one containing the name of a directory holding font files.

Platypus

Copyright © 2006-10 Pacific Data Works LLC. (platypus.pz.org)