|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.options.Option
public class Option
| Field Summary |
|---|
| Fields inherited from interface megamek.common.options.IOption |
|---|
BOOLEAN, CHOICE, FLOAT, INTEGER, STRING |
| Constructor Summary | |
|---|---|
Option(IOptions owner,
java.lang.String name,
boolean defaultValue)
|
|
Option(IOptions owner,
java.lang.String name,
float defaultValue)
|
|
Option(IOptions owner,
java.lang.String name,
int defaultValue)
|
|
Option(IOptions owner,
java.lang.String name,
int type,
java.lang.Object defaultValue)
|
|
Option(IOptions owner,
java.lang.String name,
java.lang.String defaultValue)
|
|
Option(IOptions owner,
java.lang.String name,
java.util.Vector<java.lang.String> defaultValue)
|
|
| Method Summary | |
|---|---|
boolean |
booleanValue()
Return the value as the boolean |
void |
clearValue()
Resets the value to its "default" state |
float |
floatValue()
Return the value as the float |
java.lang.Object |
getDefault()
Returns default option value |
java.lang.String |
getDescription()
Return verbose description of the option suitable for context help, tip etc. |
java.lang.String |
getDisplayableName()
Returns the user friendly name suitable for displaying in the options editor dialogs etc. |
java.lang.String |
getDisplayableNameWithValue()
Returns the user friendly name suitable for displaying in cases where not only the Name but also it value is required (like edge). |
java.lang.String |
getName()
Returns the option name |
IOptions |
getOwner()
Returns this option container - GameOptions, PilotOptions etc |
int |
getTextFieldLength()
returns the length of the textfield (how many characters). |
int |
getType()
Returns option type. |
java.lang.Object |
getValue()
Returns the option value |
int |
intValue()
Return the value as the int |
boolean |
isLabelBeforeTextField()
returns on which side of the text field the label is. |
void |
setValue(boolean value)
Sets the boolean value |
void |
setValue(float value)
Sets the float value |
void |
setValue(int value)
Sets the int value |
void |
setValue(java.lang.Object value)
Sets the value |
void |
setValue(java.lang.String value)
Sets the String value |
java.lang.String |
stringValue()
Return the value as the String |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Option(IOptions owner,
java.lang.String name,
java.lang.String defaultValue)
public Option(IOptions owner,
java.lang.String name,
boolean defaultValue)
public Option(IOptions owner,
java.lang.String name,
int defaultValue)
public Option(IOptions owner,
java.lang.String name,
float defaultValue)
public Option(IOptions owner,
java.lang.String name,
java.util.Vector<java.lang.String> defaultValue)
public Option(IOptions owner,
java.lang.String name,
int type,
java.lang.Object defaultValue)
| Method Detail |
|---|
public IOptions getOwner()
IOption
getOwner in interface IOptionpublic java.lang.String getName()
IBasicOption
getName in interface IBasicOptionpublic java.lang.String getDisplayableNameWithValue()
IOptionInfo
getDisplayableNameWithValue in interface IOptionInfopublic java.lang.String getDisplayableName()
IOptionInfo
getDisplayableName in interface IOptionInfopublic java.lang.String getDescription()
IOptionInfo
getDescription in interface IOptionInfopublic int getTextFieldLength()
IOptionInfo
getTextFieldLength in interface IOptionInfopublic boolean isLabelBeforeTextField()
IOptionInfo
isLabelBeforeTextField in interface IOptionInfopublic int getType()
IOption
getType in interface IOptionetcpublic java.lang.Object getDefault()
IOption
getDefault in interface IOptionpublic java.lang.Object getValue()
IBasicOption
getValue in interface IBasicOptionpublic boolean booleanValue()
IOptionboolean
booleanValue in interface IOptionpublic int intValue()
IOptionint
intValue in interface IOptionpublic float floatValue()
IOptionfloat
floatValue in interface IOptionpublic java.lang.String stringValue()
IOptionString
stringValue in interface IOptionpublic void setValue(java.lang.Object value)
IOption
setValue in interface IOptionvalue - value to setpublic void setValue(java.lang.String value)
IOptionString value
setValue in interface IOptionvalue - value to setpublic void setValue(boolean value)
IOptionboolean value
setValue in interface IOptionvalue - value to setpublic void setValue(int value)
IOptionint value
setValue in interface IOptionvalue - value to setpublic void setValue(float value)
IOptionfloat value
setValue in interface IOptionvalue - value to setpublic void clearValue()
IOption
clearValue in interface IOption
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||