/*
Copyright 2008-2011 Gephi
Authors : Taras Klaskovsky <megaterik@gmail.com>
Website : http://www.gephi.org
This file is part of Gephi.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2011 Gephi Consortium. All rights reserved.
The contents of this file are subject to the terms of either the GNU
General Public License Version 3 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://gephi.org/about/legal/license-notice/
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
specific language governing permissions and limitations under the
License. When distributing the software, include this License Header
Notice in each file and include the License files at
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 3, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 3] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 3 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 3 code and therefore, elected the GPL
Version 3 license, then the option applies only if the new code is
made subject to such option by the copyright holder.
Contributor(s):
Portions Copyrighted 2011 Gephi Consortium.
*/
package org.gephi.ui.exporter.plugin;
import org.gephi.io.exporter.plugin.ExporterVNA;
/**
*
* @author megaterik
*/
public class UIExporterVNAPanel extends javax.swing.JPanel {
/**
* Creates new customizer UIExporterGMLPanel
*/
public UIExporterVNAPanel() {
initComponents();
}
void setup(ExporterVNA exporter) {
//get
// exportColorsCheckBox.setSelected(exporter.isExportColor());
exportColorsCheckBox.setSelected(exporter.isExportColor());
exportEdgeWeightCheckBox.setSelected(exporter.isExportEdgeWeight());
exportLabelCheckBox.setSelected(exporter.isExportShortLabel());
exportAttributesCheckBox.setSelected(exporter.isExportAttributes());
exportCoordsCheckBox.setSelected(exporter.isExportCoords());
exportSizeCheckBox.setSelected(exporter.isExportSize());
normalizeCheckBox.setSelected(exporter.isNormalize());
}
void unsetup(ExporterVNA exporter) {
exporter.setExportAttributes(exportAttributesCheckBox.isSelected());
exporter.setExportColor(exportColorsCheckBox.isSelected());
exporter.setExportCoords(exportCoordsCheckBox.isSelected());
exporter.setExportEdgeWeight(exportEdgeWeightCheckBox.isSelected());
exporter.setExportShortLabel(exportLabelCheckBox.isSelected());
exporter.setExportSize(exportSizeCheckBox.isSelected());
exporter.setNormalize(normalizeCheckBox.isSelected());
}
/**
* 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 FormEditor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
exportLabel = new javax.swing.JLabel();
exportCoordsCheckBox = new javax.swing.JCheckBox();
exportColorsCheckBox = new javax.swing.JCheckBox();
exportSizeCheckBox = new javax.swing.JCheckBox();
exportEdgeWeightCheckBox = new javax.swing.JCheckBox();
exportAttributesCheckBox = new javax.swing.JCheckBox();
normalizeCheckBox = new javax.swing.JCheckBox();
normalizeLabel = new javax.swing.JLabel();
exportLabelCheckBox = new javax.swing.JCheckBox();
exportLabel.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.exportLabel.text")); // NOI18N
exportCoordsCheckBox.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.positionLabel.text")); // NOI18N
exportColorsCheckBox.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.colorsLabel.text")); // NOI18N
exportSizeCheckBox.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.sizeLabel.text")); // NOI18N
exportEdgeWeightCheckBox.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.edgeWeightLabel.text")); // NOI18N
exportAttributesCheckBox.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.attributes.text")); // NOI18N
exportAttributesCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exportAttributesCheckBoxActionPerformed(evt);
}
});
normalizeCheckBox.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.normalize.text")); // NOI18N
normalizeCheckBox.setLabel(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.normalize.text")); // NOI18N
normalizeLabel.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
normalizeLabel.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.normalizeHintLabel.text")); // NOI18N
exportLabelCheckBox.setText(org.openide.util.NbBundle.getMessage(UIExporterVNAPanel.class, "UIExporterGML.labelLabel.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(exportLabel)
.addComponent(normalizeCheckBox))
.addGap(23, 23, 23)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(normalizeLabel)
.addComponent(exportEdgeWeightCheckBox)
.addComponent(exportSizeCheckBox)
.addComponent(exportColorsCheckBox)
.addComponent(exportCoordsCheckBox)
.addComponent(exportLabelCheckBox)
.addComponent(exportAttributesCheckBox))
.addContainerGap(90, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(exportLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(exportCoordsCheckBox))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(exportColorsCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(exportSizeCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(exportEdgeWeightCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(exportLabelCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(exportAttributesCheckBox)
.addGap(3, 3, 3)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(normalizeCheckBox)
.addComponent(normalizeLabel))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
exportAttributesCheckBox.getAccessibleContext().setAccessibleName("\n"); // NOI18N
exportAttributesCheckBox.getAccessibleContext().setAccessibleDescription("");
}// </editor-fold>//GEN-END:initComponents
private void exportAttributesCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exportAttributesCheckBoxActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_exportAttributesCheckBoxActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox exportAttributesCheckBox;
private javax.swing.JCheckBox exportColorsCheckBox;
private javax.swing.JCheckBox exportCoordsCheckBox;
private javax.swing.JCheckBox exportEdgeWeightCheckBox;
private javax.swing.JLabel exportLabel;
private javax.swing.JCheckBox exportLabelCheckBox;
private javax.swing.JCheckBox exportSizeCheckBox;
private javax.swing.JCheckBox normalizeCheckBox;
private javax.swing.JLabel normalizeLabel;
// End of variables declaration//GEN-END:variables
}