package netmatch.wizard;

import javax.swing.*;

public class WizardPanel5 extends javax.swing.JPanel {
  private javax.swing.JRadioButton directedRadio;
  private javax.swing.JRadioButton labeledRadio;

  public WizardPanel5() {
    initComponents();
  }

  public boolean validateAndSave() {
    return true;
  }

  private void initComponents() {
    ButtonGroup labeledGroup = new ButtonGroup();
    ButtonGroup directedGroup = new ButtonGroup();
    JLabel jLabel1 = new JLabel();
    JLabel jLabel2 = new JLabel();
    JLabel jLabel3 = new JLabel();
    labeledRadio = new javax.swing.JRadioButton();
    JRadioButton unlabeledRadio = new JRadioButton();
    directedRadio = new javax.swing.JRadioButton();
    JRadioButton undirectedRadio = new JRadioButton();
    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11));
    jLabel1.setText("Please configure matching algorithm:");
    jLabel2.setText("Treat vertices and edges as:");
    jLabel3.setText("Treat edges as:");
    labeledGroup.add(labeledRadio);
    labeledRadio.setSelected(true);
    labeledRadio.setText("<html>Labeled. NetMatch will use selected attributes for matching.</html>");
    labeledRadio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    labeledRadio.setMargin(new java.awt.Insets(0, 0, 0, 0));
    labeledGroup.add(unlabeledRadio);
    unlabeledRadio.setText("<html>Unlabeled. NetMatch will not use any attributes for matching.</html>");
    unlabeledRadio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    unlabeledRadio.setMargin(new java.awt.Insets(0, 0, 0, 0));
    directedGroup.add(directedRadio);
    directedGroup.add(undirectedRadio);
    directedRadio.setSelected(true);
    directedRadio.setText("Directed.");
    directedRadio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    directedRadio.setMargin(new java.awt.Insets(0, 0, 0, 0));
    undirectedRadio.setText("Undirected.");
    undirectedRadio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    undirectedRadio.setMargin(new java.awt.Insets(0, 0, 0, 0));
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
            .add(20, 20, 20)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(undirectedRadio)
                    .add(directedRadio)
                    .add(unlabeledRadio)
                    .add(labeledRadio)
                    .add(jLabel3)
                    .add(jLabel2)
                    .add(jLabel1))
            .addContainerGap(170, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
            .addContainerGap()
            .add(jLabel1)
            .add(11, 11, 11)
            .add(jLabel2)
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(labeledRadio)
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(unlabeledRadio)
            .add(26, 26, 26)
            .add(jLabel3)
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(directedRadio)
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(undirectedRadio)
            .addContainerGap(92, Short.MAX_VALUE)));
  }

  public boolean getLabeledValue() {
    return labeledRadio.isSelected();
  }

  public boolean getDirectedValue() {
    return directedRadio.isSelected();
  }
}
