public class StringTree extends Object
Modifier and Type | Field and Description |
---|---|
private Vector<StringTree> |
m_kChildren
StringTree children:
|
private Vector<String> |
m_kStrings
String belonging to the current node:
|
Constructor and Description |
---|
StringTree()
default construction
|
Modifier and Type | Method and Description |
---|---|
void |
Append(String acString)
Append string to the end of the list
|
void |
Append(StringTree pkChild)
Append child to end of list.
|
void |
CreateNodes(DefaultMutableTreeNode kTop)
Creates nodes for the JTree GUI
|
void |
dispose()
delete memory
|
static String |
Format(Class<?> pkRTTI,
String acName)
string creation helpers (native types)
|
static String |
Format(String acString)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
boolean bValue)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
BoundingVolume pkValue)
string creation helpers (non-native types)
|
static String |
Format(String acPrefix,
byte ucValue)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
char cValue)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
ColorRGB rkValue)
string creation helpers (non-native types)
|
static String |
Format(String acPrefix,
ColorRGBA rkValue)
string creation helpers (non-native types)
|
static String |
Format(String acPrefix,
double dValue)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
float fValue)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
int iValue)
string creation helpers (native types)
|
static StringTree |
Format(String acTitle,
int iQuantity,
float[] afValue)
string creation helpers (non-native types)
|
static StringTree |
Format(String acTitle,
int iQuantity,
int[] aiValue)
string creation helpers (non-native types)
|
static String |
Format(String acPrefix,
Line3f rkValue)
string creation helpers (non-native types)
|
static String |
Format(String acPrefix,
long lValue)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
Matrix3f rkValue)
string creation helpers (non-native types)
|
static String |
Format(String acPrefix,
Plane3f rkValue)
string creation helpers (non-native types)
|
static String |
Format(String acPrefix,
short sValue)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
String sValue)
string creation helpers (native types)
|
static String |
Format(String acPrefix,
Vector2f rkValue)
string creation helpers (non-native types)
|
static String |
Format(String acPrefix,
Vector3f rkValue)
string creation helpers (non-native types)
|
static String |
FormatDouble(double dValue)
Format double into String, prints INFINITY or -INFINITY if < or >
Double.MAX_VALUE
|
static String |
FormatFloat(float fValue)
Format float into String, prints INFINITY or -INFINITY if < or >
Float.MAX_VALUE
|
StringTree |
GetChild(int i)
Get child at position i
|
int |
GetChildQuantity()
Return the number of children StringTree nodes
|
String |
GetString(int i)
Get string at position i
|
int |
GetStringQuantity()
return number of strings
|
private void |
Save(FileOutputStream pkOFile,
int iLevel,
int iTabSize)
Save this StringTree to the FileOutputStream
|
boolean |
Save(String acFilename,
int iTabSize)
Save the StringTree and children to the file.
|
void |
SetChild(int i,
StringTree pkChild)
Set child i
|
void |
SetString(int i,
String acString)
Set string at position i
|
private Vector<StringTree> m_kChildren
public static String Format(Class<?> pkRTTI, String acName)
pkRTTI
- Class objectacName
- Namepublic static String Format(String acString)
acString
- string to format or public static String Format(String acPrefix, boolean bValue)
acPrefix
- string prefixbValue
- boolean value to printpublic static String Format(String acPrefix, BoundingVolume pkValue)
acPrefix
- string prefixpkValue
- Boundvolume to printpublic static String Format(String acPrefix, byte ucValue)
acPrefix
- string prefixucValue
- byte value to printpublic static String Format(String acPrefix, char cValue)
acPrefix
- string prefixcValue
- char value to printpublic static String Format(String acPrefix, ColorRGB rkValue)
acPrefix
- string prefixrkValue
- ColorRGB to printpublic static String Format(String acPrefix, ColorRGBA rkValue)
acPrefix
- string prefixrkValue
- ColorRGBA to printpublic static String Format(String acPrefix, double dValue)
acPrefix
- string prefixdValue
- double value to printpublic static String Format(String acPrefix, float fValue)
acPrefix
- string prefixfValue
- float value to printpublic static String Format(String acPrefix, int iValue)
acPrefix
- string prefixiValue
- int value to printpublic static StringTree Format(String acTitle, int iQuantity, float[] afValue)
acTitle
- title of sub-stringiQuantity
- number of floatsafValue
- float array to printpublic static StringTree Format(String acTitle, int iQuantity, int[] aiValue)
acTitle
- title of sub-stringiQuantity
- number of intsaiValue
- int array to printpublic static String Format(String acPrefix, Line3f rkValue)
acPrefix
- string prefixrkValue
- Line3f to printpublic static String Format(String acPrefix, long lValue)
acPrefix
- string prefixlValue
- long value to printpublic static String Format(String acPrefix, Matrix3f rkValue)
acPrefix
- string prefixrkValue
- Matrix3f to printpublic static String Format(String acPrefix, Plane3f rkValue)
acPrefix
- string prefixrkValue
- Plane3f to printpublic static String Format(String acPrefix, short sValue)
acPrefix
- string prefixsValue
- short value to printpublic static String Format(String acPrefix, String sValue)
acPrefix
- string prefixsValue
- string to appendpublic static String Format(String acPrefix, Vector2f rkValue)
acPrefix
- string prefixrkValue
- Vector values to printpublic static String Format(String acPrefix, Vector3f rkValue)
acPrefix
- string prefixrkValue
- Vector values to printpublic static String FormatDouble(double dValue)
dValue
- value to printpublic static String FormatFloat(float fValue)
fValue
- value to printpublic void Append(String acString)
acString
- string to appendpublic void Append(StringTree pkChild)
pkChild
- child to append.public void CreateNodes(DefaultMutableTreeNode kTop)
kTop
- top-level node.public void dispose()
public StringTree GetChild(int i)
i
- indexpublic int GetChildQuantity()
public String GetString(int i)
i
- index into listpublic int GetStringQuantity()
public boolean Save(String acFilename, int iTabSize)
acFilename
- filenameiTabSize
- number of spaces in a 'tab'public void SetChild(int i, StringTree pkChild)
i
- index to setpkChild
- StringTree childpublic void SetString(int i, String acString)
i
- index into listacString
- string to add to listprivate void Save(FileOutputStream pkOFile, int iLevel, int iTabSize) throws IOException
pkOFile
- output streamiLevel
- current level to indentiTabSize
- number os spaces in a 'tab'IOException