Package com.gwesm.ui

Source Code of com.gwesm.ui.TestStatisticsView

package com.gwesm.ui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

import com.gwesm.core.Character;
import com.gwesm.core.GWESM;
import com.gwesm.dao.CastorDAO;
import com.gwesm.dao.DAO;
import com.gwesm.dao.DAOException;
import com.gwesm.presenters.StatsPresenter;

public class TestStatisticsView {

  /**
   * @param args
   * @throws DAOException
   */
  public static void main(final String[] args) throws DAOException {

    DAO dao = new CastorDAO();
    GWESM gwesm = dao.loadData("testsData\\GWESM-Sample.xml");

    Character character = gwesm.getAccounts().get(0).getCharacters().get(0);

    Display display = new Display();
    final Shell shell = new Shell(display, SWT.CLOSE | SWT.TITLE | SWT.MIN);
    shell.setLayout(new FillLayout());

    StatsPresenter presenter = new StatsPresenter(gwesm, character);

    StatisticsView view = new StatisticsView(shell, presenter);

    shell.open();

    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }

  }

}
TOP

Related Classes of com.gwesm.ui.TestStatisticsView

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.