/** * Call the Weka chooser */ public static void launchWeka() { GUIChooserApp chooser = new GUIChooserApp(); for (WindowListener wl : chooser.getWindowListeners()) { chooser.removeWindowListener(wl); } chooser.setVisible(true); }
@Override public void windowClosing(WindowEvent w) { dispose(); checkExit(); } });
GUIChooserApp.class.getClassLoader().getResource( "weka/gui/weka_icon_new_48.png")); setIconImage(m_Icon); this.getContentPane().setLayout(new BorderLayout()); this.getContentPane().add(m_PanelApplications, BorderLayout.EAST); wekaPan.add(infoLab, BorderLayout.SOUTH); this.getContentPane().add(wekaPan, BorderLayout.CENTER); submenu = new JMenu(ext.getSubmenuTitle()); submenus.put(ext.getSubmenuTitle(), submenu); insertMenuItem(jMenuExtensions, submenu); insertMenuItem(submenu, menuitem); } else { insertMenuItem(jMenuExtensions, menuitem); setJMenuBar(m_jMenuBar); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent w) { pack();
GUIChooserApp.createSingleton(); m_chooser.pack(); m_chooser.setSize(500, 350); m_chooser.setVisible(true); m_chooser.showExplorer(args[0]);
/** * de-registers the child frame with the parent first. */ @Override public void dispose() { if (getParentFrame() != null) { getParentFrame().removeChildFrame(this); getParentFrame().createTitle(""); } super.dispose(); } }
/** * constructs a new internal frame that knows about its parent. * * @param parent the parent frame * @param title the title of the frame */ public ChildFrameSDI(GUIChooserApp parent, String title) { super(title); m_Parent = parent; addWindowListener(new WindowAdapter() { @Override public void windowActivated(WindowEvent e) { // update title of parent if (getParentFrame() != null) { getParentFrame().createTitle(getTitle()); } } }); // add to parent if (getParentFrame() != null) { getParentFrame().addChildFrame(this); setIconImage(getParentFrame().getIconImage()); } }
/** * Create a singleton instance of the GUIChooser */ public static synchronized void createSingleton() { if (m_chooser == null) { m_chooser = new GUIChooserApp(); } }
@Override public void actionPerformed(ActionEvent e) { Component frame = createFrame(m_Self, finalMenuitem.getText(), null, null, null, -1, -1, null, false, false); finalExt.fillFrame(frame); frame.setVisible(true); } });
@Override public void windowActivated(WindowEvent e) { // update title of parent if (getParentFrame() != null) { getParentFrame().createTitle(getTitle()); } } });
@Override public void actionPerformed(ActionEvent e) { try { int result = SettingsEditor.showSingleSettingsEditor(m_settings, GUIChooserDefaults.APP_ID, "GUIChooser", (JComponent) GUIChooserApp.this.getContentPane().getComponent(0), 550, 100); if (result == JOptionPane.OK_OPTION) { WekaPackageManager.getUnderlyingPackageManager().applySettings( m_settings); } } catch (Exception ex) { ex.printStackTrace(); } } });
GUIChooserApp.class.getClassLoader().getResource( "weka/gui/weka_icon_new_48.png")); setIconImage(m_Icon); this.getContentPane().setLayout(new BorderLayout()); this.getContentPane().add(m_PanelApplications, BorderLayout.EAST); wekaPan.add(infoLab, BorderLayout.SOUTH); this.getContentPane().add(wekaPan, BorderLayout.CENTER); submenu = new JMenu(ext.getSubmenuTitle()); submenus.put(ext.getSubmenuTitle(), submenu); insertMenuItem(jMenuExtensions, submenu); insertMenuItem(submenu, menuitem); } else { insertMenuItem(jMenuExtensions, menuitem); setJMenuBar(m_jMenuBar); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent w) { pack();
GUIChooserApp.createSingleton(); m_chooser.pack(); m_chooser.setSize(500, 350); m_chooser.setVisible(true); m_chooser.showExplorer(args[0]);
/** * de-registers the child frame with the parent first. */ @Override public void dispose() { if (getParentFrame() != null) { getParentFrame().removeChildFrame(this); getParentFrame().createTitle(""); } super.dispose(); } }
/** * constructs a new internal frame that knows about its parent. * * @param parent the parent frame * @param title the title of the frame */ public ChildFrameSDI(GUIChooserApp parent, String title) { super(title); m_Parent = parent; addWindowListener(new WindowAdapter() { @Override public void windowActivated(WindowEvent e) { // update title of parent if (getParentFrame() != null) { getParentFrame().createTitle(getTitle()); } } }); // add to parent if (getParentFrame() != null) { getParentFrame().addChildFrame(this); setIconImage(getParentFrame().getIconImage()); } }
/** * Create a singleton instance of the GUIChooser */ public static synchronized void createSingleton() { if (m_chooser == null) { m_chooser = new GUIChooserApp(); } }
@Override public void actionPerformed(ActionEvent e) { Component frame = createFrame(m_Self, finalMenuitem.getText(), null, null, null, -1, -1, null, false, false); finalExt.fillFrame(frame); frame.setVisible(true); } });
@Override public void windowActivated(WindowEvent e) { // update title of parent if (getParentFrame() != null) { getParentFrame().createTitle(getTitle()); } } });
@Override public void actionPerformed(ActionEvent e) { try { int result = SettingsEditor.showSingleSettingsEditor(m_settings, GUIChooserDefaults.APP_ID, "GUIChooser", (JComponent) GUIChooserApp.this.getContentPane().getComponent(0), 550, 100); if (result == JOptionPane.OK_OPTION) { WekaPackageManager.getUnderlyingPackageManager().applySettings( m_settings); } } catch (Exception ex) { ex.printStackTrace(); } } });
/** * Call the Weka chooser */ public static void launchWeka() { GUIChooserApp chooser = new GUIChooserApp(); for (WindowListener wl : chooser.getWindowListeners()) { chooser.removeWindowListener(wl); } chooser.setVisible(true); }
@Override public void actionPerformed(ActionEvent e) { dispose(); checkExit(); } });