Revision 38242 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/imp/DefaultAppgvSIGManager.java

View differences:

DefaultAppgvSIGManager.java
34 34
import java.util.Iterator;
35 35
import java.util.List;
36 36

  
37
import javax.swing.JOptionPane;
38

  
37 39
import org.cresques.cts.IProjection;
40
import org.slf4j.Logger;
41
import org.slf4j.LoggerFactory;
42

  
38 43
import org.gvsig.about.AboutLocator;
39 44
import org.gvsig.about.AboutManager;
40 45
import org.gvsig.andami.Launcher;
......
86 91
 */
87 92
public class DefaultAppgvSIGManager implements ApplicationManager {
88 93

  
94
    private static Logger logger = LoggerFactory.getLogger(DefaultAppgvSIGManager.class);
89 95
	private static final String EPNAME_PREPARE_OPEN_DATASTORE = "org.gvsig.datastore.open.prepare"; //"PrepareOpenDataStore";
90 96
	private static final String EPNAME_PREPARE_OPEN_DATASTOREPARAMETERS = "org.gvsig.datastoreparameters.open.prepare"; //"PrepareOpenDataStoreParameters";
91 97
	private static final String EPNAME_PREPARE_OPEN_LAYER = "org.gvsig.layer.open.prepare"; // "PrepareOpenLayer";
......
405 411
		return Launcher.getAndamiConfig().getLocaleLanguage();
406 412
	}
407 413

  
414
	/* (non-Javadoc)
415
	 * @see org.gvsig.app.ApplicationManager#message(java.lang.String, int)
416
	 */
417
	public void message(String message, int message_type) {
418
        
419
	    String msg = message;
420
	    if (message.startsWith("_")) {
421
	        msg = PluginServices.getText(this, message);
422
	    }
423
	    switch (message_type) {
424
	    
425
        case JOptionPane.ERROR_MESSAGE:
426
            PluginServices.getMainFrame().getStatusBar().setErrorText(msg);
427
            break;
428
        case JOptionPane.WARNING_MESSAGE:
429
            PluginServices.getMainFrame().getStatusBar().setWarningText(msg);
430
            break;
431
        default:
432
            try {
433
                throw new IllegalArgumentException("message_type");
434
            } catch (IllegalArgumentException ex) {
435
                logger.info("Illegal message type in message()", ex);
436
                
437
            }
438
        case JOptionPane.INFORMATION_MESSAGE:
439
          PluginServices.getMainFrame().getStatusBar().setInfoText(msg);
440
          break;
441
	    
442
	    }
443
	    
444
	}
408 445
}

Also available in: Unified diff