@Override public int score(VisualItem item) { if (item instanceof DecoratorItem) { VisualItem decoratedItem = ((DecoratorItem) item).getDecoratedItem(); return layerByRow(decoratedItem) + 1; } return layerByRow(item); }
@Override public void run( double frac ) { Iterator iter = m_vis.items( m_group ); while( iter.hasNext() ) { DecoratorItem item = (DecoratorItem) iter.next(); VisualItem node = item.getDecoratedItem(); Rectangle2D bounds = node.getBounds(); setX( item, node, bounds.getX() + StackedLayout.INSET ); setY( item, node, bounds.getY() + StackedLayout.INSET + 12 ); } } } // end of inner class LabelLayout
@Override public void run(double frac) { Iterator iter = m_vis.items(m_group); while (iter.hasNext()) { DecoratorItem decorator = (DecoratorItem) iter.next(); VisualItem decoratedItem = decorator.getDecoratedItem(); Rectangle2D bounds = decoratedItem.getBounds(); double x = bounds.getCenterX(); double y = bounds.getCenterY(); setX(decorator, null, x); setY(decorator, null, y); } } }