/** * Closes the dialog. */ protected void closeDialog() { if (m_FileChooser instanceof Container) { Dialog dlg = PropertyDialog.getParentDialog((Container) m_FileChooser); if (dlg != null) dlg.setVisible(false); } } }
/** * Closes the dialog. */ protected void closeDialog() { if (m_CustomEditor instanceof Container) { Dialog dlg = PropertyDialog.getParentDialog((Container) m_CustomEditor); if (dlg != null) dlg.setVisible(false); } }
/** * Closes the dialog. */ protected void closeDialog() { if (m_FileChooser instanceof Container) { Dialog dlg = PropertyDialog.getParentDialog((Container) m_FileChooser); if (dlg != null) dlg.setVisible(false); } } }
/** * Fired when action got executed. * * @param e the event */ public void actionPerformed(ActionEvent e) { JDialog dialog; if (PropertyDialog.getParentDialog(FileScriptingPanel.this) != null) dialog = new JDialog(PropertyDialog.getParentDialog(FileScriptingPanel.this), getName()); else dialog = new JDialog(PropertyDialog.getParentFrame(FileScriptingPanel.this), getName()); dialog.setTitle((String) getValue(Action.NAME)); dialog.getContentPane().setLayout(new BorderLayout()); dialog.getContentPane().add(getAboutPanel()); dialog.pack(); dialog.setLocationRelativeTo(FileScriptingPanel.this); dialog.setVisible(true); } }
/** * Fired when action got executed. * * @param e the event */ public void actionPerformed(ActionEvent e) { JDialog dialog; if (PropertyDialog.getParentDialog(FileScriptingPanel.this) != null) dialog = new JDialog(PropertyDialog.getParentDialog(FileScriptingPanel.this), getName()); else dialog = new JDialog(PropertyDialog.getParentFrame(FileScriptingPanel.this), getName()); dialog.setTitle((String) getValue(Action.NAME)); dialog.getContentPane().setLayout(new BorderLayout()); dialog.getContentPane().add(getAboutPanel()); dialog.pack(); dialog.setLocationRelativeTo(FileScriptingPanel.this); dialog.setVisible(true); } }
private void showFileEditor() { if (m_fileEditorDialog == null) { if (PropertyDialog.getParentDialog(this) != null) { m_fileEditorDialog = new PropertyDialog( PropertyDialog.getParentDialog(this), m_fileEditor, -1, -1); } else { m_fileEditorDialog = new PropertyDialog( PropertyDialog.getParentFrame(this), m_fileEditor, -1, -1); } } if (PropertyDialog.getParentDialog(this) != null) { m_fileEditorDialog.setLocationRelativeTo(PropertyDialog.getParentDialog(this)); } else { m_fileEditorDialog.setLocationRelativeTo(PropertyDialog.getParentFrame(this)); } m_fileEditorDialog.setVisible(true); }
private void showFileEditor() { if (m_fileEditorDialog == null) { if (PropertyDialog.getParentDialog(this) != null) { m_fileEditorDialog = new PropertyDialog( PropertyDialog.getParentDialog(this), m_fileEditor, -1, -1); } else { m_fileEditorDialog = new PropertyDialog( PropertyDialog.getParentFrame(this), m_fileEditor, -1, -1); } } if (PropertyDialog.getParentDialog(this) != null) { m_fileEditorDialog.setLocationRelativeTo(PropertyDialog.getParentDialog(this)); } else { m_fileEditorDialog.setLocationRelativeTo(PropertyDialog.getParentFrame(this)); } m_fileEditorDialog.setVisible(true); }
private void showFileEditor() { if (m_fileEditorDialog == null) { if (PropertyDialog.getParentDialog(this) != null) { m_fileEditorDialog = new PropertyDialog(PropertyDialog.getParentDialog(this), m_fileEditor, -1, -1); } else { m_fileEditorDialog = new PropertyDialog(PropertyDialog.getParentFrame(this), m_fileEditor, -1, -1); } } if (PropertyDialog.getParentDialog(this) != null) { m_fileEditorDialog.setLocationRelativeTo(PropertyDialog.getParentDialog(this)); } else { m_fileEditorDialog.setLocationRelativeTo(PropertyDialog.getParentFrame(this)); } m_fileEditorDialog.setVisible(true); }
private void showFileEditor() { if (m_fileEditorDialog == null) { if (PropertyDialog.getParentDialog(this) != null) { m_fileEditorDialog = new PropertyDialog(PropertyDialog.getParentDialog(this), m_fileEditor, -1, -1); } else { m_fileEditorDialog = new PropertyDialog(PropertyDialog.getParentFrame(this), m_fileEditor, -1, -1); } } if (PropertyDialog.getParentDialog(this) != null) { m_fileEditorDialog.setLocationRelativeTo(PropertyDialog.getParentDialog(this)); } else { m_fileEditorDialog.setLocationRelativeTo(PropertyDialog.getParentFrame(this)); } m_fileEditorDialog.setVisible(true); }
/** * Gets called when the title of the frame/dialog needs updating. * * @param event the event that got sent */ public void titleUpdated(TitleUpdatedEvent event) { if (PropertyDialog.getParentDialog(ScriptingPanel.this) != null) PropertyDialog.getParentDialog(ScriptingPanel.this).setTitle(getTitle()); else if (PropertyDialog.getParentFrame(ScriptingPanel.this) != null) PropertyDialog.getParentFrame(ScriptingPanel.this).setTitle(getTitle()); }
/** * Displays the property edit dialog for the panel. */ public void showPropertyDialog() { if (m_Editor.getValue() != null) { if (m_PD == null) { if (PropertyDialog.getParentDialog(this) != null) m_PD = new PropertyDialog(PropertyDialog.getParentDialog(this), m_Editor, -1, -1); else m_PD = new PropertyDialog(PropertyDialog.getParentFrame(this), m_Editor, -1, -1); m_PD.setVisible(true); } else { if (PropertyDialog.getParentDialog(this) != null) { m_PD.setLocationRelativeTo(PropertyDialog.getParentDialog(this)); } else { m_PD.setLocationRelativeTo(PropertyDialog.getParentFrame(this)); } m_PD.setVisible(true); } // make sure that m_Backup is correctly initialized! m_Editor.setValue(m_Editor.getValue()); } }
/** * Displays the property edit dialog for the panel. */ public void showPropertyDialog() { if (m_Editor.getValue() != null) { if (m_PD == null) { if (PropertyDialog.getParentDialog(this) != null) m_PD = new PropertyDialog(PropertyDialog.getParentDialog(this), m_Editor, -1, -1); else m_PD = new PropertyDialog(PropertyDialog.getParentFrame(this), m_Editor, -1, -1); m_PD.setVisible(true); } else { if (PropertyDialog.getParentDialog(this) != null) { m_PD.setLocationRelativeTo(PropertyDialog.getParentDialog(this)); } else { m_PD.setLocationRelativeTo(PropertyDialog.getParentFrame(this)); } m_PD.setVisible(true); } // make sure that m_Backup is correctly initialized! m_Editor.setValue(m_Editor.getValue()); } }
/** * Gets called when the title of the frame/dialog needs updating. * * @param event the event that got sent */ public void titleUpdated(TitleUpdatedEvent event) { if (PropertyDialog.getParentDialog(ScriptingPanel.this) != null) PropertyDialog.getParentDialog(ScriptingPanel.this).setTitle(getTitle()); else if (PropertyDialog.getParentFrame(ScriptingPanel.this) != null) PropertyDialog.getParentFrame(ScriptingPanel.this).setTitle(getTitle()); }
ta.setCaretPosition(0); JDialog jdtmp; if (PropertyDialog.getParentDialog(this) != null) { jdtmp = new JDialog(PropertyDialog.getParentDialog(this), "Information"); } else if (PropertyDialog.getParentFrame(this) != null) { jdtmp = new JDialog(PropertyDialog.getParentFrame(this), "Information");
if (m_SetCostsFrame == null) { if (PropertyDialog .getParentDialog(ClassifierPerformanceEvaluatorStepEditorDialog.this) != null) { m_SetCostsFrame = new PropertyDialog( PropertyDialog .getParentDialog(ClassifierPerformanceEvaluatorStepEditorDialog.this), m_CostMatrixEditor, -1, -1); } else {
m_SetCostsBut.setEnabled(false); if (m_SetCostsFrame == null) { if (PropertyDialog.getParentDialog(m_SetCostsBut) != null) { m_SetCostsFrame = new PropertyDialog(PropertyDialog.getParentDialog(m_SetCostsBut), m_CostMatrixEditor, -1, -1); } else { m_SetCostsFrame = if (PropertyDialog.getParentDialog(m_SetCostsBut) != null) { m_SetCostsFrame.setLocationRelativeTo(PropertyDialog.getParentDialog(m_SetCostsBut)); } else { m_SetCostsFrame.setLocationRelativeTo(PropertyDialog.getParentFrame(m_SetCostsBut));
/** * Pops up generic object editor with list of conversion filters * * @param f the File */ private void converterQuery(final File f) { final GenericObjectEditor convEd = new GenericObjectEditor(true); try { convEd.setClassType(weka.core.converters.Loader.class); convEd.setValue(new weka.core.converters.CSVLoader()); ((GenericObjectEditor.GOEPanel) convEd.getCustomEditor()) .addOkListener(new ActionListener() { public void actionPerformed(ActionEvent e) { tryConverter((Loader) convEd.getValue(), f); } }); } catch (Exception ex) { } PropertyDialog pd; if (PropertyDialog.getParentDialog(this) != null) pd = new PropertyDialog(PropertyDialog.getParentDialog(this), convEd, -1, -1); else pd = new PropertyDialog(PropertyDialog.getParentFrame(this), convEd, -1, -1); pd.setVisible(true); }
/** * Pops up generic object editor with list of conversion filters * * @param f the File */ private void converterQuery(final File f) { final GenericObjectEditor convEd = new GenericObjectEditor(true); try { convEd.setClassType(weka.core.converters.Loader.class); convEd.setValue(new weka.core.converters.CSVLoader()); ((GenericObjectEditor.GOEPanel) convEd.getCustomEditor()) .addOkListener(new ActionListener() { public void actionPerformed(ActionEvent e) { tryConverter((Loader) convEd.getValue(), f); } }); } catch (Exception ex) { } PropertyDialog pd; if (PropertyDialog.getParentDialog(this) != null) pd = new PropertyDialog(PropertyDialog.getParentDialog(this), convEd, -1, -1); else pd = new PropertyDialog(PropertyDialog.getParentFrame(this), convEd, -1, -1); pd.setVisible(true); }
/** * opens the help dialog for the capabilities. */ protected void openCapabilitiesHelpDialog() { if (PropertyDialog.getParentDialog(this) != null) { m_CapabilitiesDialog = new CapabilitiesHelpDialog( PropertyDialog.getParentDialog(this)); } else { m_CapabilitiesDialog = new CapabilitiesHelpDialog( PropertyDialog.getParentFrame(this)); } m_CapabilitiesDialog.setSize(400, 350); m_CapabilitiesDialog.setLocation(m_aboutPanel.getTopLevelAncestor() .getLocationOnScreen().x + m_aboutPanel.getTopLevelAncestor().getSize().width, m_aboutPanel .getTopLevelAncestor().getLocationOnScreen().y); m_CapabilitiesDialog.setVisible(true); addPropertyChangeListener(m_CapabilitiesDialog); }
/** * opens the help dialog for the capabilities. */ protected void openCapabilitiesHelpDialog() { if (PropertyDialog.getParentDialog(this) != null) { m_CapabilitiesDialog = new CapabilitiesHelpDialog( PropertyDialog.getParentDialog(this)); } else { m_CapabilitiesDialog = new CapabilitiesHelpDialog( PropertyDialog.getParentFrame(this)); } m_CapabilitiesDialog.setSize(400, 350); m_CapabilitiesDialog.setLocation(m_aboutPanel.getTopLevelAncestor() .getLocationOnScreen().x + m_aboutPanel.getTopLevelAncestor().getSize().width, m_aboutPanel .getTopLevelAncestor().getLocationOnScreen().y); m_CapabilitiesDialog.setVisible(true); addPropertyChangeListener(m_CapabilitiesDialog); }