|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.util.HersheyFont
public class HersheyFont
HersheyFont supports the Hershey Fonts for VisAD. Adapted from the original code by Buzbee (see source)
Field Summary | |
---|---|
protected int[] |
characterMaxX
|
protected int[] |
characterMinX
|
protected int |
characterSetMaxX
|
protected int |
characterSetMaxY
|
protected int |
characterSetMinX
|
protected int |
characterSetMinY
|
protected int |
charactersInSet
|
protected char[][][] |
characterVectors
|
protected boolean |
fixedWidth
|
protected String |
name
|
protected int[] |
numberOfPoints
|
protected static int |
X
|
protected static int |
Y
|
Constructor Summary | |
---|---|
HersheyFont()
Default constructor. |
|
HersheyFont(String fontName)
Get a Hershey Font by name. |
|
HersheyFont(URL base)
Get a Hershey Font by URL. |
|
HersheyFont(URL base,
String fontName)
Get a Hershey Font by URL and name. |
Method Summary | |
---|---|
protected void |
calculateCharacterSize(int j,
int xadj)
|
boolean |
equals(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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int X
protected static final int Y
protected String name
protected char[][][] characterVectors
protected int[] numberOfPoints
protected int[] characterMinX
protected int[] characterMaxX
protected int characterSetMinY
protected int characterSetMaxY
protected int characterSetMinX
protected int characterSetMaxX
protected int charactersInSet
protected boolean fixedWidth
Constructor Detail |
---|
public HersheyFont()
public HersheyFont(String fontName)
fontName
- name of the Hershey font to usepublic HersheyFont(URL base, String fontName)
base
- is the base URL of the filefontName
- the name of the fontfile (include .jhf extension)public HersheyFont(URL base)
base
- is the URL of the file (e.g.,
http://www.ssec.wisc.edu/visad/futural.jhf)Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hasCode()
public int getMaxPoints()
public int[] getCharacterMinX()
public int[] getCharacterMaxX()
public int getCharacterSetMinY()
public int getCharacterSetMaxY()
public int getCharacterSetMinX()
public int getCharacterSetMaxX()
public int getCharactersInSet()
public int getNumberOfPoints(int i)
i
- the index of the character
public char[][] getCharacterVector(int i)
i
- the index of the character
public void setFixedWidth(boolean fw)
public boolean getFixedWidth()
public boolean getIsCursive()
protected void calculateCharacterSize(int j, int xadj)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |