本文整理汇总了Java中prefuse.visual.VisualTable类的典型用法代码示例。如果您正苦于以下问题:Java VisualTable类的具体用法?Java VisualTable怎么用?Java VisualTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisualTable类属于prefuse.visual包,在下文中一共展示了VisualTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see java.lang.Object#toString()
*/
public String toString() {
StringBuffer sbuf = new StringBuffer();
sbuf.append("VisualItem[").append(getGroup());
sbuf.append(",").append(m_row).append(',');
VisualTable vt = (VisualTable)m_table;
int local = vt.getLocalColumnCount();
int inherited = vt.getColumnCount()-local;
for ( int i=0; i<inherited; ++i ) {
if ( i > 0 ) sbuf.append(',');
String name = vt.getColumnName(local+i);
sbuf.append(name);
sbuf.append('=');
if ( vt.canGetString(name) )
sbuf.append(vt.getString(m_row, name));
else
sbuf.append(vt.get(m_row, name).toString());
}
sbuf.append(']');
return sbuf.toString();
}
示例2: disposeInstanceVis
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* Disposes the specified visualization assuming it is an instance visualization.
* A disposed visualization can no longer be utilized.
*
* @param vis
* instance visualization to dispose
*/
public static void disposeInstanceVis( Visualization vis )
{
disposeAction( vis.removeAction( "draw" ) );
disposeAction( vis.removeAction( "axis" ) );
disposeAction( vis.removeAction( "repaint" ) );
TableEx.disposeCascadedTable(
(VisualTable)vis.getVisualGroup( HVConstants.INSTANCE_DATA_NAME )
);
vis.reset();
}
示例3: addGraph
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* Adds a graph to this visualization, using the given data group
* name. A visual abstraction of the data will be created and registered
* with the visualization. An exception will be thrown if the group name
* is already in use.
* @param group the data group name for the visualized graph. The nodes
* and edges will be available in the "group.nodes" and "group.edges"
* subgroups.
* @param graph the graph to visualize
* @param filter a filter Predicate determining which data Tuples in the
* input graph are visualized
* @param nodeSchema the data schema to use for the visual node table
* @param edgeSchema the data schema to use for the visual edge table
*/
public synchronized VisualGraph addGraph(String group, Graph graph,
Predicate filter, Schema nodeSchema, Schema edgeSchema)
{
checkGroupExists(group); // check before adding sub-tables
String ngroup = PrefuseLib.getGroupName(group, Graph.NODES);
String egroup = PrefuseLib.getGroupName(group, Graph.EDGES);
VisualTable nt, et;
nt = addTable(ngroup, graph.getNodeTable(), filter, nodeSchema);
et = addTable(egroup, graph.getEdgeTable(), filter, edgeSchema);
VisualGraph vg = new VisualGraph(nt, et,
graph.isDirected(), graph.getNodeKeyField(),
graph.getEdgeSourceField(), graph.getEdgeTargetField());
vg.setVisualization(this);
vg.setGroup(group);
addDataGroup(group, vg, graph);
TupleManager ntm = new TupleManager(nt, vg, TableNodeItem.class);
TupleManager etm = new TupleManager(et, vg, TableEdgeItem.class);
nt.setTupleManager(ntm);
et.setTupleManager(etm);
vg.setTupleManagers(ntm, etm);
return vg;
}
示例4: addTree
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* Adds a tree to this visualization, using the given data group
* name. A visual abstraction of the data will be created and registered
* with the visualization. An exception will be thrown if the group name
* is already in use.
* @param group the data group name for the visualized tree. The nodes
* and edges will be available in the "group.nodes" and "group.edges"
* subgroups.
* @param tree the tree to visualize
* @param filter a filter Predicate determining which data Tuples in the
* input graph are visualized
* @param nodeSchema the data schema to use for the visual node table
* @param edgeSchema the data schema to use for the visual edge table
*/
public synchronized VisualTree addTree(String group, Tree tree,
Predicate filter, Schema nodeSchema, Schema edgeSchema)
{
checkGroupExists(group); // check before adding sub-tables
String ngroup = PrefuseLib.getGroupName(group, Graph.NODES);
String egroup = PrefuseLib.getGroupName(group, Graph.EDGES);
VisualTable nt, et;
nt = addTable(ngroup, tree.getNodeTable(), filter, nodeSchema);
et = addTable(egroup, tree.getEdgeTable(), filter, edgeSchema);
VisualTree vt = new VisualTree(nt, et, tree.getNodeKeyField(),
tree.getEdgeSourceField(), tree.getEdgeTargetField());
vt.setVisualization(this);
vt.setGroup(group);
addDataGroup(group, vt, tree);
TupleManager ntm = new TupleManager(nt, vt, TableNodeItem.class);
TupleManager etm = new TupleManager(et, vt, TableEdgeItem.class);
nt.setTupleManager(ntm);
et.setTupleManager(etm);
vt.setTupleManagers(ntm, etm);
return vt;
}
示例5: getSourceTuple
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* Get the Tuple from a backing source data set that corresponds most
* closely to the given VisualItem.
* @param item the VisualItem for which to retreive the source tuple
* @return the data source tuple, or null if no such tuple could
* be found
*/
public Tuple getSourceTuple(VisualItem item) {
// get the source group and tuple set, exit if none
String group = item.getGroup();
TupleSet source = getSourceData(group);
if ( source == null ) return null;
// first get the source table and row value
int row = item.getRow();
Table t = item.getTable();
while ( t instanceof VisualTable ) {
VisualTable vt = (VisualTable)t;
row = vt.getParentRow(row);
t = vt.getParentTable();
}
// now get the appropriate source tuple
// graphs maintain their own tuple managers so treat them specially
String cgroup = PrefuseLib.getChildGroup(group);
if ( cgroup != null ) {
String pgroup = PrefuseLib.getParentGroup(group);
Graph g = (Graph)getSourceData(pgroup);
if ( t == g.getNodeTable() ) {
return g.getNode(row);
} else {
return g.getEdge(row);
}
} else {
return t.getTuple(row);
}
}
示例6: getBounds
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see prefuse.visual.VisualItem#getBounds()
*/
public Rectangle2D getBounds() {
if ( !isValidated() ) {
return validateBounds();
}
return ((VisualTable)m_table).getBounds(m_row);
}
示例7: getTable
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* Create a new table for representing axis labels.
*/
protected VisualTable getTable() {
TupleSet ts = m_vis.getGroup(m_group);
if ( ts == null ) {
Schema s = PrefuseLib.getAxisLabelSchema();
VisualTable vt = m_vis.addTable(m_group, s);
vt.index(VALUE);
return vt;
} else if ( ts instanceof VisualTable ) {
return (VisualTable)ts;
} else {
throw new IllegalStateException(
"Group already exists, not being used for labels");
}
}
示例8: garbageCollect
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* Remove axis labels no longer being used.
*/
protected void garbageCollect(VisualTable labels) {
Iterator iter = labels.tuples();
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
if ( !item.isStartVisible() && !item.isEndVisible() ) {
labels.removeTuple(item);
}
}
}
示例9: getDecoratedItem
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see prefuse.visual.DecoratorItem#getDecoratedItem()
*/
public VisualItem getDecoratedItem() {
VisualTable vt = (VisualTable)getTable();
int prow = vt.getParentRow(getRow());
return (VisualItem)vt.getParentTable().getTuple(prow);
}
示例10: getVisualization
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see prefuse.visual.VisualItem#getVisualization()
*/
public Visualization getVisualization() {
return ((VisualTable)m_table).getVisualization();
}
示例11: getGroup
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see prefuse.visual.VisualItem#getGroup()
*/
public String getGroup() {
return ((VisualTable)m_table).getGroup();
}
示例12: getSourceData
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see prefuse.visual.VisualItem#getSourceData()
*/
public TupleSet getSourceData() {
VisualTable vt = (VisualTable)m_table;
return vt.getVisualization().getSourceData(vt.getGroup());
}
示例13: getSourceTuple
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see prefuse.visual.VisualItem#getSourceTuple()
*/
public Tuple getSourceTuple() {
VisualTable vt = (VisualTable)m_table;
return vt.getVisualization().getSourceTuple(this);
}
示例14: isValidated
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see prefuse.visual.VisualItem#isValidated()
*/
public boolean isValidated() {
return ((VisualTable)m_table).isValidated(m_row);
}
示例15: setValidated
import prefuse.visual.VisualTable; //导入依赖的package包/类
/**
* @see prefuse.visual.VisualItem#setValidated(boolean)
*/
public void setValidated(boolean value) {
((VisualTable)m_table).setValidated(m_row, value);
}