/** * checks, whether an instance of the given window class is already in the * Window list. * * @param windowClass the class to check for an instance in the current window * list * @return true if the class is already listed in the Window list */ public boolean containsWindow(Class<?> windowClass) { return (getWindow(windowClass) != null); }
/** * checks, whether a window with the given title is already in the Window * list. * * @param title the title to check for in the current window list * @return true if a window with the given title is already listed in the * Window list */ public boolean containsWindow(String title) { return (getWindow(title) != null); }
/** * checks, whether a window with the given title is already in the Window * list. * * @param title the title to check for in the current window list * @return true if a window with the given title is already listed in the * Window list */ public boolean containsWindow(String title) { return (getWindow(title) != null); }
/** * checks, whether an instance of the given window class is already in the * Window list. * * @param windowClass the class to check for an instance in the current window * list * @return true if the class is already listed in the Window list */ public boolean containsWindow(Class<?> windowClass) { return (getWindow(windowClass) != null); }
/** * brings the first frame to the top that is of the specified window class. * * @param windowClass the class to display the first child for * @return true, if a child was found and brought to front */ public boolean showWindow(Class<?> windowClass) { return showWindow(getWindow(windowClass)); }
/** * brings the first frame to the top that is of the specified window class. * * @param windowClass the class to display the first child for * @return true, if a child was found and brought to front */ public boolean showWindow(Class<?> windowClass) { return showWindow(getWindow(windowClass)); }
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemApplicationsSimpleCLI.getText(); if (!containsWindow(title)) { try { createFrame(m_Self, title, new SimpleCLIPanel(), new BorderLayout(), BorderLayout.CENTER, 600, 500, null, true, true); } catch (Exception e) { e.printStackTrace(); JOptionPane.showMessageDialog(m_Self, "Error instantiating SimpleCLI:\n" + e.getMessage()); return; } } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemApplicationsSimpleCLI.getText(); if (!containsWindow(title)) { try { createFrame(m_Self, title, new SimpleCLIPanel(), new BorderLayout(), BorderLayout.CENTER, 600, 500, null, true, true); } catch (Exception e) { e.printStackTrace(); JOptionPane.showMessageDialog(m_Self, "Error instantiating SimpleCLI:\n" + e.getMessage()); return; } } else { showWindow(getWindow(title)); } } });
@Override 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)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemApplicationsExperimenter.getText(); if (!containsWindow(title)) { createFrame(m_Self, title, new Experimenter(false), new BorderLayout(), BorderLayout.CENTER, 800, 600, null, true, true); } else { showWindow(getWindow(title)); } } });
@Override 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)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemApplicationsExperimenter.getText(); if (!containsWindow(title)) { createFrame(m_Self, title, new Experimenter(false), new BorderLayout(), BorderLayout.CENTER, 800, 600, null, true, true); } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent e) { String title = jMenuItemBayesNet.getText(); if (!containsWindow(title)) { final GUI bayesNetGUI = new GUI(); createFrame(m_Self, title, bayesNetGUI, new BorderLayout(), BorderLayout.CENTER, 800, 600, bayesNetGUI.getMenuBar(), false, true); } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemApplicationsKnowledgeFlow.getText(); if (!containsWindow(title)) { KnowledgeFlowApp.createSingleton(new String[0]); createFrame(m_Self, title, KnowledgeFlowApp.getSingleton(), new BorderLayout(), BorderLayout.CENTER, 900, 600, null, true, true); } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemApplicationsKnowledgeFlow.getText(); if (!containsWindow(title)) { KnowledgeFlowApp.createSingleton(new String[0]); createFrame(m_Self, title, KnowledgeFlowApp.getSingleton(), new BorderLayout(), BorderLayout.CENTER, 900, 600, null, true, true); } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemVisualizationBoundaryVisualizer.getText(); if (!containsWindow(title)) { createFrame(m_Self, title, new BoundaryVisualizer(), new BorderLayout(), BorderLayout.CENTER, 800, 600, null, true, true); // dont' do a System.exit after last window got closed! BoundaryVisualizer.setExitIfNoWindowsOpen(false); } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent e) { String title = jMenuItemBayesNet.getText(); if (!containsWindow(title)) { final GUI bayesNetGUI = new GUI(); createFrame(m_Self, title, bayesNetGUI, new BorderLayout(), BorderLayout.CENTER, 800, 600, bayesNetGUI.getMenuBar(), false, true); } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemVisualizationBoundaryVisualizer.getText(); if (!containsWindow(title)) { createFrame(m_Self, title, new BoundaryVisualizer(), new BorderLayout(), BorderLayout.CENTER, 800, 600, null, true, true); // dont' do a System.exit after last window got closed! BoundaryVisualizer.setExitIfNoWindowsOpen(false); } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemToolsArffViewer.getText(); if (!containsWindow(title)) { ArffViewerMainPanel panel = new ArffViewerMainPanel(null); panel.setConfirmExit(false); Container frame = createFrame(m_Self, title, panel, new BorderLayout(), BorderLayout.CENTER, 800, 600, panel.getMenu(), true, true); panel.setParent(frame); } else { showWindow(getWindow(title)); } } });
@Override public void actionPerformed(ActionEvent evt) { String title = jMenuItemToolsArffViewer.getText(); if (!containsWindow(title)) { ArffViewerMainPanel panel = new ArffViewerMainPanel(null); panel.setConfirmExit(false); Container frame = createFrame(m_Self, title, panel, new BorderLayout(), BorderLayout.CENTER, 800, 600, panel.getMenu(), true, true); panel.setParent(frame); } else { showWindow(getWindow(title)); } } });