Package weka.gui

Examples of weka.gui.PropertyDialog


      }
    });
    } catch (Exception ex) {
    }

    PropertyDialog pd = new PropertyDialog(convEd, 100, 100);
  }
View Full Code Here


 
  Classifier classifierAtNode = m_focus.getClassifier();
        if (classifierAtNode != null) {
          m_classifiers.setValue(classifierAtNode);
        }
  m_propertyDialog = new PropertyDialog(m_classifiers,
                m_mainWin.getLocationOnScreen().x,
                m_mainWin.getLocationOnScreen().y);
 
  //note property dialog may change all the time
  //but the generic editor which has the listeners does not
View Full Code Here

    if (e.getSource() == m_AddBut) {
      m_Editing = false;
      if (m_PD == null) {
  int x = getLocationOnScreen().x;
  int y = getLocationOnScreen().y;
  m_PD = new PropertyDialog(m_ClassifierEditor, x, y);
      } else {
  m_PD.setVisible(true);
      }
     
    } else if (e.getSource() == m_EditBut) {
      if (m_List.getSelectedValue() != null) {
         m_Editing = true;
         if (m_PD == null) {
            int x = getLocationOnScreen().x;
            int y = getLocationOnScreen().y;
            m_PD = new PropertyDialog(m_ClassifierEditor, x, y);
         } else {
            m_PD.setVisible(true);
         }
         m_PD.getEditor().setValue(m_List.getSelectedValue());
      }
View Full Code Here

      m_Editing = false;
      if (m_PD == null) {
  int x = getLocationOnScreen().x;
  int y = getLocationOnScreen().y;
  if (PropertyDialog.getParentDialog(this) != null)
    m_PD = new PropertyDialog(
        PropertyDialog.getParentDialog(this),
        m_ClassifierEditor, x, y);
  else
    m_PD = new PropertyDialog(
        PropertyDialog.getParentFrame(this),
        m_ClassifierEditor, x, y);
  m_PD.setVisible(true);
      } else {
  m_PD.setVisible(true);
      }
     
    } else if (e.getSource() == m_EditBut) {
      if (m_List.getSelectedValue() != null) {
        m_ClassifierEditor.setClassType(weka.classifiers.Classifier.class);
        // m_PD.getEditor().setValue(m_List.getSelectedValue());
        m_ClassifierEditor.setValue(m_List.getSelectedValue());
         m_Editing = true;
         if (m_PD == null) {
            int x = getLocationOnScreen().x;
            int y = getLocationOnScreen().y;
            if (PropertyDialog.getParentDialog(this) != null)
              m_PD = new PropertyDialog(
            PropertyDialog.getParentDialog(this),
            m_ClassifierEditor, x, y);
            else
              m_PD = new PropertyDialog(
            PropertyDialog.getParentFrame(this),
            m_ClassifierEditor, x, y);
            m_PD.setVisible(true);
         } else {
            m_PD.setVisible(true);
View Full Code Here

  private void showFileEditor() {
    if (m_fileEditorDialog == null) {
      int x = getLocationOnScreen().x;
      int y = getLocationOnScreen().y;
      if (PropertyDialog.getParentDialog(this) != null) {
        m_fileEditorDialog = new PropertyDialog(PropertyDialog.getParentDialog(this),
            m_fileEditor, x, y);
      } else {
        m_fileEditorDialog = new PropertyDialog(PropertyDialog.getParentFrame(this),
            m_fileEditor, x, y);
      }
    }
    m_fileEditorDialog.setVisible(true);
  }
View Full Code Here

              GenericObjectEditor.registerEditors();
              GenericObjectEditor ce = new GenericObjectEditor(true);
              ce.setClassType(weka.classifiers.Classifier.class);
              ce.setValue(m_BayesNet);

              PropertyDialog pd;
              if (PropertyDialog.getParentDialog(GUI.this) != null)
                pd = new PropertyDialog(PropertyDialog.getParentDialog(GUI.this), ce, 100, 100);
              else
                pd = new PropertyDialog(PropertyDialog.getParentFrame(GUI.this), ce, 100, 100);
              pd.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                  PropertyEditor pe = ((PropertyDialog) e.getSource()).getEditor();
                  Object c = (Object) pe.getValue();
                  String options = "";
                  if (c instanceof OptionHandler) {
                    options = Utils.joinOptions(((OptionHandler) c).getOptions());
                    try {
                      m_BayesNet.setOptions(((OptionHandler) c).getOptions());
                    } catch (Exception e2) {
                      e2.printStackTrace();
                    }
                  }
                  System.out.println(c.getClass().getName() + " " + options);
                  System.exit(0);
                }
              });
              pd.setVisible(true);
            } catch (Exception ex) {
              ex.printStackTrace();
              System.err.println(ex.getMessage());
            }
            m_BayesNet.clearUndoStack();
View Full Code Here

      }
    });
    } catch (Exception ex) {
    }

    PropertyDialog pd;
    if (PropertyDialog.getParentDialog(this) != null)
      pd = new PropertyDialog(PropertyDialog.getParentDialog(this), convEd, 100, 100);
    else
      pd = new PropertyDialog(PropertyDialog.getParentFrame(this), convEd, 100, 100);
    pd.setVisible(true);
  }
View Full Code Here

    m_SetCostsBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
  m_SetCostsBut.setEnabled(false);
  if (m_SetCostsFrame == null) {
    if (PropertyDialog.getParentDialog(ClassifierPanel.this) != null)
      m_SetCostsFrame = new PropertyDialog(
    PropertyDialog.getParentDialog(ClassifierPanel.this),
    m_CostMatrixEditor, 100, 100);
    else
      m_SetCostsFrame = new PropertyDialog(
    PropertyDialog.getParentFrame(ClassifierPanel.this),
    m_CostMatrixEditor, 100, 100);
    m_SetCostsFrame.setTitle("Cost Matrix Editor");
    //  pd.setSize(250,150);
    m_SetCostsFrame.addWindowListener(new java.awt.event.WindowAdapter() {
View Full Code Here

TOP

Related Classes of weka.gui.PropertyDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.