⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resultview.java

📁 一个数据挖掘软件ALPHAMINERR的整个过程的JAVA版源代码
💻 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.
 */

/*
 * Created on 2005/1/12
 *
 * $Author$
 * $Date$
 * $Revision$
 * 
 * This abstract class is the parent class of all type of result view, 
 * the view object extends JPanel to visualize outputs from operators 
 */
package eti.bi.alphaminer.operation.result;


import java.awt.BorderLayout;

import javax.swing.JPanel;

import eti.bi.common.Locale.Resource;
import eti.bi.exception.AppException;
import eti.bi.exception.SysException;

/**
 * @author kelvinj
 *
 */
public abstract class ResultView extends JPanel{

	/* Types of the result that could be generated by operators */
	public final static int TYPE_TEXT = 0;
	public final static int TYPE_DATA = 1;
	public final static int TYPE_TABLE = 2;
	public final static int TYPE_GRAPH = 3;
	public final static int TYPE_PMML = 4;
	
	// Text view would be used if it's not specified
	protected int m_ViewType = TYPE_TEXT;
	
	private String m_defaultViewName = Resource.srcStr("Results");
	
	// The namne of the view, it would be shown on the pane 
	// This view name is replaced by the name in JPanel, use setName() and getName() instead
//	protected String m_ViewName = "Result View";
	
	public ResultView(String viewName)
	{
		setLayout(new BorderLayout());
		setName(viewName);
//		m_ViewName = viewName;
	}
	
	public ResultView(String viewName, OperatorResult a_OperatorResult)
	{
		setLayout(new BorderLayout());
		setName(viewName);
//		m_ViewName = viewName;
	}
	
	public ResultView(OperatorResult a_OperatorResult)
	{
		setLayout(new BorderLayout());
		setName(m_defaultViewName);
	}

	/* Return the view type*/
	public int getViewType()
	{
		return m_ViewType;
	}
	
	public void setViewName(String a_ViewName)
	{
		// set the name to JPanel
		setName(a_ViewName);
	}

	public String getViewName()
	{
		// get name from JPanel
		return getName();
	}
	
	/* The abstract method that the child classes have to implemet
	 * This is to export the result to out files or databases
	 */
	public abstract void export() throws SysException, AppException;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -