public void addPaintPageListener(PaintPageListener listener) {
        // add a listener if it is not already registered
        synchronized (paintPageListeners) {
            if (!paintPageListeners.contains(listener)) {
                paintPageListeners.addElement(listener);
            }
        }
    }