Package org.eobjects.datacleaner.actions

Source Code of org.eobjects.datacleaner.actions.NewAnalysisJobActionListener

/**
* eobjects.org DataCleaner
* Copyright (C) 2010 eobjects.org
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA  02110-1301  USA
*/
package org.eobjects.datacleaner.actions;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.inject.Inject;
import javax.inject.Singleton;

import org.eobjects.datacleaner.guice.DCModule;
import org.eobjects.datacleaner.windows.AnalysisJobBuilderWindow;

import com.google.inject.Guice;
import com.google.inject.Injector;

@Singleton
public final class NewAnalysisJobActionListener implements ActionListener {

  private final DCModule _parentModule;

  @Inject
  protected NewAnalysisJobActionListener(DCModule parentModule) {
    _parentModule = parentModule;
  }

  @Override
  public void actionPerformed(ActionEvent e) {
    Injector injector = Guice.createInjector(new DCModule(_parentModule, null));
    injector.getInstance(AnalysisJobBuilderWindow.class).open();
  }

}
TOP

Related Classes of org.eobjects.datacleaner.actions.NewAnalysisJobActionListener

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.