本文整理了Java中prefuse.Visualization.visibleItems()
方法的一些代码示例,展示了Visualization.visibleItems()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Visualization.visibleItems()
方法的具体详情如下:
包路径:prefuse.Visualization
类名称:Visualization
方法名:visibleItems
[英]Get an iterator over all visible items.
[中]在所有可见项上获取迭代器。
代码示例来源:origin: de.sciss/prefuse-core
/**
* @see prefuse.action.Action#run(double)
*/
public void run(double frac) {
Rectangle2D b = getLayoutBounds();
double x, y;
double w = b.getWidth();
double h = b.getHeight();
Iterator iter = getVisualization().visibleItems(m_group);
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
x = (int)(b.getX() + r.nextDouble()*w);
y = (int)(b.getY() + r.nextDouble()*h);
setX(item,null,x);
setY(item,null,y);
}
}
代码示例来源:origin: de.sciss/prefuse-core
Iterator iter = m_vis.visibleItems(m_group);
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
代码示例来源:origin: de.sciss/prefuse-core
/**
* Get the bounding rectangle for all items in the given group.
* @param group the visual data group name
* @param r a rectangle in which to store the computed bounding box
* @return the input rectangle r, updated to hold the computed
* bounding box
*/
public Rectangle2D getBounds(String group, Rectangle2D r) {
Iterator iter = visibleItems(group);
if ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
r.setRect(item.getBounds());
}
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
Rectangle2D.union(item.getBounds(), r, r);
}
return r;
}
代码示例来源:origin: de.sciss/prefuse-core
/**
* Reset the force simulation state for all nodes processed
* by this layout.
*/
public void reset() {
Iterator iter = m_vis.visibleItems(m_nodeGroup);
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
ForceItem fitem = (ForceItem)item.get(FORCEITEM);
if ( fitem != null ) {
fitem.location[0] = (float)item.getEndX();
fitem.location[1] = (float)item.getEndY();
fitem.force[0] = fitem.force[1] = 0;
fitem.velocity[0] = fitem.velocity[1] = 0;
}
}
m_lasttime = -1L;
}
代码示例来源:origin: de.sciss/prefuse-core
/**
* @see prefuse.action.GroupAction#run(double)
*/
public void run(double frac) {
Tree tree = ((Graph)m_vis.getGroup(m_group)).getSpanningTree();
m_divisor = tree.getNodeCount();
m_root = (NodeItem)tree.getRoot();
// mark the items
Iterator items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem)items.next();
item.setDOI(Constants.MINIMUM_DOI);
item.setExpanded(false);
}
// compute the fisheye over nodes
Iterator iter = m_vis.items(m_sources, m_groupP);
while ( iter.hasNext() )
visitFocus((NodeItem)iter.next(), null);
visitFocus(m_root, null);
// mark unreached items
items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem)items.next();
if ( item.getDOI() == Constants.MINIMUM_DOI )
PrefuseLib.updateVisible(item, false);
}
}
代码示例来源:origin: de.sciss/prefuse-core
Iterator iter = m_vis.visibleItems(m_nodeGroup);
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
代码示例来源:origin: de.sciss/prefuse-core
Iterator items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
代码示例来源:origin: de.sciss/prefuse-core
startY = Float.isNaN(startY) ? 0f : startY;
Iterator iter = m_vis.visibleItems(m_nodeGroup);
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
iter = m_vis.visibleItems(m_edgeGroup);
while ( iter.hasNext() ) {
EdgeItem e = (EdgeItem)iter.next();
代码示例来源:origin: de.sciss/prefuse-core
private void finish() {
// set faded-out nodes to permanently invisible
Iterator items = m_vis.items(m_group, StartVisiblePredicate.TRUE);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
if ( !item.isEndVisible() ) {
item.setVisible(false);
item.setStartVisible(false);
}
}
// set faded-in nodes to permanently visible
items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
process(item, 1.0);
item.setStartFillColor(item.getEndFillColor());
item.setStartTextColor(item.getEndTextColor());
item.setStartStrokeColor(item.getEndStrokeColor());
}
}
代码示例来源:origin: de.sciss/prefuse-core
private void finish() {
// set faded-out nodes to permanently invisible
Iterator items = m_vis.items(m_group, StartVisiblePredicate.TRUE);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
if ( !item.isEndVisible() ) {
item.setVisible(false);
item.setStartVisible(false);
}
}
// set faded-in nodes to permanently visible
items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
if ( !item.isStartVisible() ) {
item.setStartVisible(true);
item.setStartFillColor(item.getEndFillColor());
item.setStartTextColor(item.getEndTextColor());
item.setStartStrokeColor(item.getEndStrokeColor());
}
}
}
代码示例来源:origin: de.sciss/prefuse-core
Iterator iter = m_vis.visibleItems(m_nodeGroup);
while ( iter.hasNext() ) {
VisualItem item = (NodeItem)iter.next();
代码示例来源:origin: de.sciss/prefuse-core
Iterator items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem)items.next();
items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem)items.next();
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-xml-nbprefuse
Iterator aggrs = m_vis.visibleItems(m_group);
while ( aggrs.hasNext() ) {
AggregateItem aitem = (AggregateItem)aggrs.next();
代码示例来源:origin: de.sciss/prefuse-core
private void setup() {
Iterator items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
代码示例来源:origin: de.sciss/prefuse-core
private void setup() {
Iterator items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
代码示例来源:origin: de.sciss/prefuse-core
Point2D anchor = correct(m_anchor, bounds);
final Iterator iter = getVisualization().visibleItems(m_group);
内容来源于网络,如有侵权,请联系作者删除!