Documentation of 'visad.util.HersheyFont' Java class
HersheyFont
visad.util

Class HersheyFont



  • public class HersheyFont
    extends java.lang.Object
    HersheyFont supports the Hershey Fonts for VisAD. Adapted from the original code by Buzbee (see source)
    • Constructor Summary

      Constructors 
      Constructor and Description
      HersheyFont()
      Default constructor.
      HersheyFont(java.lang.String fontName)
      Get a Hershey Font by name.
      HersheyFont(java.net.URL base)
      Get a Hershey Font by URL.
      HersheyFont(java.net.URL base, java.lang.String fontName)
      Get a Hershey Font by URL and name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object o)
      See if o is equal to this
      int[] getCharacterMaxX()
      get the maximum X coordinate values for all characters
      int[] getCharacterMinX()
      get the minimum X coordinate values for all characters
      int getCharacterSetMaxX()
      get the maximum X coordiante value for all characters
      int getCharacterSetMaxY()
      get the maximum Y coordiante value for all characters
      int getCharacterSetMinX()
      get the minimum X coordiante value for all characters
      int getCharacterSetMinY()
      get the minimum Y coordiante value for all characters
      int getCharactersInSet()
      get the minimum Y coordiante value for all characters
      char[][] getCharacterVector(int i)
      get the vector of X and Y coordinates for the i-th character
      boolean getFixedWidth()
      indicate whether this is a fixed-width font
      boolean getIsCursive()
      indicate whether this is a cursive font
      int getMaxPoints()
      get the maximum number of points (segments) allowed
      int getNumberOfPoints(int i)
      get the number of points for the i-th character
      int hasCode()
      Get the hashcode
      void setFixedWidth(boolean fw)
      set whether this font is 'fixed width' or not (not = proportional spacing) Right now, only the 'wmo' font is defaulted to fixed.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HersheyFont

        public HersheyFont()
        Default constructor. Use the font 'futural' Supplied fonts are: futural, timesr, timesrb, cursive, futuram, rowmans, rowmant, meteorology All other fonts supplied by Bizbee are available at the VisAD web site. More info at: http://batbox.org/font.html
      • HersheyFont

        public HersheyFont(java.lang.String fontName)
        Get a Hershey Font by name. This constructor form will add a .jhf extension to the name given and read it as a Resourse from the visad/util directory. Supplied fonts are: futural, timesr, timesrb, cursive, futuram, rowmans, rowmant, meteorology All other fonts supplied by Bizbee are available at the VisAD web site.
        Parameters:
        fontName - name of the Hershey font to use
      • HersheyFont

        public HersheyFont(java.net.URL base,
                           java.lang.String fontName)
        Get a Hershey Font by URL and name. You must give the complete filename (e.g., futural.jhf) as well as the URL
        Parameters:
        base - is the base URL of the file
        fontName - the name of the fontfile (include .jhf extension)
      • HersheyFont

        public HersheyFont(java.net.URL base)
        Get a Hershey Font by URL. You must give the complete filename (e.g., futural.jhf) as part of the URL
        Parameters:
        base - is the URL of the file (e.g., http://www.ssec.wisc.edu/visad/futural.jhf)
    • Method Detail

      • equals

        public boolean equals(java.lang.Object o)
        See if o is equal to this
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if they have the same name
      • hasCode

        public int hasCode()
        Get the hashcode
        Returns:
        the hashcode
      • getMaxPoints

        public int getMaxPoints()
        get the maximum number of points (segments) allowed
        Returns:
        value of max number of segments allowed.
      • getCharacterMinX

        public int[] getCharacterMinX()
        get the minimum X coordinate values for all characters
        Returns:
        array of minimum X coordinates
      • getCharacterMaxX

        public int[] getCharacterMaxX()
        get the maximum X coordinate values for all characters
        Returns:
        array of maximum X coordinates
      • getCharacterSetMinY

        public int getCharacterSetMinY()
        get the minimum Y coordiante value for all characters
        Returns:
        minimum Y coordinate value for all characters in thie font
      • getCharacterSetMaxY

        public int getCharacterSetMaxY()
        get the maximum Y coordiante value for all characters
        Returns:
        maximum Y coordinate value for all characters in thie font
      • getCharacterSetMinX

        public int getCharacterSetMinX()
        get the minimum X coordiante value for all characters
        Returns:
        minimum X coordinate value for all characters in thie font
      • getCharacterSetMaxX

        public int getCharacterSetMaxX()
        get the maximum X coordiante value for all characters
        Returns:
        maximum X coordinate value for all characters in thie font
      • getCharactersInSet

        public int getCharactersInSet()
        get the minimum Y coordiante value for all characters
        Returns:
        minimum Y coordinate value for all characters in thie font
      • getNumberOfPoints

        public int getNumberOfPoints(int i)
        get the number of points for the i-th character
        Parameters:
        i - the index of the character
        Returns:
        the number of data points for this character
      • getCharacterVector

        public char[][] getCharacterVector(int i)
        get the vector of X and Y coordinates for the i-th character
        Parameters:
        i - the index of the character
        Returns:
        array[2][number_points] for this character
      • setFixedWidth

        public void setFixedWidth(boolean fw)
        set whether this font is 'fixed width' or not (not = proportional spacing) Right now, only the 'wmo' font is defaulted to fixed.
      • getFixedWidth

        public boolean getFixedWidth()
        indicate whether this is a fixed-width font
        Returns:
        true if name indicates fixed with (wmo...)
      • getIsCursive

        public boolean getIsCursive()
        indicate whether this is a cursive font
        Returns:
        true if name contains "cursive"
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.