View Javadoc

1   /*
2    * XMLCV - Gestion de CV sous forme XML
3    * 
4    * Copyright (C) 2004-2005, Damien Raude-Morvan
5    * 
6    * This file is part of XMLCV.
7    *
8    * XMLCV is free software; you can redistribute it and/or modify
9    * it under the terms of the GNU General Public License as published by
10   * the Free Software Foundation; either version 2 of the License, or
11   * (at your option) any later version.
12   *
13   * XMLCV is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   * GNU General Public License for more details.
17   *
18   * You should have received a copy of the GNU General Public License
19   * along with XMLCV; if not, write to the Free Software
20   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21   * 
22   * Contacts :
23   * - Sébastien Mathy <smathy@tuxfamily.org>
24   * - Emmanuel Berre <eberre@tuxfamily.org>
25   * - Damien Raude-Morvan <drazzib@drazzib.com>
26   */
27  package org.xmlcv.gui.listeners;
28  
29  import javax.swing.event.InternalFrameEvent;
30  import javax.swing.event.InternalFrameListener;
31  
32  import org.xmlcv.gui.action.ActionOutHTML;
33  import org.xmlcv.gui.action.ActionOutPDF;
34  import org.xmlcv.gui.action.ActionOutPS;
35  import org.xmlcv.gui.action.ActionOutRTF;
36  import org.xmlcv.gui.action.ActionPreview;
37  import org.xmlcv.gui.action.ActionSaveCV;
38  
39  /***
40   * Internal frame listener
41   * 
42   * @version $Revision: 114 $
43   * @author <a href="mailto:drazzib@drazzib.com">Damien Raude-Morvan</a>
44   */
45  public class CVInternalFrameListener implements InternalFrameListener {
46  
47  	public void internalFrameActivated(InternalFrameEvent e) {
48  		ActionOutHTML.status(true);
49  		ActionOutPDF.status(true);
50  		ActionOutPS.status(true);
51  		ActionOutRTF.status(true);
52  		ActionPreview.status(true);
53  		ActionSaveCV.status(true);
54  	}
55  
56  	public void internalFrameDeactivated(InternalFrameEvent e) {
57  		ActionOutHTML.status(false);
58  		ActionOutPDF.status(false);
59  		ActionOutPS.status(false);
60  		ActionOutRTF.status(false);
61  		ActionPreview.status(false);
62  		ActionSaveCV.status(false);
63  	}
64  
65  	public void internalFrameOpened(InternalFrameEvent e) {
66  		ActionOutHTML.status(true);
67  		ActionOutPDF.status(true);
68  		ActionOutPS.status(true);
69  		ActionOutRTF.status(true);
70  		ActionPreview.status(true);
71  		ActionSaveCV.status(true);
72  	}
73  
74  	public void internalFrameClosed(InternalFrameEvent e) {
75  		ActionOutHTML.status(false);
76  		ActionOutPDF.status(false);
77  		ActionOutPS.status(false);
78  		ActionOutRTF.status(false);
79  		ActionPreview.status(false);
80  		ActionSaveCV.status(false);
81  	}
82  
83  	public void internalFrameClosing(InternalFrameEvent e) {
84  		ActionOutHTML.status(false);
85  		ActionOutPDF.status(false);
86  		ActionOutPS.status(false);
87  		ActionOutRTF.status(false);
88  		ActionPreview.status(false);
89  		ActionSaveCV.status(false);
90  	}
91  
92  	public void internalFrameIconified(InternalFrameEvent e) {
93  		ActionOutHTML.status(false);
94  		ActionOutPDF.status(false);
95  		ActionOutPS.status(false);
96  		ActionOutRTF.status(false);
97  		ActionPreview.status(false);
98  		ActionSaveCV.status(false);
99  	}
100 
101 	public void internalFrameDeiconified(InternalFrameEvent e) {
102 		ActionOutHTML.status(true);
103 		ActionOutPDF.status(true);
104 		ActionOutPS.status(true);
105 		ActionOutRTF.status(true);
106 		ActionPreview.status(true);
107 		ActionSaveCV.status(true);
108 	}
109 
110 }