Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libCorePlugin / src / org / gvsig / coreplugin / StatusBar.java @ 37843

History | View | Annotate | Download (2.84 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.coreplugin;
23

    
24
import org.gvsig.andami.PluginServices;
25
import org.gvsig.andami.messages.MessageEvent;
26
import org.gvsig.andami.messages.NotificationListener;
27
import org.gvsig.andami.messages.NotificationManager;
28
import org.gvsig.andami.plugins.Extension;
29

    
30
/**
31
 * Plugin que escucha las notificaciones que recive la aplicaci?n y las muestra
32
 * en la barra de estado
33
 */
34
public class StatusBar extends Extension implements NotificationListener {
35

    
36
    /**
37
     * @see com.iver.mdiApp.IExtension#initialize()
38
     */
39
    public void initialize() {
40
        NotificationManager.addNotificationListener(this);
41
    }
42

    
43
    /**
44
     * @see com.iver.mdiApp.NotificationListener#errorEvent(java.lang.String)
45
     */
46
    public void errorEvent(MessageEvent e) {
47
        PluginServices.getMainFrame().getStatusBar()
48
            .setErrorText(e.getMessages()[0]);
49
    }
50

    
51
    /**
52
     * @see com.iver.mdiApp.NotificationListener#warningEvent(java.lang.String)
53
     */
54
    public void warningEvent(MessageEvent e) {
55
        PluginServices.getMainFrame().getStatusBar()
56
            .setWarningText(e.getMessages()[0]);
57
    }
58

    
59
    /**
60
     * @see com.iver.mdiApp.NotificationListener#infoEvent(java.lang.String)
61
     */
62
    public void infoEvent(MessageEvent e) {
63
        PluginServices.getMainFrame().getStatusBar()
64
            .setInfoText(e.getMessages()[0]);
65
    }
66

    
67
    /*
68
     * (non-Javadoc)
69
     * 
70
     * @see com.iver.andami.plugins.Extension#execute(java.lang.String)
71
     */
72
    public void execute(String actionCommand) {
73
        // TODO Auto-generated method stub
74

    
75
    }
76

    
77
    /*
78
     * (non-Javadoc)
79
     * 
80
     * @see com.iver.andami.plugins.Extension#isEnabled()
81
     */
82
    public boolean isEnabled() {
83
        // TODO Auto-generated method stub
84
        return false;
85
    }
86

    
87
    /*
88
     * (non-Javadoc)
89
     * 
90
     * @see com.iver.andami.plugins.Extension#isVisible()
91
     */
92
    public boolean isVisible() {
93
        // TODO Auto-generated method stub
94
        return false;
95
    }
96

    
97
}