some scheduler testing testing
This commit is contained in:
@ -44,26 +44,21 @@ public class Statistics extends javax.swing.JPanel {
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.printf("Statistics comming\n");
|
||||
Exchange.Statistics s = Globals.se.getStatistics();
|
||||
|
||||
|
||||
tradesLabel.setText(String.format("%d", s.trades));
|
||||
|
||||
|
||||
if (s.heigh == null){
|
||||
|
||||
if (s.heigh == null) {
|
||||
labelHigh.setText("--");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
labelHigh.setText(Globals.se.getMoneyFormatter().format(s.heigh));
|
||||
}
|
||||
|
||||
if (s.low == null){
|
||||
if (s.low == null) {
|
||||
labelLow.setText("--");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
labelLow.setText(Globals.se.getMoneyFormatter().format(s.low));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, 1000, 1000);
|
||||
|
@ -31,6 +31,8 @@ import gui.tools.NummericCellRenderer;
|
||||
import java.awt.Component;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.SwingUtilities;
|
||||
@ -126,6 +128,15 @@ public class OrderBook extends javax.swing.JPanel implements Exchange.BookReceiv
|
||||
cfgChanged();
|
||||
// Globals.se.addBookReceiver(Exchange.OrderType.BUYLIMIT, this);
|
||||
Globals.addCfgListener(this);
|
||||
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
// System.out.printf("Update order book\n");
|
||||
// UpdateOrderBook();
|
||||
}
|
||||
}, 1000, 1000);
|
||||
|
||||
}
|
||||
|
||||
boolean oupdate = false;
|
||||
|
Reference in New Issue
Block a user