/*
* Copyright (c) 2009 The Jackson Laboratory
*
* This software was developed by Gary Churchill's Lab at The Jackson
* Laboratory (see http://research.jax.org/faculty/churchill).
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jax.qtl.graph;
import java.awt.Frame;
import javax.help.CSH;
import javax.help.HelpSet;
import javax.help.SecondaryWindow;
import org.jax.qtl.QTL;
/**
* A simple dialog for editing general graph settings
* @author <A HREF="mailto:keith.sheppard@jax.org">Keith Sheppard</A>
*/
public class OneDimensionPlotSettingsDialog extends javax.swing.JDialog
{
/**
* every {@link java.io.Serializable} is supposed to have one of these
*/
private static final long serialVersionUID = 8492303851757036654L;
private static final String HELP_ID_STRING = "Graph_Settings";
private final OneDimensionPlotSettingsPanel visualSettingsPanel;
/**
* Constructor
* @param parent
* the parent frame for this dialog
* @param oneDimensionPlot
* the graph whose settings we're editing
*/
public OneDimensionPlotSettingsDialog(
Frame parent,
OneDimensionPlot oneDimensionPlot)
{
super(parent, "Edit Graph Labels", true);
this.visualSettingsPanel = new OneDimensionPlotSettingsPanel(
oneDimensionPlot);
this.initComponents();
// initialize the help stuff
HelpSet hs = QTL.getInstance().getMenubar().getHelpSet();
CSH.setHelpIDString(
this.helpButton,
HELP_ID_STRING);
this.helpButton.addActionListener(
new CSH.DisplayHelpFromSource(
hs,
SecondaryWindow.class.getName(),
null));
}
/**
* 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("all")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
mainSettingsPanel = this.visualSettingsPanel;
actionPanel = new javax.swing.JPanel();
closeButton = new javax.swing.JButton();
helpButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
getContentPane().add(mainSettingsPanel, java.awt.BorderLayout.CENTER);
closeButton.setText("Close");
closeButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
closeButtonActionPerformed(evt);
}
});
actionPanel.add(closeButton);
helpButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/action/help-16x16.png"))); // NOI18N
helpButton.setText("Help ...");
actionPanel.add(helpButton);
getContentPane().add(actionPanel, java.awt.BorderLayout.SOUTH);
pack();
}// </editor-fold>//GEN-END:initComponents
private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
this.dispose();
}//GEN-LAST:event_closeButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel actionPanel;
private javax.swing.JButton closeButton;
private javax.swing.JButton helpButton;
private javax.swing.JPanel mainSettingsPanel;
// End of variables declaration//GEN-END:variables
}