/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package connectionviewer;
/**
*
* @author mrupp
*/
public class Export extends javax.swing.JDialog
{
/**
* Creates new form Export
*/
ConnectionViewerPanel cwp;
Export(ConnectionViewerPanel a)
{
super(a.getFrame(), true);
cwp = a;
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents()
{
jSaveOutputJulia = new javax.swing.JButton();
jSaveOutputTex = new javax.swing.JButton();
jSaveOutputButton = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("ConnectionViewer Export...");
setLocation(new java.awt.Point(200, 200));
setResizable(false);
jSaveOutputJulia.setText("jl");
jSaveOutputJulia.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
jSaveOutputJuliaActionPerformed(evt);
}
});
jSaveOutputTex.setText("tex");
jSaveOutputTex.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
jSaveOutputTexActionPerformed(evt);
}
});
jSaveOutputButton.setText("PDF");
jSaveOutputButton.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
jSaveOutputButtonActionPerformed(evt);
}
});
jLabel1.setText("Exports the current image to pdf. Strings are not working at the moment.");
jLabel2.setText("Exports currently selected node and 3-neighborhood to a julia file.");
jLabel3.setText("Exports the current image to a tikzpicture / .tex-file.");
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(20, 20, 20)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel1)
.add(jLabel2)
.add(jLabel3)))
.add(layout.createSequentialGroup()
.add(220, 220, 220)
.add(jSaveOutputButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 59, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.add(228, 228, 228)
.add(jSaveOutputJulia, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 43, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.add(221, 221, 221)
.add(jSaveOutputTex, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(15, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(17, 17, 17)
.add(jSaveOutputButton)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel1)
.add(27, 27, 27)
.add(jSaveOutputJulia, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(jLabel2)
.add(22, 22, 22)
.add(jSaveOutputTex)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(jLabel3)
.addContainerGap(18, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jSaveOutputJuliaActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jSaveOutputJuliaActionPerformed
{//GEN-HEADEREND:event_jSaveOutputJuliaActionPerformed
cwp.exportToJulia();
dispose();
}//GEN-LAST:event_jSaveOutputJuliaActionPerformed
private void jSaveOutputTexActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jSaveOutputTexActionPerformed
{//GEN-HEADEREND:event_jSaveOutputTexActionPerformed
cwp.ExportToTex();
dispose();
}//GEN-LAST:event_jSaveOutputTexActionPerformed
private void jSaveOutputButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jSaveOutputButtonActionPerformed
{//GEN-HEADEREND:event_jSaveOutputButtonActionPerformed
cwp.ExportToPDF();
dispose();
}//GEN-LAST:event_jSaveOutputButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JButton jSaveOutputButton;
private javax.swing.JButton jSaveOutputJulia;
private javax.swing.JButton jSaveOutputTex;
// End of variables declaration//GEN-END:variables
}