FileDocCategorySizeDatePackage
TableStructureEventDispatcher.javaAPI DocAzureus 3.0.3.44272Thu May 31 16:24:26 BST 2007com.aelitis.azureus.ui.common.table

TableStructureEventDispatcher

public class TableStructureEventDispatcher extends Object implements TableStructureModificationListener
author
Olivier

Fields Summary
private static Map
instances
private static org.gudy.azureus2.core3.util.AEMonitor
class_mon
private List
listeners
private org.gudy.azureus2.core3.util.AEMonitor
listeners_mon
Constructors Summary
private TableStructureEventDispatcher()


	 	 
	  
		listeners = new ArrayList(2);
	
Methods Summary
public voidaddListener(TableStructureModificationListener listener)

		try {
			listeners_mon.enter();

			this.listeners.add(listener);

		} finally {

			listeners_mon.exit();
		}
	
public voidcellInvalidate(TableColumnCore tableColumn, java.lang.Object data_source)

		try {
			listeners_mon.enter();

			Iterator iter = listeners.iterator();
			while (iter.hasNext()) {
				TableStructureModificationListener listener = (TableStructureModificationListener) iter.next();
				listener.cellInvalidate(tableColumn, data_source);
			}
		} finally {

			listeners_mon.exit();
		}
	
public voidcolumnInvalidate(TableColumnCore tableColumn)

		try {
			listeners_mon.enter();

			Iterator iter = listeners.iterator();
			while (iter.hasNext()) {
				TableStructureModificationListener listener = (TableStructureModificationListener) iter.next();
				listener.columnInvalidate(tableColumn);
			}
		} finally {

			listeners_mon.exit();
		}
	
public voidcolumnOrderChanged(int[] iPositions)

		try {
			listeners_mon.enter();

			Iterator iter = listeners.iterator();
			while (iter.hasNext()) {
				TableStructureModificationListener listener = (TableStructureModificationListener) iter.next();
				listener.columnOrderChanged(iPositions);
			}
		} finally {

			listeners_mon.exit();
		}
	
public voidcolumnSizeChanged(TableColumnCore tableColumn)

		try {
			listeners_mon.enter();

			Iterator iter = listeners.iterator();
			while (iter.hasNext()) {
				TableStructureModificationListener listener = (TableStructureModificationListener) iter.next();
				listener.columnSizeChanged(tableColumn);
			}
		} finally {

			listeners_mon.exit();
		}
	
public static com.aelitis.azureus.ui.common.table.TableStructureEventDispatchergetInstance(java.lang.String sTableID)

		try {
			class_mon.enter();

			TableStructureEventDispatcher instance = (TableStructureEventDispatcher) instances.get(sTableID);
			if (instance == null) {
				instance = new TableStructureEventDispatcher();
				instances.put(sTableID, instance);
			}
			return instance;
		} finally {

			class_mon.exit();
		}
	
public voidremoveListener(TableStructureModificationListener listener)

		try {
			listeners_mon.enter();

			this.listeners.remove(listener);
		} finally {

			listeners_mon.exit();
		}
	
public voidtableStructureChanged()

		try {
			listeners_mon.enter();

			Iterator iter = listeners.iterator();
			while (iter.hasNext()) {
				TableStructureModificationListener listener = (TableStructureModificationListener) iter.next();
				listener.tableStructureChanged();
			}
		} finally {

			listeners_mon.exit();
		}