/** * Add a listener to the chain. * The listener must be cloned and added to all records on the list. * @param listener The listener to add. */ public void addListener(Record record, FileListener listener) { super.addListener(record, listener); if (listener.getOwner() == this.getRecord()) // Only replicate listeners added to base. { Iterator<BaseTable> iterator = this.getTables(); while (iterator.hasNext()) { BaseTable table = iterator.next(); if ((table != null) && (table != this.getNextTable())) { FileListener newBehavior = null; // Clone the file behaviors try { newBehavior = (FileListener)listener.clone(); // Clone the file behaviors } catch (CloneNotSupportedException ex) { newBehavior = null; } record = table.getRecord(); if (newBehavior != null) table.addListener(record, newBehavior); // Add them to the new query } } } } /**
/** * Add a listener to the chain. * The listener must be cloned and added to all records on the list. * @param listener The listener to add. */ public void addListener(Record record, FileListener listener) { super.addListener(record, listener); if (listener.getOwner() == this.getRecord()) // Only replicate listeners added to base. { Iterator<BaseTable> iterator = this.getTables(); while (iterator.hasNext()) { BaseTable table = iterator.next(); if ((table != null) && (table != this.getNextTable())) { FileListener newBehavior = null; // Clone the file behaviors try { newBehavior = (FileListener)listener.clone(); // Clone the file behaviors } catch (CloneNotSupportedException ex) { newBehavior = null; } record = table.getRecord(); if (newBehavior != null) table.addListener(record, newBehavior); // Add them to the new query } } } } /**
/** * Add a listener to the chain. * The listener must be cloned and added to all records on the list. * @param listener The listener to add. */ public void addListener(Record record, FileListener listener) { super.addListener(record, listener); if (listener.getOwner() == this.getRecord()) // Only replicate listeners added to base. { Iterator<BaseTable> iterator = this.getTables(); while (iterator.hasNext()) { BaseTable table = iterator.next(); if ((table != null) && (table != this.getNextTable())) { FileListener newBehavior = null; // Clone the file behaviors try { newBehavior = (FileListener)listener.clone(); // Clone the file behaviors } catch (CloneNotSupportedException ex) { newBehavior = null; } record = table.getRecord(); if (newBehavior != null) table.addListener(record, newBehavior); // Add them to the new query } } } } /**
newBehavior = (FileListener)listener.clone(); // Clone the file behaviors } catch (CloneNotSupportedException ex) { newBehavior = null;
newBehavior = (FileListener)listener.clone(); // Clone the file behaviors } catch (CloneNotSupportedException ex) { newBehavior = null;
newBehavior = (FileListener)listener.clone(); // Clone the file behaviors } catch (CloneNotSupportedException ex) { newBehavior = null;