diff --git a/nbproject/project.properties b/nbproject/project.properties
index 7720936..17e551e 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -1,4 +1,4 @@
-#Sat, 16 Sep 2017 18:25:29 +0200
+#Sun, 17 Sep 2017 23:52:04 +0200
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
diff --git a/src/chart/Chart1.form b/src/chart/Chart1.form
index c638b68..9312e7a 100644
--- a/src/chart/Chart1.form
+++ b/src/chart/Chart1.form
@@ -16,12 +16,12 @@
-
+
-
+
diff --git a/src/chart/Chart1.java b/src/chart/Chart1.java
index 586d212..fbeb1c7 100644
--- a/src/chart/Chart1.java
+++ b/src/chart/Chart1.java
@@ -32,6 +32,7 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
return;
}
+ setSize(new Dimension(9000,500));
Globals.se.addQuoteReceiver(this);
}
@@ -42,7 +43,21 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
if (Globals.se==null)
return;
- OHLCData data = Globals.se.getOHLCdata(5000);
+ g.setColor(Color.red);
+ g.drawLine(0, 0, 7000, 610);
+
+ Dimension d = new Dimension(8000,200);
+ setPreferredSize(d);
+
+ revalidate();
+
+
+ System.out.printf("Setting pref size\n" );
+
+
+
+
+ OHLCData data = Globals.se.getOHLCdata(60000);
int first_bar = 0;
int last_bar = data.size();
@@ -73,6 +88,8 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
// Calculate the number of pixels for 1 em
em_width = g.getFontMetrics().stringWidth("M");
+
+
drawChart((Graphics2D)g);
}
@@ -89,11 +106,11 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 400, Short.MAX_VALUE)
+ .addGap(0, 498, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 300, Short.MAX_VALUE)
+ .addGap(0, 341, Short.MAX_VALUE)
);
}// //GEN-END:initComponents
diff --git a/src/chart/ChartPanal.form b/src/chart/ChartPanal.form
index 61671e9..e4d688a 100644
--- a/src/chart/ChartPanal.form
+++ b/src/chart/ChartPanal.form
@@ -1,6 +1,11 @@
diff --git a/src/chart/ChartTestDialog.java b/src/chart/ChartTestDialog.java
index 3cb1166..7fcf6db 100644
--- a/src/chart/ChartTestDialog.java
+++ b/src/chart/ChartTestDialog.java
@@ -37,6 +37,7 @@ public class ChartTestDialog extends javax.swing.JDialog {
public ChartTestDialog(java.awt.Frame parent, boolean modal) {
super(parent, modal);
initComponents();
+ setLocationRelativeTo(parent);
}
/**
@@ -48,25 +49,42 @@ public class ChartTestDialog extends javax.swing.JDialog {
// //GEN-BEGIN:initComponents
private void initComponents() {
- chartPanal2 = new chart.ChartPanal();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ chart11 = new chart.Chart1();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
+ jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
+
+ javax.swing.GroupLayout chart11Layout = new javax.swing.GroupLayout(chart11);
+ chart11.setLayout(chart11Layout);
+ chart11Layout.setHorizontalGroup(
+ chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGap(0, 102, Short.MAX_VALUE)
+ );
+ chart11Layout.setVerticalGroup(
+ chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGap(0, 233, Short.MAX_VALUE)
+ );
+
+ jScrollPane1.setViewportView(chart11);
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(chartPanal2, javax.swing.GroupLayout.DEFAULT_SIZE, 504, Short.MAX_VALUE)
+ .addContainerGap(387, Short.MAX_VALUE)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(chartPanal2, javax.swing.GroupLayout.DEFAULT_SIZE, 421, Short.MAX_VALUE)
- .addContainerGap())
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+ .addContainerGap(59, Short.MAX_VALUE)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(120, Short.MAX_VALUE))
);
pack();
@@ -115,6 +133,7 @@ public class ChartTestDialog extends javax.swing.JDialog {
}
// Variables declaration - do not modify//GEN-BEGIN:variables
- private chart.ChartPanal chartPanal2;
+ private chart.Chart1 chart11;
+ private javax.swing.JScrollPane jScrollPane1;
// End of variables declaration//GEN-END:variables
}
diff --git a/src/gui/SeSimApplication.form b/src/gui/SeSimApplication.form
index d22df6c..23cf940 100644
--- a/src/gui/SeSimApplication.form
+++ b/src/gui/SeSimApplication.form
@@ -488,26 +488,13 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/gui/SeSimApplication.java b/src/gui/SeSimApplication.java
index 9d1422c..b2f4254 100644
--- a/src/gui/SeSimApplication.java
+++ b/src/gui/SeSimApplication.java
@@ -187,7 +187,7 @@ public class SeSimApplication extends javax.swing.JFrame {
quoteVertical1 = new gui.orderbook.QuoteVertical();
jSplitPane5 = new javax.swing.JSplitPane();
statistics1 = new gui.Statistics();
- chart11 = new chart.Chart1();
+ chartPanal1 = new chart.ChartPanal();
menuBar = new javax.swing.JMenuBar();
fileMenu = new javax.swing.JMenu();
openMenuItem = new javax.swing.JMenuItem();
@@ -340,19 +340,7 @@ public class SeSimApplication extends javax.swing.JFrame {
jSplitPane5.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane5.setTopComponent(statistics1);
-
- javax.swing.GroupLayout chart11Layout = new javax.swing.GroupLayout(chart11);
- chart11.setLayout(chart11Layout);
- chart11Layout.setHorizontalGroup(
- chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 104, Short.MAX_VALUE)
- );
- chart11Layout.setVerticalGroup(
- chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 235, Short.MAX_VALUE)
- );
-
- jSplitPane5.setRightComponent(chart11);
+ jSplitPane5.setRightComponent(chartPanal1);
jSplitPane3.setLeftComponent(jSplitPane5);
@@ -936,7 +924,7 @@ public class SeSimApplication extends javax.swing.JFrame {
private javax.swing.JMenuItem aboutMenuItem;
private javax.swing.JSpinner accelSpinner;
private gui.MainChart chart;
- private chart.Chart1 chart11;
+ private chart.ChartPanal chartPanal1;
private javax.swing.JScrollPane chartSrollPane;
private javax.swing.JMenuItem clearMenuItem;
private gui.Clock clock;