Cross Cursor implemented

This commit is contained in:
7u83 2017-10-03 08:05:46 +02:00
parent ce0bb75bab
commit c8c72d264d
16 changed files with 128 additions and 257 deletions

View File

@ -19,6 +19,7 @@
<file>file:/home/tube/NetBeansProjects/SeSim/src/traders/RandomTraderB.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/traders/RandomTraderB.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/OHLCChartPainter.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/chart/OHLCChartPainter.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/Logger.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/Logger.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/CandleStickChartPainter.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/EditPreferencesDialog.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/gui/EditPreferencesDialog.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/QuotePanel.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/gui/QuotePanel.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderBase.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderBase.java</file>
@ -27,18 +28,20 @@
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/MainChart.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/gui/MainChart.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/Chart.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/chart/Chart.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/Clock.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/Clock.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartDef.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/OHLCData.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/OHLCData.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/IDGenerator.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/IDGenerator.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/MinMax.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/MinMax.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderGui.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderGui.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/Exchange.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/Exchange.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/LineChartPainter.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/jp99.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/gui/jp99.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/Locker.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/Locker.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartPanel.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/orderbook/OrderBook.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/gui/orderbook/OrderBook.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartPanal.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartPanal.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/OHLCDataItem.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/OHLCDataItem.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/AboutDialog.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/gui/AboutDialog.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/Chart1.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartPainter.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/chart/ChartPainter.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/README.md</file> <file>file:/home/tube/NetBeansProjects/SeSim/README.md</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/TestChartdialog.java</file> <file>file:/home/tube/NetBeansProjects/SeSim/src/gui/TestChartdialog.java</file>

View File

@ -1,4 +1,4 @@
#Mon, 02 Oct 2017 22:55:32 +0200 #Tue, 03 Oct 2017 07:33:39 +0200
annotation.processing.enabled=true annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false annotation.processing.enabled.in.editor=false
annotation.processing.processors.list= annotation.processing.processors.list=

View File

