/** * Handles the componentRemoved container event by invoking the componentRemoved methods on * listener-a and listener-b. * * @param e the component event */ public void componentRemoved(ContainerEvent e) { ((ContainerListener) a).componentRemoved(e); ((ContainerListener) b).componentRemoved(e); }
/** * Fires an items changed event. * * @param slots The slots that changed. */ public void fireItemsChanged(int[] slots) { for (ContainerListener listener : listeners) { listener.itemsChanged(this, slots); } }
/** * Adds a listener. * * @param listener The listener to add. */ public void addListener(ContainerListener listener) { listeners.add(listener); listener.itemsChanged(this); }
/** Fires an items changed event. */ public void fireItemsChanged() { for (ContainerListener listener : listeners) { listener.itemsChanged(this); } }