Skip to content

Commit

Permalink
Fixed problem with JSX not invoking constructor when loading saved se…
Browse files Browse the repository at this point in the history
…ssion.
  • Loading branch information
Pierre-Luc Paour committed Jun 23, 2003
1 parent 789f19e commit 4e26e0f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions com/gallery/GalleryRemote/GalleryAbstractListModel.java
Expand Up @@ -40,6 +40,7 @@ public abstract class GalleryAbstractListModel implements ListModel, Serializabl
* @param l the <code>ListDataListener</code> to be added
*/
public void addListDataListener(ListDataListener l) {
if (listenerList == null) listenerList = new EventListenerList();
listenerList.add(ListDataListener.class, l);
}

Expand All @@ -51,6 +52,7 @@ public void addListDataListener(ListDataListener l) {
* @param l the <code>ListDataListener</code> to be removed
*/
public void removeListDataListener(ListDataListener l) {
if (listenerList == null) listenerList = new EventListenerList();
listenerList.remove(ListDataListener.class, l);
}

Expand All @@ -69,6 +71,7 @@ public void removeListDataListener(ListDataListener l) {
* @since 1.4
*/
public ListDataListener[] getListDataListeners() {
if (listenerList == null) listenerList = new EventListenerList();
return (ListDataListener[])listenerList.getListeners(
ListDataListener.class);
}
Expand All @@ -90,6 +93,7 @@ public ListDataListener[] getListDataListeners() {
*/
protected void fireContentsChanged(Object source, int index0, int index1)
{
if (listenerList == null) listenerList = new EventListenerList();
Object[] listeners = listenerList.getListenerList();
ListDataEvent e = null;

Expand Down Expand Up @@ -120,6 +124,7 @@ protected void fireContentsChanged(Object source, int index0, int index1)
*/
protected void fireIntervalAdded(Object source, int index0, int index1)
{
if (listenerList == null) listenerList = new EventListenerList();
Object[] listeners = listenerList.getListenerList();
ListDataEvent e = null;

Expand Down Expand Up @@ -150,6 +155,7 @@ protected void fireIntervalAdded(Object source, int index0, int index1)
*/
protected void fireIntervalRemoved(Object source, int index0, int index1)
{
if (listenerList == null) listenerList = new EventListenerList();
Object[] listeners = listenerList.getListenerList();
ListDataEvent e = null;

Expand Down Expand Up @@ -199,6 +205,7 @@ protected void fireIntervalRemoved(Object source, int index0, int index1)
* @since 1.3
*/
public EventListener[] getListeners(Class listenerType) {
if (listenerList == null) listenerList = new EventListenerList();
return listenerList.getListeners(listenerType);
}
}

0 comments on commit 4e26e0f

Please sign in to comment.