|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthep.graphics.heprep.ref.DefaultHepRepAttValue
Field Summary | |
static String |
cvsId
|
Fields inherited from interface hep.graphics.heprep.HepRepConstants |
SHOW_DESC, SHOW_EXTRA, SHOW_NAME, SHOW_NONE, SHOW_VALUE, TYPE_BOOLEAN, TYPE_COLOR, TYPE_DOUBLE, TYPE_INT, TYPE_LONG, TYPE_STRING, TYPE_UNKNOWN |
Constructor Summary | |
DefaultHepRepAttValue(String name,
boolean value,
int showLabel)
|
|
DefaultHepRepAttValue(String name,
Color value,
int showLabel)
|
|
DefaultHepRepAttValue(String name,
double value,
int showLabel)
|
|
DefaultHepRepAttValue(String name,
int value,
int showLabel)
|
|
DefaultHepRepAttValue(String name,
long value,
int showLabel)
|
|
DefaultHepRepAttValue(String name,
String value,
int showLabel)
|
|
DefaultHepRepAttValue(String name,
String value,
String type,
int showLabel)
|
Method Summary | |
static void |
addGuessedType(String name,
String type)
Add a new type for guessing |
HepRepAttValue |
copy()
Returns a deep copy of this attvalue. |
String |
getAsString()
Returns value as string. |
static String |
getAsString(HepRepAttValue attValue)
|
boolean |
getBoolean()
Returns value as boolean. |
Color |
getColor()
Returns value as Color. |
double |
getDouble()
Returns value as double. |
int |
getInteger()
Returns value as int. |
long |
getLong()
Returns value as long. |
String |
getLowerCaseName()
Returns lowercased name of the attvalue. |
String |
getLowerCaseString()
Returns value as lowercase string. |
String |
getName()
Returns name of the attvalue. |
String |
getString()
Returns value as string. |
int |
getType()
Returns type of the attvalue, defined in HepRepConstants with names TYPE_xxx. |
String |
getTypeName()
Returns the Java-like name for the type of this attvalue. |
static String |
guessType(String name,
String value,
String type)
Returns type, unless type is null, in which case it guesses the type from the name, and if not found from the value. |
static String |
guessTypeFromName(String name)
Returns type from a guess by name, or null if it cannot be guessed. |
static String |
guessTypeFromValue(String value)
Returns type, guessed from the value. |
int |
showLabel()
Returns the flag bits for showing this attvalue as a label, defined in HepRepConstants with names SHOW_xxx. |
static String |
toShowLabel(int showLabel)
|
static int |
toShowLabel(String labelString)
|
String |
toString()
|
static String |
toString(int type)
|
static int |
toType(String type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String cvsId
Constructor Detail |
public DefaultHepRepAttValue(String name, String value, int showLabel)
public DefaultHepRepAttValue(String name, Color value, int showLabel)
public DefaultHepRepAttValue(String name, long value, int showLabel)
public DefaultHepRepAttValue(String name, int value, int showLabel)
public DefaultHepRepAttValue(String name, double value, int showLabel)
public DefaultHepRepAttValue(String name, boolean value, int showLabel)
public DefaultHepRepAttValue(String name, String value, String type, int showLabel)
Method Detail |
public HepRepAttValue copy() throws CloneNotSupportedException
HepRepAttValue
copy
in interface HepRepAttValue
CloneNotSupportedException
- if copying is not possible.public String getName()
HepRepAttValue
getName
in interface HepRepAttValue
public String getLowerCaseName()
HepRepAttValue
getLowerCaseName
in interface HepRepAttValue
public int getType()
HepRepAttValue
getType
in interface HepRepAttValue
public String getTypeName()
HepRepAttValue
getTypeName
in interface HepRepAttValue
public static int toShowLabel(String labelString)
public static String toShowLabel(int showLabel)
public static String toString(int type)
public static int toType(String type)
public static void addGuessedType(String name, String type)
public static String guessType(String name, String value, String type)
public static String guessTypeFromName(String name)
public static String guessTypeFromValue(String value)
public int showLabel()
HepRepAttValue
showLabel
in interface HepRepAttValue
public String getString() throws HepRepTypeException
HepRepAttValue
getString
in interface HepRepAttValue
HepRepTypeException
- if type is not string.public String getLowerCaseString() throws HepRepTypeException
HepRepAttValue
getLowerCaseString
in interface HepRepAttValue
HepRepTypeException
- if type is not string.public Color getColor() throws HepRepTypeException
HepRepAttValue
getColor
in interface HepRepAttValue
HepRepTypeException
- if type is not Color.public long getLong() throws HepRepTypeException
HepRepAttValue
getLong
in interface HepRepAttValue
HepRepTypeException
- if type is not long.public int getInteger() throws HepRepTypeException
HepRepAttValue
getInteger
in interface HepRepAttValue
HepRepTypeException
- if type is not int.public double getDouble() throws HepRepTypeException
HepRepAttValue
getDouble
in interface HepRepAttValue
HepRepTypeException
- if type is not double.public boolean getBoolean() throws HepRepTypeException
HepRepAttValue
getBoolean
in interface HepRepAttValue
HepRepTypeException
- if type is not boolean.public String getAsString()
HepRepAttValue
getAsString
in interface HepRepAttValue
public static String getAsString(HepRepAttValue attValue)
public String toString()
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |