setLocationRelativeTo(getParent());
/** * edits the current instances object in the viewer */ public void edit() { ViewerDialog dialog; int result; Instances copy; Instances newInstances; final int classIndex = m_AttVisualizePanel.getColoringIndex(); copy = new Instances(m_Instances); copy.setClassIndex(classIndex); dialog = new ViewerDialog(null); dialog.pack(); dialog.setSize(1000, 600); dialog.setIconImage(((Frame) SwingUtilities.getWindowAncestor(PreprocessPanel.this)).getIconImage()); dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(PreprocessPanel.this)); result = dialog.showDialog(copy); if (result == ViewerDialog.APPROVE_OPTION) { try { addUndoPoint(); } catch (Exception e) { e.printStackTrace(); } // if class was not set before, reset it again after use of filter newInstances = dialog.getInstances(); if (m_Instances.classIndex() < 0) newInstances.setClassIndex(-1); setInstances(newInstances); } }
/** * edits the current instances object in the viewer */ public void edit() { ViewerDialog dialog; int result; Instances copy; Instances newInstances; copy = new Instances(m_Data); dialog = new ViewerDialog(null); dialog.setSize(800, 600); dialog.setLocationRelativeTo(this); result = dialog.showDialog(copy); if (result == ViewerDialog.APPROVE_OPTION) { try { addUndoPoint(); } catch (Exception e) { e.printStackTrace(); } // if class was not set before, reset it again after use of filter newInstances = dialog.getInstances(); if (m_Data.classIndex() < 0) newInstances.setClassIndex(-1); notifyTabsDataChanged(null, newInstances); } }
/** * edits the current instances object in the viewer */ public void edit() { ViewerDialog dialog; int result; Instances copy; Instances newInstances; final int classIndex = m_AttVisualizePanel.getColoringIndex(); copy = new Instances(m_Instances); copy.setClassIndex(classIndex); dialog = new ViewerDialog(null); dialog.pack(); dialog.setSize(1000, 600); dialog.setIconImage(((Frame) SwingUtilities.getWindowAncestor(PreprocessPanel.this)).getIconImage()); dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(PreprocessPanel.this)); result = dialog.showDialog(copy); if (result == ViewerDialog.APPROVE_OPTION) { try { addUndoPoint(); } catch (Exception e) { e.printStackTrace(); } // if class was not set before, reset it again after use of filter newInstances = dialog.getInstances(); if (m_Instances.classIndex() < 0) newInstances.setClassIndex(-1); setInstances(newInstances); } }
@Override public void actionPerformed(ActionEvent e) { ViewerDialog dialog; int result; Instances copy; Instances newInstances; copy = new Instances(owner.getTestData()); dialog = new ViewerDialog(null); dialog.setSize(800, 600); dialog.setLocationRelativeTo(owner); result = dialog.showDialog(copy); if (result == ViewerDialog.APPROVE_OPTION) { // if class was not set before, reset it again after use of filter newInstances = dialog.getInstances(); if (owner.getTestData().classIndex() < 0) newInstances.setClassIndex(-1); owner.setTestData(newInstances); } } };
@Override public void actionPerformed(ActionEvent e) { ViewerDialog dialog; int result; Instances copy; Instances newInstances; copy = new Instances(owner.getTestData()); dialog = new ViewerDialog(null); dialog.setSize(800, 600); dialog.setLocationRelativeTo(owner); result = dialog.showDialog(copy); if (result == ViewerDialog.APPROVE_OPTION) { // if class was not set before, reset it again after use of filter newInstances = dialog.getInstances(); if (owner.getTestData().classIndex() < 0) newInstances.setClassIndex(-1); owner.setTestData(newInstances); } } };