|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsk.upjs.fontmapper.Main
public class Main
Main class. Handles command line input.
| Field Summary | |
|---|---|
private static boolean |
antialiasing_
Use font antialiasing? |
private static java.lang.String |
baseFileName_
Base file name of output images (i.e. |
private static org.apache.commons.cli.CommandLine |
cmd_
Provides access to command lin arguments |
private static int |
colorMode_
Color mode to use (bitmap, grayscale or rgba). |
private static char |
endGlyph_
Glyphs to start and end drawing at (_endGlyph is not drawn, _startGlyph is). |
private static java.lang.String |
fontName_
Name of the font to use. |
private static int |
fontSize_
Font size in points. |
private static int |
fontStyle_
Font style to use. |
private static org.apache.commons.cli.Options |
options_
Stores command line options |
private static java.awt.Dimension |
pageSize_
Texture page size. |
private static org.apache.commons.cli.CommandLineParser |
parser_
Parses command line arguments |
private static int |
spacing_
Spacing between glyphs on the texture. |
private static char |
startGlyph_
Glyphs to start and end drawing at (_endGlyph is not drawn, _startGlyph is). |
| Constructor Summary | |
|---|---|
Main()
|
|
| Method Summary | |
|---|---|
private static void |
addOptions_()
Specifies command line options, their help messages and arguments. |
private static void |
help_()
Output help information. |
private static void |
inputError_(java.lang.String message)
Output a message about an input error and help information. |
static void |
main(java.lang.String[] args)
|
private static int |
optionValueInt_(java.lang.String option,
int def)
Get an argument of an option as an integer. |
private static java.lang.String |
optionValueString_(java.lang.String option,
java.lang.String def)
Get an argument of an option as a string. |
private static boolean |
parseInput_(java.lang.String[] args)
Reads input from command line options and arguments. |
private static boolean |
validFileName_(java.lang.String name)
Validate a file name to detect input errors |
private static boolean |
verifyInput_()
Verifies validity of read input values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static org.apache.commons.cli.Options options_
private static org.apache.commons.cli.CommandLineParser parser_
private static org.apache.commons.cli.CommandLine cmd_
private static java.lang.String baseFileName_
private static java.lang.String fontName_
private static int fontSize_
private static boolean antialiasing_
private static int colorMode_
private static java.awt.Dimension pageSize_
private static char startGlyph_
private static char endGlyph_
private static int spacing_
private static int fontStyle_
| Constructor Detail |
|---|
public Main()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
private static boolean parseInput_(java.lang.String[] args)
private static boolean verifyInput_()
private static void addOptions_()
private static int optionValueInt_(java.lang.String option,
int def)
throws java.lang.Exception
option - Option to read.def - Default value to return if the option is not specified.
java.lang.Exception - if the argument could not be parsed.
private static java.lang.String optionValueString_(java.lang.String option,
java.lang.String def)
option - Option to read.def - Default value to return if the option is not specified.
private static void help_()
private static void inputError_(java.lang.String message)
message - Message to output.private static boolean validFileName_(java.lang.String name)
name - File name to validate.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||