protected static void setFixed(VisualItem item, boolean fixed) { if ( item instanceof AggregateItem ) { Iterator items = ((AggregateItem)item).items(); while ( items.hasNext() ) { setFixed((VisualItem)items.next(), fixed); } } else { item.setFixed(fixed); } }
/** * Finds the schema File Node in the AggregateItem * The AggregateItem contains the schema file node and * the SchemaComponent nodes for the file * */ private NodeItem findFileNode(final int aggregateItemFileGroup, final VisualItem item) { NodeItem fileNode = null; AggregateItem agIt = AggregateItem.class.cast(item); Iterator agItems = agIt.items(); while(agItems.hasNext()){ VisualItem agItem = (VisualItem)agItems.next(); int fileGroup = -1; if (agItem.canGetInt(AnalysisConstants.FILE_NODE_FILE_GROUP)) { fileGroup = agItem.getInt(AnalysisConstants.FILE_NODE_FILE_GROUP); if (fileGroup == aggregateItemFileGroup && agItem.canGetBoolean(AnalysisConstants.IS_EXPANDED)){ fileNode = NodeItem.class.cast(agItem); break; } } } return fileNode; }
/** * Finds the schema File Node in the AggregateItem * The AggregateItem contains the schema file node and * the SchemaComponent nodes for the file * */ private NodeItem findFileNode(final int aggregateItemFileGroup, final VisualItem item ) { NodeItem fileNode = null; AggregateItem agIt = AggregateItem.class.cast(item); Iterator agItems = agIt.items(); while(agItems.hasNext()){ VisualItem agItem = (VisualItem)agItems.next(); int fileGroup = -1; if (agItem.canGetInt(AnalysisConstants.FILE_NODE_FILE_GROUP)) { fileGroup = agItem.getInt(AnalysisConstants.FILE_NODE_FILE_GROUP); if (fileGroup == aggregateItemFileGroup && agItem.canGetBoolean(AnalysisConstants.IS_EXPANDED)){ fileNode = NodeItem.class.cast(agItem); break; } } } return fileNode; }
protected static void move(VisualItem item, double dx, double dy) { if ( item instanceof AggregateItem ) { Iterator items = ((AggregateItem)item).items(); while ( items.hasNext() ) { move((VisualItem)items.next(), dx, dy); } } else { double x = item.getX(); double y = item.getY(); item.setStartX(x); item.setStartY(y); item.setX(x+dx); item.setY(y+dy); item.setEndX(x+dx); item.setEndY(y+dy); } }
if ( aitem.getAggregateSize() == 0 ) continue; VisualItem item = null; Iterator iter = aitem.items(); while ( iter.hasNext() ) { item = (VisualItem)iter.next();