Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_2_Build_905 / frameworks / _fwAndami / src / com / iver / andami / ui / mdiFrame / MainFrame.java @ 10767

History | View | Annotate | Download (3.91 KB)

1 1104 fjp
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41 598 fernando
package com.iver.andami.ui.mdiFrame;
42
43
import java.awt.event.ActionListener;
44
45 2753 fjp
import javax.swing.JComponent;
46 9490 fjp
import javax.swing.JMenuBar;
47 598 fernando
48 10463 cesar
import org.gvsig.gui.beans.controls.IControl;
49
50 5275 jaume
import com.iver.andami.plugins.PluginClassLoader;
51 10463 cesar
import com.iver.andami.plugins.config.generate.Label;
52 5275 jaume
import com.iver.andami.plugins.config.generate.Menu;
53 2753 fjp
54 5275 jaume
55 598 fernando
/**
56
 *
57
 */
58
public interface MainFrame {
59 1340 fernando
        /**
60
         * A?ade el men? a la barra de men?s
61
         *
62
         * @param menu Texto del menu
63
         * @param listener objeto que recibe los eventos del menu
64
         * @param loader ClassLoader del plugin que instala el men?
65
         */
66
        public void addMenu(Menu menu, ActionListener listener,
67
                PluginClassLoader loader);
68 598 fernando
69 1340 fernando
        /**
70
         * Cambia el nombre completo del menu, y por tanto su ubicaci?n. El array
71
         * de strings representa la ruta  completa del men?. por ejemplo un array
72
         * {"ver", "ventanas", "consola"} referencia al men? que se encuentra en
73
         * ver/ventanas/consola. Hay que tener en cuenta que los elementos en el
74
         * array son claves en el fichero de traducciones del plugin
75
         *
76
         * @param menu Ruta completa del men?
77
         * @param newName Nuevo nombre del menu
78
         * @param loader ClassLoader del plugin que a?adi? el menu
79
         *
80
         * @throws NoSuchMenuException Si no existe ning?n menu en la
81
         * ruta menu
82
         */
83
        public void changeMenuName(String[] menu, String newName,
84
                PluginClassLoader loader) throws NoSuchMenuException;
85 598 fernando
86 1340 fernando
        /**
87
         * Elimina el men? que se pasa como par?metro si est? a?adido. Si no se
88
         * encuentra el men? no se hace nada
89
         *
90
         * @param menu referencia al men? que se quiere eliminar
91
         */
92
        public void removeMenu(Menu menu);
93 598 fernando
94 1340 fernando
        /**
95
         * Itera por los controles preguntando a las extensiones si estos est?n
96
         * habilitados y visibles
97
         */
98
        public void enableControls();
99
100
        /**
101 2753 fjp
         * Sirve para establecec el mensaje en la barra de estado asociado a una etiqueta
102 1340 fernando
         *
103 3897 caballero
         * @return main StatusBar
104 1340 fernando
         */
105
        public NewStatusBar getStatusBar();
106
        /**
107
         * DOCUMENT ME!
108
         *
109
         * @param titulo DOCUMENT ME!
110
         */
111
        public void setTitle(String titulo);
112 3897 caballero
113 2753 fjp
    /**
114
     * Get a JComponent previously added by name. For example
115
     * you can use it if you need to obtain a JToolBar to
116
     * add some customized component.
117
     * @param name
118
     * @return the JComponent or null if none has been found
119
     */
120
    public JComponent getComponentByName(String name);
121 3897 caballero
    /**
122
     * You can use this function to select the appropiate
123
     * tool inside the toolbars
124
     */
125
    public void setSelectedTool(String actionCommand);
126
127 9490 fjp
    /**
128
         * @return the internal menu bar. Useful to work directly with menus
129
         */
130
        public JMenuBar getJMenuBar();
131 10463 cesar
132
133
        public void setStatusBarLabels(Class clase, Label[] label);
134
        public void removeStatusBarLabels(Class clase);
135
        public void addStatusBarControl(Class extensionClass, IControl control);
136 9490 fjp
137 598 fernando
}