Statistics
| Revision:

root / branches / v2_0_0_prep / frameworks / _fwAndami / src / org / gvsig / andami / plugins / Extension.java @ 36709

History | View | Annotate | Download (3.79 KB)

1
package org.gvsig.andami.plugins;
2

    
3
import org.gvsig.andami.PluginServices;
4
import org.gvsig.andami.PluginsLocator;
5
import org.gvsig.andami.plugins.status.IExtensionStatus;
6

    
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004-2007 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
47
/* CVS MESSAGES:
48
 *
49
 * $Id: Extension.java 36709 2011-10-10 12:20:28Z jjdelcerro $
50
 * $Log$
51
 * Revision 1.12  2007-09-17 06:33:34  caballero
52
 * unsaveddata
53
 *
54
 * Revision 1.11  2007/07/19 12:01:06  cesar
55
 * Add support for the new Andami termination process (and the unsaved data dialog)
56
 *
57
 * Revision 1.10  2007/05/31 07:42:17  cesar
58
 * Add ExclusiveUIExtension interface and clean the IExtension interface; update Extension, ExtensionDecorator and Launcher to reflect this change; add missing comments, translate existing ones to english
59
 *
60
 * Revision 1.9  2007/05/31 07:00:47  cesar
61
 * Add missing comments, translate existing ones to english
62
 *
63
 * Revision 1.8  2006/11/27 11:33:05  jmvivo
64
 * Soporte para que una clase tenga el control de la visibilidad y estado de las acciones del resto de extensiones.
65
 *
66
 * Revision 1.7  2006/09/15 10:39:18  caballero
67
 * multisplah y postInitialize
68
 *
69
 * Revision 1.6  2006/07/31 18:22:13  cesar
70
 * Rename finalize method to terminate method
71
 *
72
 * Revision 1.5  2006/05/02 15:53:06  jorpiell
73
 * Se ha cambiado la interfaz Extension por dos clases: una interfaz (IExtension) y una clase abstract(Extension). A partir de ahora todas las extensiones deben heredar de Extension
74
 *
75
 *
76
 */
77
/**
78
 * Extensions are the way in which plugins extend Andami. Extensions
79
 * can add controls to user interface (GUI) and execute some code
80
 * when controls are activated. Every class implementing
81
 * {@link IExtension} is an extension, but directly implementing
82
 * that interface is discouraged. The preferred way to create
83
 * an extension is extending this absctract class.
84
 *
85
 * @see IExtension
86
 *
87
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
88
 */
89
public abstract class Extension implements IExtension {
90

    
91
        /*
92
         *  (non-Javadoc)
93
         * @see com.iver.andami.plugins.IExtension#terminate()
94
         */
95
        public void terminate(){
96

    
97
        }
98
        /*
99
         *  (non-Javadoc)
100
         * @see com.iver.andami.plugins.IExtension#postInitialize()
101
         */
102
        public void postInitialize(){
103

    
104
        }
105

    
106
    /*
107
         *  (non-Javadoc)
108
         * @see com.iver.andami.plugins.IExtension#getStatus()
109
         */
110
    public IExtensionStatus getStatus() {
111
            return null;
112
    }
113

    
114
        /*
115
         *  (non-Javadoc)
116
         * @see com.iver.andami.plugins.IExtension#getStatus(IExtension extension)
117
         */
118
        public IExtensionStatus getStatus(IExtension extension) {
119
                return extension.getStatus();
120
        }
121
        
122
        public String getText(String msg) {
123
            return PluginsLocator.getManager().getText(this, msg);
124
        }
125
        
126
        public PluginServices  getPlugin() {
127
                return PluginsLocator.getManager().getPlugin(this.getClass());
128
        }
129

    
130
}
131