/** * Clear all aggregate mappings for a row when it is deleted. */ protected void fireTableEvent(int row0, int row1, int col, int type) { if ( col==EventConstants.ALL_COLUMNS && type==EventConstants.DELETE ) { for ( int r=row0; r<=row1; ++r ) clearAggregateMappings(r, false); } super.fireTableEvent(row0, row1, col, type); }
/** * Get the current font for the row. The font is used as the default * typeface for drawing text for this item. * @param row the table row * @return the current font value */ public Font getFont(int row) { return (Font)get(row, VisualItem.FONT); }
/** * Set the current x-coordinate of the given row. * @param row the table row to set * @param x the new current x-coordinate */ public void setX(int row, double x) { setDouble(row, VisualItem.X, x); }
/** * Indicates if the given row is currently validated. If not, * validateBounds() must be run to update the bounds to a current value. * @param row the table row * @return true if validated, false otherwise */ public boolean isValidated(int row) { return getBoolean(row, VisualItem.VALIDATED); }
/** * Get the ending y-coordinate of the given row. * @param row the table row * @return the ending y-coordinate */ public double getEndY(int row) { return getDouble(row, VisualItem.ENDY); }
/** * Set the current stroke used to draw lines and shape outlines. * @param stroke the stroke to use to draw lines and shape outlines */ public void setStroke(int row, BasicStroke stroke) { set(row, VisualItem.STROKE, stroke); }
/** * Remove all items contained in the aggregate at the given row * @param row the row index of the aggregate */ public void removeAllFromAggregate(int row) { clearAggregateMappings(row, true); }
/** * Get all VisualItems within the aggregate at the given table row. * @param row the table row of the aggregate * @return an iterator over the items in the aggregate */ public Iterator aggregatedTuples(int row) { return new AggregatedIterator(row); }
/** * Create a new VisualTable without a parent table. * @param vis the Visualization associated with this table * @param group the data group of this table */ public VisualTable(Visualization vis, String group) { super(TableVisualItem.class); init(vis, group, VisualItem.SCHEMA); }
/** * Get the VisualItem for the given table row. * @param row a table row index * @return the VisualItem for the given table row */ public VisualItem getItem(int row) { return (VisualItem)getTuple(row); }
/** * Set the start visible flag. * @param row the table row to set * @param value true to set the start visible flag, false otherwise */ public void setStartVisible(int row, boolean value) { setBoolean(row, VisualItem.STARTVISIBLE, value); }
/** * Set the ending x-coordinate of the given row. * @param row the table row to set * @param x the new ending x-coordinate */ public void setEndX(int row, double x) { setDouble(row, VisualItem.ENDX, x); }
/** * Indicates if the start visible flag is set to true. This is the * visibility value consulted for the staring value of the visibility * field at the beginning of an animated transition. * @param row the table row * @return true if this item starts out visible, false otherwise. */ public boolean isStartVisible(int row) { return getBoolean(row, VisualItem.STARTVISIBLE); }
/** * Get the current size value of the row. Size values are typically used * to scale an item, either in one-dimension (e.g., a bar chart length) or * two-dimensions (e.g., using pixel area to encode a quantitative value). * @param row the table row * @return the current size value */ public double getSize(int row) { return getDouble(row, VisualItem.SIZE); }
/** * Set the starting font for the row. The font is used as the default * typeface for drawing text for this item. * @param row the table row to set * @param font the starting font value */ public void setStartFont(int row, Font font) { set(row, VisualItem.STARTFONT, font); }
/** * Set the current size value of the row. Size values are typically used * to scale an item, either in one-dimension (e.g., a bar chart length) or * two-dimensions (e.g., using pixel area to encode a quantitative value). * @param row the table row to set * @param size the current size value */ public void setSize(int row, double size) { setDouble(row, VisualItem.SIZE, size); }
/** * Indicates if the given row currently has the mouse pointer over it. * @param row the table row * @return true if the mouse pointer is over this item, false otherwise */ public boolean isHover(int row) { return getBoolean(row, VisualItem.HOVER); }
/** * Set the starting size value of the row. Size values are typically used * to scale an item, either in one-dimension (e.g., a bar chart length) or * two-dimensions (e.g., using pixel area to encode a quantitative value). * @param row the table row to set * @param size the starting size value */ public void setStartSize(int row, double size) { setDouble(row, VisualItem.STARTSIZE, size); }
/** * Set the degree-of-interest (DOI) value. The degree-of-interet is an * optional value that can be used to sort items by importance, control * item visibility, or influence particular visual encodings. A common * example is to use the DOI to store the graph distance of a node from * the nearest selected focus node. * @param row the table row to set * @param doi the DOI value of this item */ public void setDOI(int row, double doi) { setDouble(row, VisualItem.DOI, doi); }