|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kiml.LayoutOptionData<T>
T
- data type for the option datapublic class LayoutOptionData<T>
Data type used to store information for a layout option.
Nested Class Summary | |
---|---|
static class |
LayoutOptionData.Target
option target enumeration. |
static class |
LayoutOptionData.Type
data type enumeration. |
Field Summary | |
---|---|
static String[] |
BOOLEAN_CHOICES
choices for boolean type options. |
static String |
BOOLEAN_LITERAL
literal value constant for booleans. |
static String |
DEFAULT_OPTION_NAME
default name for layout options for which no name is given. |
static String |
EDGES_LITERAL
literal value constant for edges target. |
static String |
ENUM_LITERAL
literal value constant for enumerations. |
static String |
FLOAT_LITERAL
literal value constant for floating point numbers. |
static String |
INT_LITERAL
literal value constant for integer numbers. |
static String |
LABELS_LITERAL
literal value constant for labels target. |
static String |
NODES_LITERAL
literal value constant for nodes target. |
static String |
OBJECT_LITERAL
literal value constant for data objects. |
static String |
PARENTS_LITERAL
literal value constant for diagram target. |
static String |
PORTS_LITERAL
literal value constant for ports target. |
static String |
REMOTEENUM_LITERAL
literal value constant for enumeration coming from remote layout. |
static String |
STRING_LITERAL
literal value constant for strings. |
Constructor Summary | |
---|---|
LayoutOptionData()
|
Method Summary | |
---|---|
int |
compareTo(IProperty<?> other)
Compares this with another Object. |
boolean |
equals(Object obj)
|
String[] |
getChoices()
Creates an array of choices that can be selected by the user to set a value for this option. |
T |
getDefault()
Returns the default value of this property. |
T |
getDefaultDefault()
Creates a default-default value for this layout option. |
String |
getDescription()
Returns the description. |
Enum<?> |
getEnumValue(int intValue)
Returns the enumeration value for a given index. |
String |
getId()
Returns the identifier. |
Comparable<T> |
getLowerBound()
Returns the lower bound of this property. |
String |
getName()
Returns the name. |
Class<?> |
getOptionClass()
Returns the option type class. |
String |
getTargetsDescription()
Returns a user friendly description of the active targets of this layout option. |
LayoutOptionData.Type |
getType()
Returns the type. |
Comparable<T> |
getUpperBound()
Returns the upper bound of this property. |
int |
hashCode()
|
boolean |
hasTarget(LayoutOptionData.Target target)
Checks whether the given target is active for this layout option. |
boolean |
isAdvanced()
Whether the option should be shown in advanced mode only. |
boolean |
isVisible()
Returns whether this option is visible to users, e.g. |
void |
parseRemoteEnumValues(String valueString)
Parses the possible values for a remote enumeration from a space separated string. |
T |
parseValue(String valueString)
Parses a string value for this layout option. |
void |
setAdvanced(boolean theadvanced)
Sets the advanced property of the layout option. |
void |
setDefault(T thedefaultValue)
Sets the default value. |
void |
setDescription(String thedescription)
Sets the description. |
void |
setId(String theid)
Sets the identifier. |
void |
setName(String thename)
Sets the name. |
void |
setOptionClass(Class<?> theclazz)
Sets the option type class. |
void |
setTargets(String targetsString)
Sets the targets property of this layout option data. |
void |
setType(LayoutOptionData.Type thetype)
Sets the data type. |
void |
setType(String typeLiteral)
Sets the type field depending on the given literal. |
void |
setVisible(boolean thevisible)
Sets whether this option is visible to users, e.g. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String BOOLEAN_LITERAL
public static final String INT_LITERAL
public static final String STRING_LITERAL
public static final String FLOAT_LITERAL
public static final String ENUM_LITERAL
public static final String OBJECT_LITERAL
public static final String REMOTEENUM_LITERAL
public static final String DEFAULT_OPTION_NAME
public static final String PARENTS_LITERAL
public static final String NODES_LITERAL
public static final String EDGES_LITERAL
public static final String PORTS_LITERAL
public static final String LABELS_LITERAL
public static final String[] BOOLEAN_CHOICES
Constructor Detail |
---|
public LayoutOptionData()
Method Detail |
---|
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(IProperty<?> other)
compareTo
in interface Comparable<IProperty<?>>
other
- the object to compare with
public String toString()
toString
in class Object
public void setType(String typeLiteral)
typeLiteral
- a string value that is expected to be equal to one of
the predefined literal value constantspublic T parseValue(String valueString)
valueString
- a serialized value
null
if the given value string is invalidpublic void parseRemoteEnumValues(String valueString)
valueString
- the space separated string containing the possible valuespublic T getDefaultDefault()
getDefault()
,
this never returns null
for options with type other than 'object'.
public String[] getChoices()
public Enum<?> getEnumValue(int intValue)
intValue
- zero-based index of the enumeration value
public void setTargets(String targetsString)
targetsString
- comma separated list of targetspublic boolean hasTarget(LayoutOptionData.Target target)
target
- a layout option target
public String getTargetsDescription()
null
if there are
no active targetspublic void setId(String theid)
setId
in interface ILayoutData
theid
- the identifier to setpublic String getId()
getId
in interface IProperty<T>
getId
in interface ILayoutData
public void setType(LayoutOptionData.Type thetype)
thetype
- the data type to setpublic LayoutOptionData.Type getType()
public void setName(String thename)
setName
in interface ILayoutData
thename
- the name to setpublic String getName()
getName
in interface ILayoutData
public void setDescription(String thedescription)
setDescription
in interface ILayoutData
thedescription
- the description to setpublic String getDescription()
getDescription
in interface ILayoutData
public T getDefault()
getDefault
in interface IProperty<T>
null
if the property has no default valuepublic Comparable<T> getLowerBound()
getLowerBound
in interface IProperty<T>
public Comparable<T> getUpperBound()
getUpperBound
in interface IProperty<T>
public void setDefault(T thedefaultValue)
thedefaultValue
- the default valuepublic Class<?> getOptionClass()
public void setOptionClass(Class<?> theclazz)
theclazz
- the class to setpublic boolean isAdvanced()
public void setAdvanced(boolean theadvanced)
theadvanced
- true if the option is advancedpublic boolean isVisible()
public void setVisible(boolean thevisible)
thevisible
- whether this option is visible to users, e.g. should be displayed in
GUI elements
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |