/** * @see prefuse.data.Table#addRows(int) */ public void addRows(int nRows) { if ( m_parent != null ) { throw new IllegalStateException( "Add rows not supported for CascadedTable."); } else { super.addRows(nRows); } }
/** * Create a new Table. * @param nrows the starting number of table rows * @param ncols the starting capacity for columns * @param tupleType the class of the Tuple instances to use */ protected Table(int nrows, int ncols, Class tupleType) { m_listeners = new CopyOnWriteArrayList(); m_columns = new ArrayList(ncols); m_names = new ArrayList(ncols); m_rows = new RowManager(this); m_entries = new HashMap(ncols+5); m_tuples = new TupleManager(this, null, tupleType); if ( nrows > 0 ) addRows(nrows); }
min = Long.MAX_VALUE; max = Long.MIN_VALUE; agg_tab.addRows(num_hosts*num_hosts);
protected void addHostLabels(HeatmapData hd) { Table legend_labels_table = new Table(); legend_labels_table.addColumn("label",String.class); legend_labels_table.addRows(hd.hostnames.length); for (int i = 0; i < hd.hostnames.length; i++) { legend_labels_table.setString(i,"label",hd.hostnames[i]); } float start_x = LEGEND_X_OFFSET; float start_y = LEGEND_Y_OFFSET + BORDER[1] + (BOXWIDTH/2); float incr = this.BOXWIDTH; VisualTable legend_labels_table_viz = this.viz.addTable(legendgroup, legend_labels_table); for (int i = 0; i < hd.hostnames.length; i++) { legend_labels_table_viz.setFloat(i, VisualItem.X, start_x + LEGEND_TEXT_OFFSET); legend_labels_table_viz.setFloat(i, VisualItem.Y, start_y + (i * incr)); legend_labels_table_viz.setTextColor(i,ColorLib.color(java.awt.Color.BLACK)); legend_labels_table_viz.setFont(i,new Font(Font.SANS_SERIF,Font.PLAIN,LEGEND_FONT_SIZE)); } }
protected void addAddlInfo(HeatmapData hd) { Table legend_labels_table = new Table(); legend_labels_table.addColumn("label",String.class); legend_labels_table.addRows(3);