List of usage examples for weka.gui WorkbenchApp WorkbenchApp
public WorkbenchApp()
From source file:adams.gui.menu.Workbench.java
License:Open Source License
/** * Launches the functionality of the menu item. *//*from w w w . java2 s. co m*/ @Override public void launch() { WorkbenchApp app = new WorkbenchApp(); createChildFrame(app, GUIHelper.getDefaultLargeDialogDimension()); if (app.getMainPerspective().acceptsInstances()) { if (m_Parameters.length > 0) { PlaceholderFile[] files = new PlaceholderFile[m_Parameters.length]; for (int i = 0; i < m_Parameters.length; i++) files[i] = new PlaceholderFile(m_Parameters[i]); try { AbstractFileLoader loader = ConverterUtils.getLoaderForFile(files[0]); loader.setFile(files[0].getAbsoluteFile()); app.getMainPerspective().setInstances(loader.getDataSet()); } catch (Exception e) { GUIHelper.showErrorMessage(getOwner(), "Failed to load: " + files[0] + "\n" + Utils.throwableToString(e)); } } } }