本文整理汇总了Java中prefuse.visual.VisualItem.setValidated方法的典型用法代码示例。如果您正苦于以下问题:Java VisualItem.setValidated方法的具体用法?Java VisualItem.setValidated怎么用?Java VisualItem.setValidated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类prefuse.visual.VisualItem
的用法示例。
在下文中一共展示了VisualItem.setValidated方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invalidate
import prefuse.visual.VisualItem; //导入方法依赖的package包/类
/**
* Invalidate the bounds of all VisualItems in the given group. This
* will cause the bounds to be recomputed for all items upon the next
* redraw.
* @param group the visual data group to invalidate
*/
public void invalidate(String group) {
Iterator<VisualItem> items = items(group, ValidatedPredicate.TRUE);
while ( items.hasNext() ) {
VisualItem item = (VisualItem)items.next();
item.setValidated(false);
}
}
示例2: setPolygon
import prefuse.visual.VisualItem; //导入方法依赖的package包/类
/**
* Sets the polygon values for a visual item.
*/
private void setPolygon(VisualItem item, float[] poly) {
float[] a = getPolygon(item, m_field);
float[] s = getPolygon(item, m_start);
float[] e = getPolygon(item, m_end);
System.arraycopy(a, 0, s, 0, a.length);
System.arraycopy(poly, 0, a, 0, poly.length);
System.arraycopy(poly, 0, e, 0, poly.length);
item.setValidated(false);
}
示例3: removeGroup
import prefuse.visual.VisualItem; //导入方法依赖的package包/类
/**
* Removes a data group from this Visualization. If the group is a focus
* group, the group will simply be removed, and any subsequent attempts to
* retrieve the group will return null. If the group is a primary group, it
* will be removed, and any members of the group will also be removed
* from any registered focus groups.
* @param group the data group to remove
* @return true if the group was found and removed, false if the group
* was not found in this visualization.
*/
public synchronized boolean removeGroup(String group) {
// check for focus group first
TupleSet ts = getFocusGroup(group);
if ( ts != null ) {
// invalidate the item to reflect group membership change
Iterator<Tuple> items = ts.tuples(ValidatedPredicate.TRUE);
while (items.hasNext())
{
( (VisualItem) items.next()) .setValidated(false);
}
ts.clear(); // trigger group removal callback
m_focus.remove(group);
return true;
}
// focus group not found, check for primary group
ts = getVisualGroup(group);
if ( ts == null ) {
// exit with false if group not found
return false;
}
// remove group members from focus sets and invalidate them
TupleSet[] focus = new TupleSet[m_focus.size()];
m_focus.values().toArray(focus);
for ( Iterator<Tuple> items = ts.tuples(); items.hasNext(); ) {
VisualItem item = (VisualItem) items.next();
for ( int j=0; j<focus.length; ++j ) {
focus[j].removeTuple(item);
}
item.setValidated(false);
}
// remove data
if ( ts instanceof CompositeTupleSet ) {
CompositeTupleSet cts = (CompositeTupleSet)ts;
for ( Iterator<String> names = cts.setNames(); names.hasNext(); ) {
String name = names.next();
String subgroup = PrefuseLib.getGroupName(group,name);
m_visual.remove(subgroup);
m_source.remove(subgroup);
}
}
m_visual.remove(group);
m_source.remove(group);
return true;
}