|
||||||||||
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 |
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 |
STRING_LITERAL
literal value constant for strings. |
Constructor Summary | |
---|---|
LayoutOptionData()
|
Method Summary | |
---|---|
int |
compareTo(IProperty<?> other)
|
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. |
Object |
getIdentifier()
Returns an object that can be used as identifier for 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. |
int |
hashCode()
|
boolean |
hasTarget(LayoutOptionData.Target target)
Checks whether the given target is active for this layout option. |
T |
parseValue(String valueString)
Parses a string value for this 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. |
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 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<?>>
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 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)
theid
- the identifier to setpublic String getId()
public void setType(LayoutOptionData.Type thetype)
thetype
- the data type to setpublic LayoutOptionData.Type getType()
public void setName(String thename)
thename
- the name to setpublic String getName()
public void setDescription(String thedescription)
thedescription
- the description to setpublic String getDescription()
public T getDefault()
getDefault
in interface IProperty<T>
public void setDefault(T thedefaultValue)
thedefaultValue
- the default valuepublic Object getIdentifier()
getIdentifier
in interface IProperty<T>
public Class<?> getOptionClass()
public void setOptionClass(Class<?> theclazz)
theclazz
- the class to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |