|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdip.order.OrderFormatOptions
This object controls, in detail, how orders are formatted.
Several static methods for default order formats are supported. Remember that the static methods create mutable objects that can be modified.
Styles define how an order appears (e.g., upper case, lower case, none). Styles are applied after all formatting.
Formats define how an order is displayed.
Possessive Powers are the powers in Support and Convoy orders that can be displayed if supporting a unit that is of a different power.
Debug Mode displays full coasts, and null items with their type.
Field Summary | |
static java.lang.String |
ARROW_DEFAULT
The Default Movement arrow |
static java.lang.String |
ARROW_UNICODE
A fancier Unicode Movement arrow |
static java.lang.String[] |
ARROWS
A list of all Movement arrows |
static char |
COAST_SEP_HYPEN
Coast Separator: hyphen |
static char |
COAST_SEP_NONE
Coast Separator: none (a space; used for parenthetical coasts) |
static char |
COAST_SEP_SLASH
Coast Separator: forward slash |
static int |
FORMAT_BRIEF
Brief (abbreviated) format |
static int |
FORMAT_COAST_PAREN_BRIEF
For coasts only: abbreviated, in parentheses |
static int |
FORMAT_COAST_PAREN_FULL
For coasts only: non-abbreviated, in parentheses |
static int |
FORMAT_FULL
Full (non-abbreviated) format |
static int |
STYLE_LOWER
Lower case |
static int |
STYLE_NONE
Default style (no modification) |
static int |
STYLE_PLURAL_LOWER
Plural (adds an 's') Lower case |
static int |
STYLE_PLURAL_NONE
Plural (adds an 's') Default style (no modification) |
static int |
STYLE_PLURAL_TITLE
Plural (adds an 's') Title case (first word only) |
static int |
STYLE_PLURAL_TITLE_ALL
Plural (adds an 's') Title case (all words) |
static int |
STYLE_PLURAL_UPPER
Plural (adds an 's') Upper case |
static int |
STYLE_TITLE
Title case (first word only) |
static int |
STYLE_TITLE_ALL
Title case (all words) |
static int |
STYLE_UPPER
Upper case |
Constructor Summary | |
OrderFormatOptions()
Create an OrderFormatOptions object. |
Method Summary | |
java.lang.Object |
clone()
Clone |
static OrderFormatOptions |
createDebug()
Create an OrderFormatOptions object with the debug settings. |
static OrderFormatOptions |
createDefault()
Create an OrderFormatOptions object with the default settings. |
static OrderFormatOptions |
createNJudge()
Create an OrderFormatOptions object with the NJudge settings. |
static OrderFormatOptions |
createTerse()
Create an OrderFormatOptions object with the terse settings. |
static OrderFormatOptions |
createVerbose()
Create an OrderFormatOptions object with the verbose settings. |
static OrderFormatOptions |
decode(byte[] in,
OrderFormatOptions defaultOptions)
Decode an encoded String into the appropriate OrderFormatOptions |
byte[] |
encode()
Encode this object as a compact String |
java.lang.String |
getArrow()
Get the Movement Arrow |
int |
getCoastFormat()
Gets the Coast Format |
char |
getCoastSeparator()
Returns the Coast Separator, or returns COAST_SEP_NONE (a space), if coasts are to be formatted in parentheses. |
int |
getCoastStyle()
Gets the Coast Style |
boolean |
getEndWithDot()
Indicates if orders should end with a period |
int |
getOrderNameFormat()
Gets the Order Name Format |
int |
getOrderNameStyle()
Gets the Order Name Style |
int |
getPowerFormat()
Gets the Power Format |
int |
getPowerStyle()
Gets the Power Style |
int |
getProvinceFormat()
Gets the Province Format |
int |
getProvinceStyle()
Gets the Province Style |
boolean |
getShowPossessivePower()
Indicates if Posessive Powers should be shown |
int |
getUnitFormat()
Gets the Unit Format |
int |
getUnitStyle()
Gets the Unit Style |
boolean |
isDebug()
Indicates if debug mode is enabled |
void |
setArrow(java.lang.String value)
Sets the Movement Arrow |
void |
setCoastFormat(int fmt)
Sets the Coast Format |
void |
setCoastSeparator(char value)
Set the character that separates the Province from the Coast |
void |
setCoastStyle(int style)
Sets the Coast Style |
void |
setDebug(boolean value)
When true , the Coast of a Location is always printed
(even if, for example, it is a "/mv" coast). |
void |
setEndWithDot(boolean value)
Sets if order should end with a period. |
void |
setOrderNameFormat(int fmt)
Sets the Order Name Format |
void |
setOrderNameStyle(int style)
Sets the Order Name Style |
void |
setPowerFormat(int fmt)
Sets the Power Format |
void |
setPowerStyle(int style)
Sets the Power Style |
void |
setProvinceFormat(int fmt)
Sets the Province Format |
void |
setProvinceStyle(int style)
Sets the Province Style |
void |
setShowPossessivePower(boolean value)
Sets if Possessive Powers are displayed |
void |
setUnitFormat(int fmt)
Sets the Unit Format |
void |
setUnitStyle(int style)
Sets the Unit Style |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STYLE_NONE
public static final int STYLE_LOWER
public static final int STYLE_UPPER
public static final int STYLE_TITLE
public static final int STYLE_TITLE_ALL
public static final int STYLE_PLURAL_NONE
public static final int STYLE_PLURAL_LOWER
public static final int STYLE_PLURAL_UPPER
public static final int STYLE_PLURAL_TITLE
public static final int STYLE_PLURAL_TITLE_ALL
public static final int FORMAT_BRIEF
public static final int FORMAT_FULL
public static final int FORMAT_COAST_PAREN_BRIEF
public static final int FORMAT_COAST_PAREN_FULL
public static final java.lang.String ARROW_DEFAULT
public static final java.lang.String ARROW_UNICODE
public static final java.lang.String[] ARROWS
public static final char COAST_SEP_SLASH
public static final char COAST_SEP_HYPEN
public static final char COAST_SEP_NONE
Constructor Detail |
public OrderFormatOptions()
Method Detail |
public static OrderFormatOptions createDefault()
public static OrderFormatOptions createTerse()
public static OrderFormatOptions createVerbose()
public static OrderFormatOptions createNJudge()
public static OrderFormatOptions createDebug()
public int getProvinceStyle()
public int getCoastStyle()
public int getPowerStyle()
public int getUnitStyle()
public int getOrderNameStyle()
public int getProvinceFormat()
public int getCoastFormat()
public int getPowerFormat()
public int getUnitFormat()
public int getOrderNameFormat()
public java.lang.String getArrow()
public boolean getShowPossessivePower()
public boolean getEndWithDot()
public boolean isDebug()
public char getCoastSeparator()
public void setProvinceStyle(int style)
public void setCoastStyle(int style)
public void setPowerStyle(int style)
public void setUnitStyle(int style)
public void setOrderNameStyle(int style)
public void setProvinceFormat(int fmt)
public void setCoastFormat(int fmt)
public void setPowerFormat(int fmt)
public void setUnitFormat(int fmt)
public void setOrderNameFormat(int fmt)
public void setArrow(java.lang.String value)
public void setShowPossessivePower(boolean value)
public void setEndWithDot(boolean value)
public void setDebug(boolean value)
true
, the Coast of a Location is always printed
(even if, for example, it is a "/mv" coast). Furthermore, if a
variable is null, it will be output as null and followed by its
type (in brackets); e.g.: "null[Location]", instead of being
ignored.
public void setCoastSeparator(char value)
public byte[] encode()
public static OrderFormatOptions decode(byte[] in, OrderFormatOptions defaultOptions)
public java.lang.Object clone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |