Package org.fenrir.yggdrasil.ui

Source Code of org.fenrir.yggdrasil.ui.WindowManagementServiceProvider

package org.fenrir.yggdrasil.ui;

import org.fenrir.yggdrasil.core.AbstractApplication;
import org.fenrir.yggdrasil.core.exception.ApplicationException;
import org.fenrir.yggdrasil.core.extension.IWindowManagementService;

/**
* TODO v1.0 Javadoc
* @author Antonio Archilla Nava
* @version v0.1.20130315
*/
public class WindowManagementServiceProvider implements IWindowManagementService
{
  @Override
  public void initialize(AbstractApplication application)
  {
    ApplicationWindowManager.getInstance().initialize(application);
  }

  @Override
  public void notifyPreWindowOpenEvent()
  {
    ApplicationWindowManager.getInstance().notifyPreWindowOpenEvent();
  }
 
  @Override
  public void displayErrorMessage(String message, Throwable error)
  {
    ApplicationWindowManager.getInstance().displayErrorMessage(message, error);
  }

  @Override
  public void displayStandaloneErrorMessage(String message, Throwable error)
  {
    ApplicationWindowManager.displayStandaloneErrorMessage(message, error);
  }

  @Override
  public void createWindow() throws ApplicationException
  {
    try{
      ApplicationWindowManager.getInstance().createWindow();
    }
    catch(Exception e){
      throw new ApplicationException("S'ha produit un error durant la creació de la finestra principal", e);
    }
  }

  @Override
  public void showWindow()
  {
    ApplicationWindowManager.getInstance().showWindow();
  }
}
TOP

Related Classes of org.fenrir.yggdrasil.ui.WindowManagementServiceProvider

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.