程序包 weka.gui

类 SetInstancesPanel

所有已实现的接口:
ImageObserver, MenuContainer, Serializable, Accessible

public class SetInstancesPanel extends JPanel
A panel that displays an instance summary for a set of instances and lets the user open a set of instances from either a file or URL. Instances may be obtained either in a batch or incremental fashion. If incremental reading is used, then the client should obtain the Loader object (by calling getLoader()) and read the instances one at a time. If batch loading is used, then SetInstancesPanel will load the data into memory inside of a separate thread and notify the client when the operation is complete. The client can then retrieve the instances by calling getInstances().
版本:
$Revision: 9354 $
作者:
Len Trigg (trigg@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • SetInstancesPanel

      public SetInstancesPanel()
      Default constructor
    • SetInstancesPanel

      public SetInstancesPanel(boolean showZeroInstancesAsUnknown, ConverterFileChooser chooser)
      Create the panel.
      参数:
      showZeroInstancesAsUnknown - whether to display zero instances as unknown (e.g., when reading data incrementally)
      chooser - the file chooser to use (may be null to use the default file chooser)
  • 方法详细资料

    • setParentFrame

      public void setParentFrame(JFrame parent)
      Sets the frame, this panel resides in. Used for displaying the close button, i.e., the close-button is visible if the given frame is not null.
      参数:
      parent - the parent frame
    • getParentFrame

      public JFrame getParentFrame()
      Returns the current frame the panel knows of, that it resides in. Can be null.
      返回:
      the current parent frame
    • closeFrame

      public void closeFrame()
      closes the frame, i.e., the visibility is set to false
    • setInstancesFromFileQ

      public void setInstancesFromFileQ()
      Queries the user for a file to load instances from, then loads the instances in a background process. This is done in the IO thread, and an error message is popped up if the IO thread is busy.
    • setInstancesFromURLQ

      public void setInstancesFromURLQ()
      Queries the user for a URL to load instances from, then loads the instances in a background process. This is done in the IO thread, and an error message is popped up if the IO thread is busy.
    • setInstances

      public void setInstances(Instances i)
      Updates the set of instances that is currently held by the panel
      参数:
      i - a value of type 'Instances'
    • getInstances

      public Instances getInstances()
      Gets the set of instances currently held by the panel
      返回:
      a value of type 'Instances'
    • getLoader

      public Loader getLoader()
      Gets the currently used Loader
      返回:
      a value of type 'Loader'
    • getSummary

      public InstancesSummaryPanel getSummary()
      Gets the instances summary panel associated with this panel
      返回:
      the instances summary panel
    • setReadIncrementally

      public void setReadIncrementally(boolean incremental)
      Sets whether or not instances should be read incrementally by the Loader. If incremental reading is used, then the client should obtain the Loader object (by calling getLoader()) and read the instances one at a time. If batch loading is used, then SetInstancesPanel will load the data into memory inside of a separate thread and notify the client when the operation is complete. The client can then retrieve the instances by calling getInstances().
      参数:
      incremental - true if instances are to be read incrementally
    • getReadIncrementally

      public boolean getReadIncrementally()
      Gets whether instances are to be read incrementally or not
      返回:
      true if instances are to be read incrementally
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener l)
      Adds a PropertyChangeListener who will be notified of value changes.
      覆盖:
      addPropertyChangeListener 在类中 Container
      参数:
      l - a value of type 'PropertyChangeListener'
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener l)
      Removes a PropertyChangeListener.
      覆盖:
      removePropertyChangeListener 在类中 Component
      参数:
      l - a value of type 'PropertyChangeListener'