@ -27,6 +27,8 @@ package chart;
import java.awt.Color; import java.awt.Color;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import javax.swing.JScrollBar;
import sesim.OHLCData;
import sesim.OHLCDataItem; import sesim.OHLCDataItem;
/** /**
@ -69,4 +71,6 @@ public class CandleStickChartPainter extends OHLCChartPainter {
} }
} }

View File

@ -25,31 +25,26 @@
*/ */
package chart; package chart;
import java.awt.Graphics2D;
import java.awt.Point;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import sesim.OHLCData;
/** /**
* *
* @author 7u83 <7u83@mail.ru> * @author 7u83 <7u83@mail.ru>
*/ */
public class NewPanel extends java.awt.Panel { public class ChartCrossPainter extends ChartPainter{
@Override
public void drawChart(Graphics2D g, JScrollBar sb, OHLCData data, ChartPanel p, ChartDef def) {
Point mp = p.mouse;
g.drawLine(0, p.mouse.y-1, p.getSize().width, p.mouse.y-1);
g.drawLine(p.mouse.x-1, 0, p.mouse.x-1, p.getSize().height);
/**
* Creates new form NewPanel
*/
public NewPanel() {
initComponents();
} }
/**
* 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.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
setLayout(new java.awt.BorderLayout());
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
} }

View File

@ -50,9 +50,6 @@ abstract public class ChartPainter {
int big_tick = 10; int big_tick = 10;
int y = 0; int y = 0;
abstract public void drawChart(Graphics2D g, JScrollBar sb, OHLCData data, ChartPanel p, ChartDef def);
abstract public void drawChart(Graphics2D g, JScrollBar sb, OHLCData data, JPanel p, ChartDef def);
} }

View File

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[300, 300]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollBar1" alignment="1" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="100" max="-2" attributes="0"/>
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="119" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace pref="189" max="32767" attributes="0"/>
<Component id="jScrollBar1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="63" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JScrollBar" name="jScrollBar1">
<Properties>
<Property name="orientation" type="int" value="0"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="jButton1">
<Properties>
<Property name="text" type="java.lang.String" value="jButton1"/>
</Properties>
</Component>
</SubComponents>
</Form>

View File

@ -1,128 +0,0 @@
/*
* Copyright (c) 2017, 7u83 <7u83@mail.ru>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package chart;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.Scrollable;
/**
*
* @author 7u83 <7u83@mail.ru>
*/
public class ChartPanal extends javax.swing.JPanel implements Scrollable{
/**
* Creates new form ChartPanal
*/
public ChartPanal() {
initComponents();
}
@Override
public void paint(Graphics g) {
// Dimension psize = this.chart12.getPreferredSize();
// this.setPreferredSize(psize);
super.paint(g); //To change body of generated methods, choose Tools | Templates.
}
/**
* 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("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollBar1 = new javax.swing.JScrollBar();
jButton1 = new javax.swing.JButton();
setPreferredSize(new java.awt.Dimension(300, 300));
jScrollBar1.setOrientation(javax.swing.JScrollBar.HORIZONTAL);
jButton1.setText("jButton1");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollBar1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGap(100, 100, 100)
.addComponent(jButton1)
.addContainerGap(119, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(189, Short.MAX_VALUE)
.addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1)
.addGap(63, 63, 63))
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JScrollBar jScrollBar1;
// End of variables declaration//GEN-END:variables
@Override
public Dimension getPreferredScrollableViewportSize() {
return this.getPreferredSize();
}
@Override
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) {
return 1;
}
@Override
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) {
return 100;
}
@Override
public boolean getScrollableTracksViewportWidth() {
return false;
}
@Override
public boolean getScrollableTracksViewportHeight() {
return false;
}
}

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Events>
<EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="formMouseMoved"/>
</Events>
<AuxValues> <AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>

View File

@ -6,6 +6,7 @@ import java.awt.Cursor;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.event.AdjustmentEvent; import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener; import java.awt.event.AdjustmentListener;
@ -42,6 +43,7 @@ public class ChartPanel extends javax.swing.JPanel implements QuoteReceiver, Adj
setSize(new Dimension(9000, 500)); setSize(new Dimension(9000, 500));
Globals.se.addQuoteReceiver(this); Globals.se.addQuoteReceiver(this);
repaint();
} }
@ -66,6 +68,7 @@ public class ChartPanel extends javax.swing.JPanel implements QuoteReceiver, Adj
return; return;
//this.xbar.setMaximum(994000); //this.xbar.setMaximum(994000);
XLegendChartPainter p = new XLegendChartPainter(); XLegendChartPainter p = new XLegendChartPainter();
@ -92,6 +95,12 @@ public class ChartPanel extends javax.swing.JPanel implements QuoteReceiver, Adj
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
formMouseMoved(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
@ -104,6 +113,18 @@ public class ChartPanel extends javax.swing.JPanel implements QuoteReceiver, Adj
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
Point mouse=null;
private void formMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseMoved
// TODO add your handling code here:
Point p = evt.getPoint();
mouse = p;
System.out.printf("Point %d %d\n",p.x,p.y);
repaint();
}//GEN-LAST:event_formMouseMoved
@Override @Override
public void UpdateQuote(Quote q) { public void UpdateQuote(Quote q) {

View File

@ -29,9 +29,16 @@
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollBar1" pref="586" max="32767" attributes="0"/> <Component id="jScrollBar1" pref="639" max="32767" attributes="0"/>
<Component id="chart12" alignment="0" max="32767" attributes="0"/> <Group type="102" alignment="0" attributes="0">
<Component id="chart11" alignment="0" max="32767" attributes="0"/> <Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="chart11" max="32767" attributes="0"/>
<Component id="chart12" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="chartPanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
@ -41,8 +48,11 @@
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0"> <Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="chart11" max="32767" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace type="unrelated" max="-2" attributes="0"/> <Component id="chart11" max="32767" attributes="0"/>
<Component id="chartPanel1" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="chart12" min="-2" max="-2" attributes="0"/> <Component id="chart12" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jScrollBar1" min="-2" max="-2" attributes="0"/> <Component id="jScrollBar1" min="-2" max="-2" attributes="0"/>
@ -69,7 +79,7 @@
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="52" max="32767" attributes="0"/> <EmptySpace min="0" pref="58" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
@ -86,12 +96,36 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/> <EmptySpace min="0" pref="546" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="252" max="32767" attributes="0"/> <EmptySpace min="0" pref="231" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Container>
<Container class="chart.ChartPanel" name="chartPanel1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder>
<Color PropertyName="color" blue="99" green="99" red="ff" type="rgb"/>
</LineBorder>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="83" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>

View File

@ -59,6 +59,10 @@ public class ChartTestDialog extends javax.swing.JDialog implements QuoteReceive
p = new LineChartPainter(); p = new LineChartPainter();
this.chart11.addChartPainter(p); this.chart11.addChartPainter(p);
p = new ChartCrossPainter();
this.chart11.addChartPainter(p);
} }
@ -74,9 +78,9 @@ public class ChartTestDialog extends javax.swing.JDialog implements QuoteReceive
jScrollBar1 = new javax.swing.JScrollBar(); jScrollBar1 = new javax.swing.JScrollBar();
chart12 = new chart.ChartPanel(); chart12 = new chart.ChartPanel();
chart11 = new chart.ChartPanel(); chart11 = new chart.ChartPanel();
chartPanel1 = new chart.ChartPanel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setMaximumSize(new java.awt.Dimension(800, 600));
setMinimumSize(new java.awt.Dimension(100, 100)); setMinimumSize(new java.awt.Dimension(100, 100));
jScrollBar1.setMaximum(0); jScrollBar1.setMaximum(0);
@ -91,7 +95,7 @@ public class ChartTestDialog extends javax.swing.JDialog implements QuoteReceive
); );
chart12Layout.setVerticalGroup( chart12Layout.setVerticalGroup(
chart12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) chart12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 52, Short.MAX_VALUE) .addGap(0, 58, Short.MAX_VALUE)
); );
chart11.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true)); chart11.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
@ -100,11 +104,24 @@ public class ChartTestDialog extends javax.swing.JDialog implements QuoteReceive
chart11.setLayout(chart11Layout); chart11.setLayout(chart11Layout);
chart11Layout.setHorizontalGroup( chart11Layout.setHorizontalGroup(
chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE) .addGap(0, 546, Short.MAX_VALUE)
); );
chart11Layout.setVerticalGroup( chart11Layout.setVerticalGroup(
chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 252, Short.MAX_VALUE) .addGap(0, 231, Short.MAX_VALUE)
);
chartPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 153, 153)));
javax.swing.GroupLayout chartPanel1Layout = new javax.swing.GroupLayout(chartPanel1);
chartPanel1.setLayout(chartPanel1Layout);
chartPanel1Layout.setHorizontalGroup(
chartPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 83, Short.MAX_VALUE)
);
chartPanel1Layout.setVerticalGroup(
chartPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
); );
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
@ -114,17 +131,24 @@ public class ChartTestDialog extends javax.swing.JDialog implements QuoteReceive
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 586, Short.MAX_VALUE) .addComponent(jScrollBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 639, Short.MAX_VALUE)
.addComponent(chart12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup()
.addComponent(chart11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(chart11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(chart12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chartPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap()) .addContainerGap())
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addComponent(chart11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chart11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(chartPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chart12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(chart12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
@ -179,6 +203,7 @@ public class ChartTestDialog extends javax.swing.JDialog implements QuoteReceive
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private chart.ChartPanel chart11; private chart.ChartPanel chart11;
private chart.ChartPanel chart12; private chart.ChartPanel chart12;
private chart.ChartPanel chartPanel1;
private javax.swing.JScrollBar jScrollBar1; private javax.swing.JScrollBar jScrollBar1;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.2" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.PanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
</Form>

View File

@ -61,7 +61,7 @@ public abstract class OHLCChartPainter extends ChartPainter {
@Override @Override
public void drawChart(Graphics2D g, JScrollBar sb, OHLCData data, JPanel p, ChartDef def) { public void drawChart(Graphics2D g, JScrollBar sb, OHLCData data, ChartPanel p, ChartDef def) {
init(g); init(g);
iwidth = (float) ((def.x_unit_width * em_width) * 0.9f); iwidth = (float) ((def.x_unit_width * em_width) * 0.9f);

View File

@ -45,7 +45,7 @@ public class XLegendChartPainter extends ChartPainter {
} }
public void drawChart(Graphics2D g, JScrollBar sb, OHLCData data, JPanel p, ChartDef def) public void drawChart(Graphics2D g, JScrollBar sb, OHLCData data, ChartPanel p, ChartDef def)
{ {
init(g); init(g);
g.setColor(Color.black); g.setColor(Color.black);

View File

@ -488,13 +488,6 @@
</Constraint> </Constraint>
</Constraints> </Constraints>
</Component> </Component>
<Component class="chart.ChartPanal" name="chartPanal1">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
<JSplitPaneConstraints position="right"/>
</Constraint>
</Constraints>
</Component>
</SubComponents> </SubComponents>
</Container> </Container>
</SubComponents> </SubComponents>

View File

@ -187,7 +187,6 @@ public class SeSimApplication extends javax.swing.JFrame {
quoteVertical1 = new gui.orderbook.QuoteVertical(); quoteVertical1 = new gui.orderbook.QuoteVertical();
jSplitPane5 = new javax.swing.JSplitPane(); jSplitPane5 = new javax.swing.JSplitPane();
statistics1 = new gui.Statistics(); statistics1 = new gui.Statistics();
chartPanal1 = new chart.ChartPanal();
menuBar = new javax.swing.JMenuBar(); menuBar = new javax.swing.JMenuBar();
fileMenu = new javax.swing.JMenu(); fileMenu = new javax.swing.JMenu();
openMenuItem = new javax.swing.JMenuItem(); openMenuItem = new javax.swing.JMenuItem();
@ -340,7 +339,6 @@ public class SeSimApplication extends javax.swing.JFrame {
jSplitPane5.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jSplitPane5.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane5.setTopComponent(statistics1); jSplitPane5.setTopComponent(statistics1);
jSplitPane5.setRightComponent(chartPanal1);
jSplitPane3.setLeftComponent(jSplitPane5); jSplitPane3.setLeftComponent(jSplitPane5);
@ -924,7 +922,6 @@ public class SeSimApplication extends javax.swing.JFrame {
private javax.swing.JMenuItem aboutMenuItem; private javax.swing.JMenuItem aboutMenuItem;
private javax.swing.JSpinner accelSpinner; private javax.swing.JSpinner accelSpinner;
private gui.MainChart chart; private gui.MainChart chart;
private chart.ChartPanal chartPanal1;
private javax.swing.JScrollPane chartSrollPane; private javax.swing.JScrollPane chartSrollPane;
private javax.swing.JMenuItem clearMenuItem; private javax.swing.JMenuItem clearMenuItem;
private gui.Clock clock; private gui.Clock clock;