Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.coreplugin.app / org.gvsig.coreplugin.app.mainplugin / src / main / java / org / gvsig / coreplugin / Consola.java @ 40558

History | View | Annotate | Download (2.67 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.coreplugin;
25

    
26
import org.gvsig.andami.IconThemeHelper;
27
import org.gvsig.andami.PluginServices;
28
import org.gvsig.andami.messages.NotificationManager;
29
import org.gvsig.andami.plugins.Extension;
30

    
31

    
32
/**
33
 * Extensi?n que registra un frame en la aplicaci?n que recibe los eventos de
34
 * la consola de la aplicaci?n y los muestra en el frame
35
 */
36
public class Consola extends Extension {
37
        static PluginServices ps;
38
    public static ConsolaFrame consolaFrame;
39
    public static NotificationDialogNew notificationDialogNew;
40
    public static NotificationDialog notificationDialog;
41

    
42
    /**
43
     * @see com.iver.mdiApp.IExtension#initialize()
44
     */
45
    public void initialize() {
46
            IconThemeHelper.registerIcon("action", "show-console", this);
47
            
48
            ps = PluginServices.getPluginServices(this);
49
            consolaFrame = new ConsolaFrame();
50
            NotificationManager.addNotificationListener(consolaFrame);
51

    
52
            notificationDialogNew = new NotificationDialogNew();
53
            NotificationManager.addNotificationListener(notificationDialogNew );
54

    
55
//            notificationDialog= new NotificationDialog();
56
//            NotificationManager.addNotificationListener(notificationDialog);
57

    
58
    }
59

    
60
        /* (non-Javadoc)
61
         * @see com.iver.andami.plugins.Extension#execute(java.lang.String)
62
         */
63
        public void execute(String actionCommand) {
64
                if( "show-console".equalsIgnoreCase(actionCommand) ) {
65
                        consolaFrame.setSize(400, 325);
66
                        consolaFrame.setVisible(true);
67
                PluginServices.getMDIManager().addWindow(consolaFrame);
68
                }
69
        }
70

    
71
        /* (non-Javadoc)
72
         * @see com.iver.andami.plugins.Extension#isEnabled()
73
         */
74
        public boolean isEnabled() {
75
                return true;
76
        }
77

    
78
        /* (non-Javadoc)
79
         * @see com.iver.andami.plugins.Extension#isVisible()
80
         */
81
        public boolean isVisible() {
82
                return true;
83
        }
84
}