public class PrefuseLib
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FIELD_PREFIX
Prefix for visualization-specific data fields, such as those used by
VisualItem; the default is a single underscore (_).
|
Modifier and Type | Method and Description |
---|---|
static double |
distance(VisualItem vi1,
VisualItem vi2)
Get the distance between the x,y points of two VisualItems.
|
static Schema |
getAxisLabelSchema()
Get the VisualItem Schema used for axis tick marks and labels.
|
static java.lang.String |
getChildGroup(java.lang.String group)
Get the tail group name of a child group, stripping all but the
bottom-level group from the group name (e.g., graph.nodes --> nodes).
|
static java.lang.String |
getDisplayStats(Display d)
Returns a string showing debugging info such as number of visualized
items and the current frame rate.
|
static java.lang.String |
getEndField(java.lang.String field)
For a given interpolated field name, get the name of the end
field.
|
static java.lang.String |
getGroupName(java.lang.String parent,
java.lang.String child)
Get the group name for the given parent and child group, simply
concatenating them together with a group delimiter in between.
|
static java.lang.String |
getMemoryUsageInKB()
Get a String showing current JVM memory usage in kilobytes.
|
static java.lang.String |
getMemoryUsageInMB()
Get a String showing current JVM memory usage in megabytes.
|
static Schema |
getMinimalVisualSchema()
Get the minimal Schema needed for a unique VisualItem.
|
static java.lang.String |
getParentGroup(java.lang.String group)
Get the parent group string of a child group, stripping off the
bottom-level group from the group name (e.g., graph.nodes --> graph).
|
static double |
getSize2D(double size)
Returns a scale factor by which to scale a 2D shape to grow
the area by the desired input size value.
|
static java.lang.String |
getStartField(java.lang.String field)
For a given interpolated field name, get the name of the start
field.
|
static Schema |
getVisualItemSchema()
Get an instance of the default Schema used for VisualItem instances.
|
static boolean |
isChildGroup(java.lang.String group)
Indicates if a group is a child group, a non-top-level data group in
a set of nested data groups (e.g., the node or edge table of a
graph or tree).
|
static void |
setX(VisualItem item,
VisualItem referrer,
double x)
Update the x-coordinate of an item.
|
static void |
setY(VisualItem item,
VisualItem referrer,
double y)
Update the y-coordinate of an item.
|
static void |
update(VisualItem item,
java.lang.String field,
java.lang.Object val)
Update the values in an interpolated column (a set of three columns
representing a current value along with starting and ending values).
|
static void |
updateBoolean(VisualItem item,
java.lang.String field,
boolean b)
Update the values in an interpolated column (a set of three columns
representing a current value along with starting and ending values).
|
static void |
updateDouble(VisualItem item,
java.lang.String field,
double val)
Update the values in an interpolated column (a set of three columns
representing a current value along with starting and ending values).
|
static void |
updateFloat(VisualItem item,
java.lang.String field,
float val)
Update the values in an interpolated column (a set of three columns
representing a current value along with starting and ending values).
|
static void |
updateInt(VisualItem item,
java.lang.String field,
int val)
Update the values in an interpolated column (a set of three columns
representing a current value along with starting and ending values).
|
static void |
updateLong(VisualItem item,
java.lang.String field,
long val)
Update the values in an interpolated column (a set of three columns
representing a current value along with starting and ending values).
|
static void |
updateVisible(VisualItem item,
boolean val)
Update the visibility of an item.
|
public static final java.lang.String FIELD_PREFIX
public static java.lang.String getMemoryUsageInKB()
public static java.lang.String getMemoryUsageInMB()
public static java.lang.String getDisplayStats(Display d)
public static double getSize2D(double size)
public static double distance(VisualItem vi1, VisualItem vi2)
vi1
- the first VisualItemvi2
- the second VisualItempublic static void update(VisualItem item, java.lang.String field, java.lang.Object val)
item
- the VisualItem to updatefield
- the base field to update, start and ending fields will
also be updated, too.val
- the value to setpublic static void updateInt(VisualItem item, java.lang.String field, int val)
item
- the VisualItem to updatefield
- the base field to update, start and ending fields will
also be updated, too.val
- the value to setpublic static void updateLong(VisualItem item, java.lang.String field, long val)
item
- the VisualItem to updatefield
- the base field to update, start and ending fields will
also be updated, too.val
- the value to setpublic static void updateFloat(VisualItem item, java.lang.String field, float val)
item
- the VisualItem to updatefield
- the base field to update, start and ending fields will
also be updated, too.val
- the value to setpublic static void updateDouble(VisualItem item, java.lang.String field, double val)
item
- the VisualItem to updatefield
- the base field to update, start and ending fields will
also be updated, too.val
- the value to setpublic static void updateBoolean(VisualItem item, java.lang.String field, boolean b)
item
- the VisualItem to updatefield
- the base field to update, start and ending fields will
also be updated, too.b
- the value to setpublic static void updateVisible(VisualItem item, boolean val)
item
- the VisualItem to updateval
- the visibility value to setpublic static void setX(VisualItem item, VisualItem referrer, double x)
item
- the VisualItem to updatereferrer
- an optional referrer VisualItemx
- the x value to setpublic static void setY(VisualItem item, VisualItem referrer, double y)
item
- the VisualItem to updatereferrer
- an optional referrer VisualItemy
- the y value to setpublic static boolean isChildGroup(java.lang.String group)
public static java.lang.String getParentGroup(java.lang.String group)
group
- the group namepublic static java.lang.String getChildGroup(java.lang.String group)
group
- the group namepublic static java.lang.String getGroupName(java.lang.String parent, java.lang.String child)
parent
- the parent group namechild
- the child group namepublic static java.lang.String getStartField(java.lang.String field)
field
- the data fieldpublic static java.lang.String getEndField(java.lang.String field)
field
- the data fieldpublic static Schema getVisualItemSchema()
public static Schema getMinimalVisualSchema()
public static Schema getAxisLabelSchema()
Copyright ? 2013 Regents of the University of California