/** * 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); } }
/** * 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()); }
/** * 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()); }
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"); } else { jdtmp = new JDialog((Frame) null, "Information");
/** * displays the Dialog for the output format and sets the chosen settings, if * the user approves. */ public void setOutputFormatFromDialog() { OutputFormatDialog dialog = new OutputFormatDialog(PropertyDialog.getParentFrame(this)); m_ResultMatrix.setShowStdDev(m_ShowStdDevs.isSelected()); dialog.setResultMatrix(m_ResultMatrix); dialog.setLocationRelativeTo(this); if (dialog.showDialog() == OutputFormatDialog.APPROVE_OPTION) { m_ResultMatrix = dialog.getResultMatrix(); m_ShowStdDevs.setSelected(m_ResultMatrix.getShowStdDev()); } }
/** * displays the Dialog for the output format and sets the chosen settings, if * the user approves. */ public void setOutputFormatFromDialog() { OutputFormatDialog dialog = new OutputFormatDialog(PropertyDialog.getParentFrame(this)); m_ResultMatrix.setShowStdDev(m_ShowStdDevs.isSelected()); dialog.setResultMatrix(m_ResultMatrix); dialog.setLocationRelativeTo(this); if (dialog.showDialog() == OutputFormatDialog.APPROVE_OPTION) { m_ResultMatrix = dialog.getResultMatrix(); m_ShowStdDevs.setSelected(m_ResultMatrix.getShowStdDev()); } }
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); }
/** * 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()); } }
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); }
/** * 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()); } }
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); }
new PropertyDialog( PropertyDialog .getParentFrame(ClassifierPerformanceEvaluatorStepEditorDialog.this), m_CostMatrixEditor, -1, -1);
new PropertyDialog( PropertyDialog .getParentFrame(ClassifierPerformanceEvaluatorStepEditorDialog.this), m_CostMatrixEditor, -1, -1);
} else { m_SetCostsFrame = new PropertyDialog(PropertyDialog.getParentFrame(m_SetCostsBut), m_CostMatrixEditor, -1, -1); 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); }