package analysisTool;
import java.awt.event.ActionListener;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.UIManager;
public class PowerGui extends javax.swing.JFrame {
public PowerGui() {
initComponents();
jSplitPane1.setOneTouchExpandable(true);
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
buttonGroupPlot = new javax.swing.ButtonGroup();
jDialog1 = new javax.swing.JDialog();
jPanelDataSettings = new javax.swing.JPanel();
jPanelPreview = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
jPanelWarnings = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
jTextArea2 = new javax.swing.JTextArea();
jButtonReadFile = new javax.swing.JButton();
jPanelSetColumns = new javax.swing.JPanel();
jComboBoxColumn1 = new javax.swing.JComboBox();
jComboBoxColumn2 = new javax.swing.JComboBox();
jComboBoxColumn3 = new javax.swing.JComboBox();
jComboBoxColumn4 = new javax.swing.JComboBox();
jComboBoxColumn5 = new javax.swing.JComboBox();
jComboBoxColumn6 = new javax.swing.JComboBox();
jComboBoxColumn7 = new javax.swing.JComboBox();
jComboBoxColumn8 = new javax.swing.JComboBox();
jPanelColumnsDelimiter = new javax.swing.JPanel();
jRadioButtonComma = new javax.swing.JRadioButton();
jRadioButtonSemiColon = new javax.swing.JRadioButton();
jRadioButtonTab = new javax.swing.JRadioButton();
jRadioButtonSpace = new javax.swing.JRadioButton();
jPanelDateFormat = new javax.swing.JPanel();
jComboBoxDate = new javax.swing.JComboBox();
jLabelDate = new javax.swing.JLabel();
jLabelIgnoreSlashes = new javax.swing.JLabel();
jCheckBoxDataInterpolation = new javax.swing.JCheckBox();
jCheckBoxSetAsDefault = new javax.swing.JCheckBox();
jButtonImportFile = new javax.swing.JButton();
buttonGroupColumnsDelimiter = new javax.swing.ButtonGroup();
jSplitPane1 = new javax.swing.JSplitPane();
jDataManager = new javax.swing.JPanel();
jPanelDataManager = new javax.swing.JPanel();
jPanelDataInput = new javax.swing.JPanel();
jButtonImportData = new javax.swing.JButton();
jPanelSetData = new javax.swing.JPanel();
jLabelTotalRows = new javax.swing.JLabel();
jLabelStartRow = new javax.swing.JLabel();
jLabelEndRow = new javax.swing.JLabel();
jLabelRowsBack = new javax.swing.JLabel();
jTextFieldTotalRows = new javax.swing.JTextField();
jTextFieldStartRow = new javax.swing.JTextField();
jTextFieldEndRow = new javax.swing.JTextField();
jTextFieldRowsBack = new javax.swing.JTextField();
jPanelPlotData = new javax.swing.JPanel();
jRadioButtonLine = new javax.swing.JRadioButton();
jRadioButtonBars = new javax.swing.JRadioButton();
jRadioButtonCandlestick = new javax.swing.JRadioButton();
jRadioButtonHeikin = new javax.swing.JRadioButton();
jComboBoxPlot = new javax.swing.JComboBox();
jButtonPlotData = new javax.swing.JButton();
jSeparator1 = new javax.swing.JSeparator();
jGraphPlot = new javax.swing.JPanel();
jToolBar1 = new javax.swing.JToolBar();
jMenuBar1 = new javax.swing.JMenuBar();
jMenuFile = new javax.swing.JMenu();
jMenuEdit = new javax.swing.JMenu();
jPanelDataSettings.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Data Settings", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
jPanelPreview.setBorder(javax.swing.BorderFactory.createTitledBorder("Data Preview"));
jTextArea1.setColumns(20);
jTextArea1.setRows(5);
jScrollPane1.setViewportView(jTextArea1);
javax.swing.GroupLayout jPanelPreviewLayout = new javax.swing.GroupLayout(jPanelPreview);
jPanelPreview.setLayout(jPanelPreviewLayout);
jPanelPreviewLayout.setHorizontalGroup(
jPanelPreviewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 334, Short.MAX_VALUE)
);
jPanelPreviewLayout.setVerticalGroup(
jPanelPreviewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
);
jPanelWarnings.setBorder(javax.swing.BorderFactory.createTitledBorder("Warnings"));
jTextArea2.setColumns(20);
jTextArea2.setRows(5);
jScrollPane2.setViewportView(jTextArea2);
javax.swing.GroupLayout jPanelWarningsLayout = new javax.swing.GroupLayout(jPanelWarnings);
jPanelWarnings.setLayout(jPanelWarningsLayout);
jPanelWarningsLayout.setHorizontalGroup(
jPanelWarningsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)
);
jPanelWarningsLayout.setVerticalGroup(
jPanelWarningsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
);
jButtonReadFile.setText("Read File");
jPanelSetColumns.setBorder(javax.swing.BorderFactory.createTitledBorder("Set Columns "));
jComboBoxColumn1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Date", "Time", "Open", "High", "Low", "Close", "Volume", "Open Interest" }));
jComboBoxColumn2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Time", "Open", "High", "Low", "Close", "Volume", "Open Interest", "Skip", " " }));
jComboBoxColumn3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Open", "High", "Low", "Close", "Volume", "Open Interest", "Skip", " " }));
jComboBoxColumn4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "High", "Low", "Close", "Volume", "Open Interest", "Skip" }));
jComboBoxColumn5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Low", "Close", "Volume", "Open Interest", "Skip" }));
jComboBoxColumn6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Close", "Volume", "Open Interest", "Skip" }));
jComboBoxColumn7.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Volume", "Open Interest", "Skip" }));
jComboBoxColumn8.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Open Interest", "Skip" }));
javax.swing.GroupLayout jPanelSetColumnsLayout = new javax.swing.GroupLayout(jPanelSetColumns);
jPanelSetColumns.setLayout(jPanelSetColumnsLayout);
jPanelSetColumnsLayout.setHorizontalGroup(
jPanelSetColumnsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelSetColumnsLayout.createSequentialGroup()
.addComponent(jComboBoxColumn1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBoxColumn2, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBoxColumn3, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBoxColumn4, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBoxColumn5, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBoxColumn6, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBoxColumn7, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBoxColumn8, 0, 72, Short.MAX_VALUE)
.addContainerGap())
);
jPanelSetColumnsLayout.setVerticalGroup(
jPanelSetColumnsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelSetColumnsLayout.createSequentialGroup()
.addGroup(jPanelSetColumnsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jComboBoxColumn1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBoxColumn2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBoxColumn3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBoxColumn4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBoxColumn5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBoxColumn6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBoxColumn7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBoxColumn8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanelColumnsDelimiter.setBorder(javax.swing.BorderFactory.createTitledBorder("Columns Delimiter"));
buttonGroupColumnsDelimiter.add(jRadioButtonComma);
jRadioButtonComma.setSelected(true);
jRadioButtonComma.setText("Comma");
buttonGroupColumnsDelimiter.add(jRadioButtonSemiColon);
jRadioButtonSemiColon.setText("Semi-Colon");
buttonGroupColumnsDelimiter.add(jRadioButtonTab);
jRadioButtonTab.setText("Tab");
buttonGroupColumnsDelimiter.add(jRadioButtonSpace);
jRadioButtonSpace.setText("Space");
javax.swing.GroupLayout jPanelColumnsDelimiterLayout = new javax.swing.GroupLayout(jPanelColumnsDelimiter);
jPanelColumnsDelimiter.setLayout(jPanelColumnsDelimiterLayout);
jPanelColumnsDelimiterLayout.setHorizontalGroup(
jPanelColumnsDelimiterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelColumnsDelimiterLayout.createSequentialGroup()
.addComponent(jRadioButtonComma)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jRadioButtonSemiColon)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jRadioButtonTab)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jRadioButtonSpace)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanelColumnsDelimiterLayout.setVerticalGroup(
jPanelColumnsDelimiterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelColumnsDelimiterLayout.createSequentialGroup()
.addGroup(jPanelColumnsDelimiterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jRadioButtonComma)
.addComponent(jRadioButtonSemiColon)
.addComponent(jRadioButtonTab)
.addComponent(jRadioButtonSpace))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanelDateFormat.setBorder(javax.swing.BorderFactory.createTitledBorder("Date Format"));
jComboBoxDate.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "yyyyMMdd", "ddMMyyyy", "MMddyyyy", "MMyyyy", "yyyyMM" }));
jLabelDate.setText("Date");
jLabelIgnoreSlashes.setFont(new java.awt.Font("Tahoma", 2, 10)); // NOI18N
jLabelIgnoreSlashes.setText("Ignore Slashes");
javax.swing.GroupLayout jPanelDateFormatLayout = new javax.swing.GroupLayout(jPanelDateFormat);
jPanelDateFormat.setLayout(jPanelDateFormatLayout);
jPanelDateFormatLayout.setHorizontalGroup(
jPanelDateFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDateFormatLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabelDate)
.addGap(18, 18, 18)
.addComponent(jComboBoxDate, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jLabelIgnoreSlashes)
.addContainerGap(24, Short.MAX_VALUE))
);
jPanelDateFormatLayout.setVerticalGroup(
jPanelDateFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDateFormatLayout.createSequentialGroup()
.addGroup(jPanelDateFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabelDate)
.addComponent(jComboBoxDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabelIgnoreSlashes))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jCheckBoxDataInterpolation.setText("Data Interpolation");
jCheckBoxSetAsDefault.setText("Set as Default");
jButtonImportFile.setText("Import File");
javax.swing.GroupLayout jPanelDataSettingsLayout = new javax.swing.GroupLayout(jPanelDataSettings);
jPanelDataSettings.setLayout(jPanelDataSettingsLayout);
jPanelDataSettingsLayout.setHorizontalGroup(
jPanelDataSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDataSettingsLayout.createSequentialGroup()
.addGroup(jPanelDataSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDataSettingsLayout.createSequentialGroup()
.addComponent(jPanelColumnsDelimiter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanelDateFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 71, Short.MAX_VALUE)
.addGroup(jPanelDataSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jButtonImportFile, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jCheckBoxSetAsDefault, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDataSettingsLayout.createSequentialGroup()
.addComponent(jPanelPreview, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanelDataSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDataSettingsLayout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jCheckBoxDataInterpolation, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jPanelWarnings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanelDataSettingsLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jButtonReadFile, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jPanelSetColumns, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jPanelDataSettingsLayout.setVerticalGroup(
jPanelDataSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDataSettingsLayout.createSequentialGroup()
.addComponent(jButtonReadFile, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(jPanelDataSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanelWarnings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanelPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jCheckBoxDataInterpolation)
.addGap(8, 8, 8)
.addComponent(jPanelSetColumns, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanelDataSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanelColumnsDelimiter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanelDataSettingsLayout.createSequentialGroup()
.addComponent(jCheckBoxSetAsDefault)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButtonImportFile, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jPanelDateFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
jDialog1.getContentPane().setLayout(jDialog1Layout);
jDialog1Layout.setHorizontalGroup(
jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jDialog1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanelDataSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 717, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jDialog1Layout.setVerticalGroup(
jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jDialog1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanelDataSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(24, Short.MAX_VALUE))
);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jSplitPane1.setDividerLocation(230);
jSplitPane1.setDividerSize(7);
jPanelDataManager.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Data Manager", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
jPanelDataInput.setBorder(javax.swing.BorderFactory.createTitledBorder("Data Input"));
jButtonImportData.setText("Import Data");
jButtonImportData.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonImportDataActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanelDataInputLayout = new javax.swing.GroupLayout(jPanelDataInput);
jPanelDataInput.setLayout(jPanelDataInputLayout);
jPanelDataInputLayout.setHorizontalGroup(
jPanelDataInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDataInputLayout.createSequentialGroup()
.addComponent(jButtonImportData)
.addContainerGap(88, Short.MAX_VALUE))
);
jPanelDataInputLayout.setVerticalGroup(
jPanelDataInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDataInputLayout.createSequentialGroup()
.addComponent(jButtonImportData)
.addContainerGap(56, Short.MAX_VALUE))
);
jPanelSetData.setBorder(javax.swing.BorderFactory.createTitledBorder("Set Data"));
jLabelTotalRows.setText("Total Rows");
jLabelStartRow.setText("Start Row");
jLabelEndRow.setText("End Row");
jLabelRowsBack.setText("Rows Back");
javax.swing.GroupLayout jPanelSetDataLayout = new javax.swing.GroupLayout(jPanelSetData);
jPanelSetData.setLayout(jPanelSetDataLayout);
jPanelSetDataLayout.setHorizontalGroup(
jPanelSetDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelSetDataLayout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanelSetDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabelTotalRows)
.addComponent(jLabelStartRow)
.addComponent(jLabelEndRow)
.addComponent(jLabelRowsBack))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
.addGroup(jPanelSetDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jTextFieldRowsBack)
.addComponent(jTextFieldEndRow)
.addComponent(jTextFieldStartRow)
.addComponent(jTextFieldTotalRows, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE))
.addContainerGap())
);
jPanelSetDataLayout.setVerticalGroup(
jPanelSetDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelSetDataLayout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanelSetDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabelTotalRows)
.addComponent(jTextFieldTotalRows, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanelSetDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextFieldStartRow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabelStartRow))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanelSetDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextFieldEndRow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabelEndRow))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanelSetDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextFieldRowsBack, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabelRowsBack))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanelPlotData.setBorder(javax.swing.BorderFactory.createTitledBorder("Plot Data"));
buttonGroupPlot.add(jRadioButtonLine);
jRadioButtonLine.setSelected(true);
jRadioButtonLine.setText("Line On");
buttonGroupPlot.add(jRadioButtonBars);
jRadioButtonBars.setText("Bars");
buttonGroupPlot.add(jRadioButtonCandlestick);
jRadioButtonCandlestick.setText("Candlestick");
buttonGroupPlot.add(jRadioButtonHeikin);
jRadioButtonHeikin.setText("Heikin-Ashi");
jComboBoxPlot.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Close", "Open", "High", "Low", "(Min+Max)/2", "(Open+Close)/2" }));
jButtonPlotData.setText("Plot Data");
javax.swing.GroupLayout jPanelPlotDataLayout = new javax.swing.GroupLayout(jPanelPlotData);
jPanelPlotData.setLayout(jPanelPlotDataLayout);
jPanelPlotDataLayout.setHorizontalGroup(
jPanelPlotDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelPlotDataLayout.createSequentialGroup()
.addGroup(jPanelPlotDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelPlotDataLayout.createSequentialGroup()
.addComponent(jRadioButtonLine)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBoxPlot, 0, 106, Short.MAX_VALUE))
.addComponent(jRadioButtonBars)
.addGroup(jPanelPlotDataLayout.createSequentialGroup()
.addComponent(jRadioButtonHeikin)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
.addComponent(jButtonPlotData))
.addComponent(jRadioButtonCandlestick))
.addContainerGap())
);
jPanelPlotDataLayout.setVerticalGroup(
jPanelPlotDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelPlotDataLayout.createSequentialGroup()
.addContainerGap(11, Short.MAX_VALUE)
.addGroup(jPanelPlotDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jRadioButtonLine)
.addComponent(jComboBoxPlot, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jRadioButtonBars)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jRadioButtonCandlestick)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanelPlotDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jRadioButtonHeikin)
.addComponent(jButtonPlotData)))
);
javax.swing.GroupLayout jPanelDataManagerLayout = new javax.swing.GroupLayout(jPanelDataManager);
jPanelDataManager.setLayout(jPanelDataManagerLayout);
jPanelDataManagerLayout.setHorizontalGroup(
jPanelDataManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanelDataInput, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanelPlotData, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanelSetData, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanelDataManagerLayout.setVerticalGroup(
jPanelDataManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanelDataManagerLayout.createSequentialGroup()
.addComponent(jPanelDataInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanelSetData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanelPlotData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
javax.swing.GroupLayout jDataManagerLayout = new javax.swing.GroupLayout(jDataManager);
jDataManager.setLayout(jDataManagerLayout);
jDataManagerLayout.setHorizontalGroup(
jDataManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jDataManagerLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanelDataManager, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE)
);
jDataManagerLayout.setVerticalGroup(
jDataManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jDataManagerLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanelDataManager, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(448, Short.MAX_VALUE))
);
jSplitPane1.setLeftComponent(jDataManager);
javax.swing.GroupLayout jGraphPlotLayout = new javax.swing.GroupLayout(jGraphPlot);
jGraphPlot.setLayout(jGraphPlotLayout);
jGraphPlotLayout.setHorizontalGroup(
jGraphPlotLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 1249, Short.MAX_VALUE)
);
jGraphPlotLayout.setVerticalGroup(
jGraphPlotLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 903, Short.MAX_VALUE)
);
jSplitPane1.setRightComponent(jGraphPlot);
jToolBar1.setRollover(true);
jMenuFile.setText("File");
jMenuBar1.add(jMenuFile);
jMenuEdit.setText("Edit");
jMenuBar1.add(jMenuEdit);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(23, 23, 23)
.addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1487, Short.MAX_VALUE))
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 673, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 905, Short.MAX_VALUE)
.addContainerGap())
);
getAccessibleContext().setAccessibleParent(this);
pack();
}// </editor-fold>
private void jButtonImportDataActionPerformed(java.awt.event.ActionEvent evt) {
jButtonImportData.addActionListener((ActionListener) jDialog1);
jDialog1.setVisible(true);
}
public static void main(String args[]) {
try{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(UnsupportedLookAndFeelException e){
//handle exception
}
catch(ClassNotFoundException e){
//handle exception
}
catch(InstantiationException e){
//handle exception
}
catch(IllegalAccessException e){
//handle exception
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new PowerGui().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.ButtonGroup buttonGroupColumnsDelimiter;
private javax.swing.ButtonGroup buttonGroupPlot;
private javax.swing.JButton jButtonImportData;
private javax.swing.JButton jButtonImportFile;
private javax.swing.JButton jButtonPlotData;
private javax.swing.JButton jButtonReadFile;
private javax.swing.JCheckBox jCheckBoxDataInterpolation;
private javax.swing.JCheckBox jCheckBoxSetAsDefault;
private javax.swing.JComboBox jComboBoxColumn1;
private javax.swing.JComboBox jComboBoxColumn2;
private javax.swing.JComboBox jComboBoxColumn3;
private javax.swing.JComboBox jComboBoxColumn4;
private javax.swing.JComboBox jComboBoxColumn5;
private javax.swing.JComboBox jComboBoxColumn6;
private javax.swing.JComboBox jComboBoxColumn7;
private javax.swing.JComboBox jComboBoxColumn8;
private javax.swing.JComboBox jComboBoxDate;
private javax.swing.JComboBox jComboBoxPlot;
private javax.swing.JPanel jDataManager;
private javax.swing.JDialog jDialog1;
private javax.swing.JPanel jGraphPlot;
private javax.swing.JLabel jLabelDate;
private javax.swing.JLabel jLabelEndRow;
private javax.swing.JLabel jLabelIgnoreSlashes;
private javax.swing.JLabel jLabelRowsBack;
private javax.swing.JLabel jLabelStartRow;
private javax.swing.JLabel jLabelTotalRows;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenu jMenuEdit;
private javax.swing.JMenu jMenuFile;
private javax.swing.JPanel jPanelColumnsDelimiter;
private javax.swing.JPanel jPanelDataInput;
private javax.swing.JPanel jPanelDataManager;
private javax.swing.JPanel jPanelDataSettings;
private javax.swing.JPanel jPanelDateFormat;
private javax.swing.JPanel jPanelPlotData;
private javax.swing.JPanel jPanelPreview;
private javax.swing.JPanel jPanelSetColumns;
private javax.swing.JPanel jPanelSetData;
private javax.swing.JPanel jPanelWarnings;
private javax.swing.JRadioButton jRadioButtonBars;
private javax.swing.JRadioButton jRadioButtonCandlestick;
private javax.swing.JRadioButton jRadioButtonComma;
private javax.swing.JRadioButton jRadioButtonHeikin;
private javax.swing.JRadioButton jRadioButtonLine;
private javax.swing.JRadioButton jRadioButtonSemiColon;
private javax.swing.JRadioButton jRadioButtonSpace;
private javax.swing.JRadioButton jRadioButtonTab;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSplitPane jSplitPane1;
private javax.swing.JTextArea jTextArea1;
private javax.swing.JTextArea jTextArea2;
private javax.swing.JTextField jTextFieldEndRow;
private javax.swing.JTextField jTextFieldRowsBack;
private javax.swing.JTextField jTextFieldStartRow;
private javax.swing.JTextField jTextFieldTotalRows;
private javax.swing.JToolBar jToolBar1;
// End of variables declaration
}