/** * Creates the editor frame - only kept for backward-compatibility. * * @param pe the PropertyEditor * @param x initial x coord for the frame * @param y initial y coord for the frame * @deprecated instead of this constructor, one should use the constructors * with an explicit owner (either derived from * <code>java.awt.Dialog</code> or from * <code>java.awt.Frame</code>) or, if none available, * using <code>(Frame) null</code> as owner. */ public PropertyDialog(PropertyEditor pe, int x, int y) { this((Frame) null, pe, x, y); setVisible(true); }
/** * Creates the editor frame - only kept for backward-compatibility. * * @param pe the PropertyEditor * @param x initial x coord for the frame * @param y initial y coord for the frame * @deprecated instead of this constructor, one should use the constructors * with an explicit owner (either derived from * <code>java.awt.Dialog</code> or from * <code>java.awt.Frame</code>) or, if none available, * using <code>(Frame) null</code> as owner. */ public PropertyDialog(PropertyEditor pe, int x, int y) { this((Frame) null, pe, x, y); setVisible(true); }
@Override public void actionPerformed(ActionEvent e) { m_SetCostsBut.setEnabled(m_EvalWRTCostsBut.isSelected()); if ((m_SetCostsFrame != null) && (!m_EvalWRTCostsBut.isSelected())) { m_SetCostsFrame.setVisible(false); } } });
@Override public void actionPerformed(ActionEvent e) { m_SetCostsBut.setEnabled(m_EvalWRTCostsBut.isSelected()); if ((m_SetCostsFrame != null) && (!m_EvalWRTCostsBut.isSelected())) { m_SetCostsFrame.setVisible(false); } } });
@Override public void actionPerformed(ActionEvent e) { m_setCostMatrix.setEnabled(m_useCosts.isSelected()); if (m_SetCostsFrame != null && !m_useCosts.isSelected()) { m_SetCostsFrame.setVisible(false); } } });
@Override public void actionPerformed(ActionEvent e) { m_setCostMatrix.setEnabled(m_useCosts.isSelected()); if (m_SetCostsFrame != null && !m_useCosts.isSelected()) { m_SetCostsFrame.setVisible(false); } } });
pd.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()); } }
/** * 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()); } }
pd.setVisible(true); } catch (Exception ex) { ex.printStackTrace();
m_SetCostsFrame.setVisible(true);
m_SetCostsFrame.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); }
m_SetCostsFrame.setLocationRelativeTo(PropertyDialog.getParentFrame(m_SetCostsBut)); m_SetCostsFrame.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); }
/** * 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); }