📄 operatorpanelfactory.java
字号:
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package eti.bi.alphaminer.ui;
import java.util.Vector;
import eti.bi.alphaminer.core.Node.Stencil;
import eti.bi.alphaminer.tools.SystemTools.OperatorToolPage.AdvanceOperatorPanel;
import eti.bi.exception.SysException;
/**
* OperatorPanelFactory is responsible for creating a OperatorPanel
* based on the given type of platform.
*/
public class OperatorPanelFactory {
/* SAS Enterprise Miner */
public static final int SAS_EM = 0;
/* IBM Intelligent Miner */
public static final int IBM_IM = 1;
/*ETI's Data Mining Engine*/
public static final int ETI_DM = 2;
/**
* Creates an instance of OperatorPanel based on a specific platform type.
* @param a_PlatformType type of platform.
* @return OperatorPanel the OperatorPanel based on the given type of platform.
*/
public static OperatorPanel createInstance(int a_PlatformType) {
OperatorPanel operator = null;
/*
if (a_PlatformType == OperatorPanelFactory.SAS_EM)
operator = new SASOperatorPanel();
else if(a_PlatformType == OperatorPanelFactory.ETI_DM)
operator = new ETIOperatorPanel();
*/
return operator;
}
/**
* Creates an instance of OperatorPanel based on a specific platform type.
* @param a_PlatformType type of platform.
* @return OperatorPanel the OperatorPanel based on the given type of platform.
* @throws SysException
*/
// <<27/07/2005 Kenneth Lai: Modify for JHelp
// public static OperatorPanel createInstance(Vector aStencils) throws SysException {
//
///* OperatorPanel operator = null;
//
// String panelClassName = "eti.bi.alphaminer.ui." + aStencilName + "OperatorPanel";
// Class panelClass;
// try {
//
// panelClass = Class.forName(panelClassName);
// operator = (OperatorPanel) panelClass.newInstance();
// } catch (Exception e) {
// throw new SysException("Cannot Create Stencil Instance for ["+aStencilName+"]");
// }
//*/
//// OperatorPanel operatorPanel = new ETIOperatorPanel();
//// OperatorPanel operatorPanel = new AdvanceOperatorPanel(aStencils);
// OperatorPanel OperatorPanel = new AdvanceOperatorPanel(aStencils);
//
// return OperatorPanel;
// }
public static AdvanceOperatorPanel createInstance(Vector<Stencil> aStencils) throws SysException {
/* OperatorPanel operator = null;
String panelClassName = "eti.bi.alphaminer.ui." + aStencilName + "OperatorPanel";
Class panelClass;
try {
panelClass = Class.forName(panelClassName);
operator = (OperatorPanel) panelClass.newInstance();
} catch (Exception e) {
throw new SysException("Cannot Create Stencil Instance for ["+aStencilName+"]");
}
*/
// OperatorPanel operatorPanel = new ETIOperatorPanel();
// OperatorPanel operatorPanel = new AdvanceOperatorPanel(aStencils);
AdvanceOperatorPanel advanceOperatorPanel = new AdvanceOperatorPanel(aStencils);
return advanceOperatorPanel;
}
// 27/07/2005 Kenneth Lai: Modify for JHelp>>
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -