FileDocCategorySizeDatePackage
TableGroupRowRunner.javaAPI DocAzureus 3.0.3.4676Mon Feb 19 16:47:26 GMT 2007com.aelitis.azureus.ui.common.table

TableGroupRowRunner.java

package com.aelitis.azureus.ui.common.table;


/** 
 * Used with {@link TableView#runForSelectedRows}
 */
public abstract class TableGroupRowRunner
{
	/** Code to run 
	 * @param row TableRowCore to run code against
	 */
	public void run(TableRowCore row) {
	}

	/**
	 * Code to run against multiple rows.
	 * 
	 * Return true if this object supports it, false otherwise.
	 * 
	 * @param rows
	 * @return
	 */
	public boolean run(TableRowCore[] rows) {
		return false;
	}

	/**
	 * Indicates whether this object supports multiple rows.
	 */
	private static final TableRowCore[] EMPTY = new TableRowCore[0];

	public boolean supportsMultipleRows() {
		return run(EMPTY);
	}

}