From d64d82697ad238f05f1ce32a67c0a246d1282341 Mon Sep 17 00:00:00 2001
From: 7u83 <7u83@mail.ru>
Date: Wed, 4 Oct 2017 10:05:32 +0200
Subject: [PATCH] Refactoring, putting chart painters into separate directory
---
nbproject/private/private.xml | 49 +++----------------
nbproject/project.properties | 2 +-
src/chart/ChartDef.java | 2 +-
src/chart/ChartPanel.java | 4 +-
src/chart/MasterChart.java | 4 ++
.../CandleStickChartPainter.java | 3 +-
.../{ => painter}/ChartCrossPainter.java | 4 +-
src/chart/{ => painter}/ChartPainter.java | 4 +-
src/chart/{ => painter}/LineChartPainter.java | 3 +-
src/chart/{ => painter}/OHLCChartPainter.java | 5 +-
.../{ => painter}/XLegendChartPainter.java | 4 +-
11 files changed, 33 insertions(+), 51 deletions(-)
rename src/chart/{ => painter}/CandleStickChartPainter.java (97%)
rename src/chart/{ => painter}/ChartCrossPainter.java (96%)
rename src/chart/{ => painter}/ChartPainter.java (97%)
rename src/chart/{ => painter}/LineChartPainter.java (96%)
rename src/chart/{ => painter}/OHLCChartPainter.java (97%)
rename src/chart/{ => painter}/XLegendChartPainter.java (97%)
diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml
index 982bc06..69dfcfa 100644
--- a/nbproject/private/private.xml
+++ b/nbproject/private/private.xml
@@ -3,48 +3,13 @@
- file:/home/tube/NetBeansProjects/SeSim/src/traders/RandomTraderA.java
- file:/home/tube/NetBeansProjects/SeSim/test/sesim/Test.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/StatisticsPanel.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/tools/NummericCellRenderer.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderInterface.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartTestDialog.java
- file:/home/tube/NetBeansProjects/SeSim/src/traders/ManTrader/ManTraderConsoleDialog.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderLoader.java
- file:/home/tube/NetBeansProjects/SeSim/src/traders/ManTrader/ManTrader.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/NewPanel.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/SeSimApplication.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/Globals.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/XLegendChartPainter.java
- file:/home/tube/NetBeansProjects/SeSim/src/traders/RandomTraderB.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/OHLCChartPainter.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/Logger.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/CandleStickChartPainter.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/EditPreferencesDialog.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/QuotePanel.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderBase.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/Statistics.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/EditStrategies.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/MainChart.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/Chart.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/Clock.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartDef.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/OHLCData.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/IDGenerator.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/MinMax.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderGui.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/Exchange.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/LineChartPainter.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/jp99.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/Locker.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartPanel.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/orderbook/OrderBook.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartPanal.java
- file:/home/tube/NetBeansProjects/SeSim/src/sesim/OHLCDataItem.java
- file:/home/tube/NetBeansProjects/SeSim/src/gui/AboutDialog.java
- file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartPainter.java
- file:/home/tube/NetBeansProjects/SeSim/README.md
- file:/home/tube/NetBeansProjects/SeSim/src/gui/TestChartdialog.java
+ file:/home/tobias/v/SeSim/src/chart/OHLCChartPainter.java
+ file:/home/tobias/v/SeSim/src/sesim/OHLCData.java
+ file:/home/tobias/v/SeSim/src/sesim/MinMax.java
+ file:/home/tobias/v/SeSim/src/chart/Chart.java
+ file:/home/tobias/v/SeSim/src/chart/XLegendChartPainter.java
+ file:/home/tobias/v/SeSim/src/gui/MainChart.java
+ file:/home/tobias/v/SeSim/src/chart/ChartTestDialog.java
diff --git a/nbproject/project.properties b/nbproject/project.properties
index 4e86927..d3f9a0b 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -1,4 +1,4 @@
-#Tue, 03 Oct 2017 15:28:04 +0200
+#Wed, 04 Oct 2017 09:58:56 +0200
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
diff --git a/src/chart/ChartDef.java b/src/chart/ChartDef.java
index 51bbd19..c609818 100644
--- a/src/chart/ChartDef.java
+++ b/src/chart/ChartDef.java
@@ -37,7 +37,7 @@ public class ChartDef {
/**
* width of an x unit in em
*/
- double x_unit_width=4.0;
+ public double x_unit_width=4.0;
ChartDef(){
diff --git a/src/chart/ChartPanel.java b/src/chart/ChartPanel.java
index 3aa3e18..c482542 100644
--- a/src/chart/ChartPanel.java
+++ b/src/chart/ChartPanel.java
@@ -1,5 +1,7 @@
package chart;
+import chart.painter.ChartPainter;
+import chart.painter.XLegendChartPainter;
import gui.Globals;
import java.awt.Cursor;
@@ -107,7 +109,7 @@ public class ChartPanel extends javax.swing.JPanel implements AdjustmentListener
);
}// //GEN-END:initComponents
- Point mouse = null;
+ public Point mouse = null;
private void formMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseMoved
diff --git a/src/chart/MasterChart.java b/src/chart/MasterChart.java
index 0b467b9..b6a0285 100644
--- a/src/chart/MasterChart.java
+++ b/src/chart/MasterChart.java
@@ -25,6 +25,10 @@
*/
package chart;
+import chart.painter.CandleStickChartPainter;
+import chart.painter.ChartPainter;
+import chart.painter.XLegendChartPainter;
+import chart.painter.ChartCrossPainter;
import gui.Globals;
import sesim.Exchange.QuoteReceiver;
import sesim.OHLCData;
diff --git a/src/chart/CandleStickChartPainter.java b/src/chart/painter/CandleStickChartPainter.java
similarity index 97%
rename from src/chart/CandleStickChartPainter.java
rename to src/chart/painter/CandleStickChartPainter.java
index 526d6de..909f65e 100644
--- a/src/chart/CandleStickChartPainter.java
+++ b/src/chart/painter/CandleStickChartPainter.java
@@ -23,8 +23,9 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-package chart;
+package chart.painter;
+import chart.painter.OHLCChartPainter;
import java.awt.Color;
import java.awt.Graphics2D;
import javax.swing.JScrollBar;
diff --git a/src/chart/ChartCrossPainter.java b/src/chart/painter/ChartCrossPainter.java
similarity index 96%
rename from src/chart/ChartCrossPainter.java
rename to src/chart/painter/ChartCrossPainter.java
index 25d8f23..aae5b60 100644
--- a/src/chart/ChartCrossPainter.java
+++ b/src/chart/painter/ChartCrossPainter.java
@@ -23,8 +23,10 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-package chart;
+package chart.painter;
+import chart.ChartDef;
+import chart.ChartPanel;
import java.awt.Graphics2D;
import java.awt.Point;
import javax.swing.JPanel;
diff --git a/src/chart/ChartPainter.java b/src/chart/painter/ChartPainter.java
similarity index 97%
rename from src/chart/ChartPainter.java
rename to src/chart/painter/ChartPainter.java
index c434a8a..f38ad62 100644
--- a/src/chart/ChartPainter.java
+++ b/src/chart/painter/ChartPainter.java
@@ -23,8 +23,10 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-package chart;
+package chart.painter;
+import chart.ChartDef;
+import chart.ChartPanel;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
diff --git a/src/chart/LineChartPainter.java b/src/chart/painter/LineChartPainter.java
similarity index 96%
rename from src/chart/LineChartPainter.java
rename to src/chart/painter/LineChartPainter.java
index b2f11ed..b87d937 100644
--- a/src/chart/LineChartPainter.java
+++ b/src/chart/painter/LineChartPainter.java
@@ -23,8 +23,9 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-package chart;
+package chart.painter;
+import chart.painter.OHLCChartPainter;
import java.awt.Color;
import java.awt.Graphics2D;
import sesim.OHLCDataItem;
diff --git a/src/chart/OHLCChartPainter.java b/src/chart/painter/OHLCChartPainter.java
similarity index 97%
rename from src/chart/OHLCChartPainter.java
rename to src/chart/painter/OHLCChartPainter.java
index 0140f61..e692f5c 100644
--- a/src/chart/OHLCChartPainter.java
+++ b/src/chart/painter/OHLCChartPainter.java
@@ -23,8 +23,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-package chart;
+package chart.painter;
+import chart.ChartDef;
+import chart.ChartPanel;
+import chart.painter.ChartPainter;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
diff --git a/src/chart/XLegendChartPainter.java b/src/chart/painter/XLegendChartPainter.java
similarity index 97%
rename from src/chart/XLegendChartPainter.java
rename to src/chart/painter/XLegendChartPainter.java
index e6b6146..460bdf8 100644
--- a/src/chart/XLegendChartPainter.java
+++ b/src/chart/painter/XLegendChartPainter.java
@@ -23,8 +23,10 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-package chart;
+package chart.painter;
+import chart.ChartDef;
+import chart.ChartPanel;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;