Package weka.gui

Class ViewerDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, RootPaneContainer, WindowConstants

public class ViewerDialog extends JDialog implements ChangeListener
A downsized version of the ArffViewer, displaying only one Instances-Object.
Version:
$Revision: 14494 $
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
  • Field Details

    • APPROVE_OPTION

      public static final int APPROVE_OPTION
      Signifies an OK property selection
      See Also:
    • CANCEL_OPTION

      public static final int CANCEL_OPTION
      Signifies a cancelled property selection
      See Also:
  • Constructor Details

    • ViewerDialog

      public ViewerDialog(Frame parent)
      initializes the dialog with the given parent
      Parameters:
      parent - the parent for this dialog
  • Method Details

    • setInstances

      public void setInstances(Instances inst)
      sets the instances to display
    • getInstances

      public Instances getInstances()
      returns the currently displayed instances
    • isChanged

      public boolean isChanged()
      returns whether the data has been changed
      Returns:
      true if the data has been changed
    • stateChanged

      public void stateChanged(ChangeEvent e)
      Invoked when the target of the listener has changed its state.
      Specified by:
      stateChanged in interface ChangeListener
    • showDialog

      public int showDialog()
      Pops up the modal dialog and waits for Cancel or OK.
      Returns:
      either APPROVE_OPTION, or CANCEL_OPTION
    • showDialog

      public int showDialog(Instances inst)
      Pops up the modal dialog and waits for Cancel or OK.
      Parameters:
      inst - the instances to display
      Returns:
      either APPROVE_OPTION, or CANCEL_OPTION