Package weka.gui.explorer

Examples of weka.gui.explorer.Explorer$ExplorerPanel


      }
    }
  }
 
  public void showExplorer(String fileToLoad) {
    Explorer expl = null;
    if (m_ExplorerFrame == null) {
      m_ExplorerBut.setEnabled(false);
      m_ExplorerFrame = new JFrame("Weka Explorer");
      m_ExplorerFrame.setIconImage(m_Icon);
      m_ExplorerFrame.getContentPane().setLayout(new BorderLayout());
      expl = new Explorer();

      m_ExplorerFrame.getContentPane().add(expl, BorderLayout.CENTER);
      m_ExplorerFrame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent w) {
            m_ExplorerFrame.dispose();
            m_ExplorerFrame = null;
            m_ExplorerBut.setEnabled(true);
            checkExit();
          }
        });
      m_ExplorerFrame.pack();
      m_ExplorerFrame.setSize(800, 600);
      m_ExplorerFrame.setVisible(true);
    } else {
      Object o = m_ExplorerFrame.getContentPane().getComponent(0);
      if (o instanceof Explorer) {
        expl = (Explorer)o;
      }
    }

    if (fileToLoad != null) {
      try {
        weka.core.converters.AbstractFileLoader loader =
          weka.core.converters.ConverterUtils.getLoaderForFile(fileToLoad);
        loader.setFile(new File(fileToLoad));
        expl.getPreprocessPanel().setInstancesFromFile(loader);
      } catch (Exception ex) {
        ex.printStackTrace();
      }
    }
  }
View Full Code Here


      jMenuItemApplicationsExplorer.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent evt) {
    String title = jMenuItemApplicationsExplorer.getText();
    if (!containsWindow(title)) {
      createFrame(
    m_Self, title, new Explorer(), new BorderLayout(),
    BorderLayout.CENTER, 800, 600, null, true, true);
    }
    else {
      showWindow(getWindow(title));
    }
View Full Code Here

  if (m_ExplorerFrame == null) {
    m_ExplorerBut.setEnabled(false);
    m_ExplorerFrame = new JFrame("Weka Explorer");
    m_ExplorerFrame.setIconImage(m_Icon);
    m_ExplorerFrame.getContentPane().setLayout(new BorderLayout());
    m_ExplorerFrame.getContentPane().add(new Explorer(), BorderLayout.CENTER);
    m_ExplorerFrame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent w) {
        m_ExplorerFrame.dispose();
        m_ExplorerFrame = null;
        m_ExplorerBut.setEnabled(true);
View Full Code Here

      jMenuItemApplicationsExplorer.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent evt) {
    String title = jMenuItemApplicationsExplorer.getText();
    if (!containsWindow(title)) {
      createFrame(
    m_Self, title, new Explorer(), new BorderLayout(),
    BorderLayout.CENTER, 800, 600, null, true, true);
    }
    else {
      showWindow(getWindow(title));
    }
View Full Code Here

      }
    }
  }

  public void showExplorer(String fileToLoad) {
    Explorer expl = null;
    if (m_ExplorerFrame == null) {
      m_ExplorerBut.setEnabled(false);
      m_ExplorerFrame = new JFrame("Weka Explorer");
      m_ExplorerFrame.setIconImage(m_Icon);
      m_ExplorerFrame.getContentPane().setLayout(new BorderLayout());
      expl = new Explorer();

      m_ExplorerFrame.getContentPane().add(expl, BorderLayout.CENTER);
      m_ExplorerFrame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent w) {
            m_ExplorerFrame.dispose();
            m_ExplorerFrame = null;
            m_ExplorerBut.setEnabled(true);
            checkExit();
          }
        });
      m_ExplorerFrame.pack();
      m_ExplorerFrame.setSize(800, 600);
      m_ExplorerFrame.setVisible(true);
    } else {
      Object o = m_ExplorerFrame.getContentPane().getComponent(0);
      if (o instanceof Explorer) {
        expl = (Explorer)o;
      }
    }

    if (fileToLoad != null) {
      try {
        weka.core.converters.AbstractFileLoader loader =
          weka.core.converters.ConverterUtils.getLoaderForFile(fileToLoad);
        loader.setFile(new File(fileToLoad));
        expl.getPreprocessPanel().setInstancesFromFile(loader);
      } catch (Exception ex) {
        ex.printStackTrace();
      }
    }
  }
View Full Code Here

      jMenuItemApplicationsExplorer.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent evt) {
    String title = jMenuItemApplicationsExplorer.getText();
    if (!containsWindow(title)) {
      createFrame(
    m_Self, title, new Explorer(), new BorderLayout(),
    BorderLayout.CENTER, 800, 600, null, true, true);
    }
    else {
      showWindow(getWindow(title));
    }
View Full Code Here

TOP

Related Classes of weka.gui.explorer.Explorer$ExplorerPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.