Statistics
| Revision:

svn-document-layout / trunk / org.gvsig.app.document.layout2.app / org.gvsig.app.document.layout2.app.mainplugin / src / main / java / org / gvsig / app / project / documents / layout / fframes / gui / dialogs / AbstractFFrameDialog.java @ 250

History | View | Annotate | Download (2.28 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.app.project.documents.layout.fframes.gui.dialogs;
23

    
24
import javax.swing.JPanel;
25

    
26
import org.slf4j.Logger;
27
import org.slf4j.LoggerFactory;
28
import org.gvsig.app.project.documents.layout.fframes.IFFrame;
29
import org.gvsig.app.project.documents.layout.gui.LayoutPanel;
30
import org.gvsig.tools.observer.ObservableHelper;
31
import org.gvsig.tools.observer.Observer;
32

    
33
/**
34
 * @author gvSIG Team
35
 * @version $Id$
36
 * 
37
 */
38
public abstract class AbstractFFrameDialog extends JPanel implements
39
    IFFrameDialog {
40

    
41
    private static final long serialVersionUID = 262802843678561933L;
42

    
43
    protected static final Logger LOG = LoggerFactory
44
        .getLogger(AbstractFFrameDialog.class);
45

    
46
    protected LayoutPanel layoutPanel = null;
47
    protected IFFrame frame = null;
48
    private ObservableHelper observableHelper = new ObservableHelper();
49

    
50
    public AbstractFFrameDialog(LayoutPanel layoutPanel, IFFrame frame) {
51
        super();
52
        this.layoutPanel = layoutPanel;
53
        this.frame = frame;
54
    }
55

    
56
        public void addObserver(Observer observer) {
57
                observableHelper.addObserver(observer);
58
        }
59

    
60
        public void deleteObserver(Observer observer) {
61
                observableHelper.deleteObserver(observer);
62
        }
63

    
64
        public void deleteObservers() {
65
                observableHelper.deleteObservers();
66
        }
67

    
68
        protected void notifyDialogClosed() {
69
                observableHelper.notifyObservers(this, new FFrameDialogNotification(FFrameDialogNotification.DIALOG_CLOSED));
70
        }
71
}