private Font convertFont(String s)
{
StringTokenizer stringtokenizer = new StringTokenizer(s, "|");
String s1 = stringtokenizer.nextToken();
String s2 = stringtokenizer.nextToken();
String s3 = stringtokenizer.nextToken();
byte byte0 = -1;
if(s2.trim().toUpperCase().equals("PLAIN"))
byte0 = 0;
else
if(s2.trim().toUpperCase().equals("BOLD"))
byte0 = 1;
else
if(s2.trim().toUpperCase().equals("ITALIC"))
byte0 = 2;
return new Font(s1, byte0, (new Integer(s3)).intValue());
}
private Color convertColor(String s)
{
Color color = null;
if(s.trim().toUpperCase().equals("RED"))
color = Color.red;
else
if(s.trim().toUpperCase().equals("BLACK"))
color = Color.black;
else
if(s.trim().toUpperCase().equals("BLUE"))
color = Color.blue;
else
if(s.trim().toUpperCase().equals("CYAN"))
color = Color.cyan;
else
if(s.trim().toUpperCase().equals("DARKGRAY"))
color = Color.darkGray;
else
if(s.trim().toUpperCase().equals("GRAY"))
color = Color.gray;
else
if(s.trim().toUpperCase().equals("GREEN"))
color = Color.green;
else
if(s.trim().toUpperCase().equals("LIGHTGRAY"))
color = Color.lightGray;
else
if(s.trim().toUpperCase().equals("MAGENTA"))
color = Color.magenta;
else
if(s.trim().toUpperCase().equals("ORANGE"))
color = Color.orange;
else
if(s.trim().toUpperCase().equals("PINK"))
color = Color.pink;
else
if(s.trim().toUpperCase().equals("WHITE"))
color = Color.white;
else
if(s.trim().toUpperCase().equals("YELLOW"))
color = Color.yellow;
return color;
}
public static void main(String[] args) {
// PrintTest myTestPrint = new PrintTest();
// myTestPrint.doPrint();
}
}