Improved x legend in chart window
This commit is contained in:
parent
bcb8bb9e38
commit
3e85480d56
@ -1 +0,0 @@
|
||||
config=sesimws
|
@ -3,11 +3,16 @@
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/src/traders/RandomTraderA.java</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/StatisticsPanel.java</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/build.xml</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/FullChart.java</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/nbproject/jnlp-impl.xml</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderLoader.java</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/src/traders/ManTrader/ManTrader.java</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/NewMDIApplication.java</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/EditStrategies.java</file>
|
||||
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/Chart.java</file>
|
||||
</group>
|
||||
</open-files>
|
||||
</project-private>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#Thu, 23 Mar 2017 20:54:23 +0100
|
||||
#Fri, 24 Mar 2017 19:24:17 +0100
|
||||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.processors.list=
|
||||
@ -60,9 +60,9 @@ jnlp.applet.height=300
|
||||
jnlp.applet.width=300
|
||||
jnlp.codebase.type=user
|
||||
jnlp.codebase.url=$$$$codebase
|
||||
jnlp.codebase.user=https\://blog.cauwersin.com/sesim https\://blog.cauwersin.com/sesim/lib
|
||||
jnlp.codebase.user=
|
||||
jnlp.descriptor=application
|
||||
jnlp.enabled=true
|
||||
jnlp.enabled=false
|
||||
jnlp.icon=
|
||||
jnlp.mixed.code=default
|
||||
jnlp.offline-allowed=true
|
||||
|
@ -194,23 +194,37 @@ public class Chart extends javax.swing.JPanel implements QuoteReceiver, Scrollab
|
||||
|
||||
System.out.printf("ClipBounds w: %d\n",clip_bounds.width);
|
||||
|
||||
long big_tick = 1;
|
||||
|
||||
double btl,xxx;
|
||||
do {
|
||||
big_tick++;
|
||||
btl=em_size*big_tick*x_unit_width;
|
||||
xxx = 7*em_size;
|
||||
System.out.printf("NT: %f %f\n", btl,xxx);
|
||||
}while (btl<xxx);
|
||||
|
||||
// long nt = (long) (clip_bounds.width/btl);
|
||||
|
||||
|
||||
|
||||
|
||||
for (n = 0, x = 0; x < dim.width; x += em_size * x_unit_width) {
|
||||
|
||||
if (n % xld.big_tick == 0) {
|
||||
if (n % big_tick == 0) {
|
||||
g.drawLine((int) x, y, (int) x, y + em_size);
|
||||
} else {
|
||||
g.drawLine((int) x, y, (int) x, y + em_size / 2);
|
||||
}
|
||||
|
||||
if (n % xld.big_tick == 0) {
|
||||
String text;
|
||||
text = xld.getAt(n);
|
||||
|
||||
int swidth = g.getFontMetrics().stringWidth(text);
|
||||
|
||||
g.drawString(text, (int) x - swidth / 2, y + em_height * 2);
|
||||
} else {
|
||||
g.drawLine((int) x, y, (int) x, y + em_size / 2);
|
||||
}
|
||||
|
||||
if (n % big_tick == 0) {
|
||||
|
||||
}
|
||||
|
||||
n+=1;
|
||||
|
Loading…
Reference in New Issue
Block a user