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

📄 abstractdatasource.java

📁 wekaUT是 university texas austin 开发的基于weka的半指导学习(semi supervised learning)的分类器
💻 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. *//* *    AbstractDataSource.java *    Copyright (C) 2002 Mark Hall * */package weka.gui.beans;import javax.swing.JPanel;import javax.swing.JLabel;import javax.swing.ImageIcon;import javax.swing.SwingConstants;import java.util.Vector;import java.awt.*;import java.io.Serializable;/** * Abstract class for objects that can provide instances from some source * * @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a> * @version $Revision: 1.1.1.1 $ * @since 1.0 * @see JPanel * @see DataSource * @see Serializable */public abstract class AbstractDataSource extends JPanel  implements DataSource, Visible, Serializable {  /**   * Default visual for data sources   */  protected BeanVisual m_visual =     new BeanVisual("AbstractDataSource", 		   BeanVisual.ICON_PATH+"DefaultDataSource.gif",		   BeanVisual.ICON_PATH+"DefaultDataSource_animated.gif");    /**   * Objects listening for events from data sources   */  protected Vector m_listeners;  /**   * Creates a new <code>AbstractDataSource</code> instance.   *   */  public AbstractDataSource() {        useDefaultVisual();    setLayout(new BorderLayout());    add(m_visual, BorderLayout.CENTER);    m_listeners = new Vector();  }  /**   * Add a listener   *   * @param dsl a <code>DataSourceListener</code> value   */  public synchronized void addDataSourceListener(DataSourceListener dsl) {    m_listeners.addElement(dsl);  }    /**   * Remove a listener   *   * @param dsl a <code>DataSourceListener</code> value   */  public synchronized void removeDataSourceListener(DataSourceListener dsl) {    m_listeners.remove(dsl);  }  /**   * Add an instance listener   *   * @param dsl a <code>InstanceListener</code> value   */  public synchronized void addInstanceListener(InstanceListener dsl) {    m_listeners.addElement(dsl);  }    /**   * Remove an instance listener   *   * @param dsl a <code>InstanceListener</code> value   */  public synchronized void removeInstanceListener(InstanceListener dsl) {    m_listeners.remove(dsl);  }  /**   * Set the visual for this data source   *   * @param newVisual a <code>BeanVisual</code> value   */  public void setVisual(BeanVisual newVisual) {    m_visual = newVisual;  }  /**   * Get the visual being used by this data source.   *   */  public BeanVisual getVisual() {    return m_visual;  }  /**   * Use the default images for a data source   *   */  public void useDefaultVisual() {    m_visual.loadIcons(BeanVisual.ICON_PATH+"DefaultDataSource.gif",		       BeanVisual.ICON_PATH+"DefaultDataSource_animated.gif");  }}

⌨️ 快捷键说明

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