Removed out-commented code
This commit is contained in:
parent
7f6f511710
commit
dc8ca70a62
@ -540,106 +540,7 @@ public class Chart extends javax.swing.JPanel implements QuoteReceiver, Scrollab
|
|||||||
|
|
||||||
Rectangle c_rect0;
|
Rectangle c_rect0;
|
||||||
|
|
||||||
/*private void draw2(Graphics2D g) {
|
|
||||||
|
|
||||||
if (data == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (data.size() == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
num_bars = data.size();
|
|
||||||
|
|
||||||
c_mm = data.getMinMax(first_bar, last_bar);
|
|
||||||
if (c_mm == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
em_height = g.getFontMetrics().getHeight();
|
|
||||||
em_width = g.getFontMetrics().stringWidth("M");
|
|
||||||
|
|
||||||
XLegendDef xld = new XLegendDef();
|
|
||||||
this.drawXLegend(g, xld);
|
|
||||||
|
|
||||||
int pwidth = (int) (em_width * x_unit_width * (num_bars + 1)) + clip_bounds.width;
|
|
||||||
// int phight = 400;
|
|
||||||
// phight=this.getVisibleRect().height;
|
|
||||||
|
|
||||||
this.setPreferredSize(new Dimension(pwidth, gdim.height));
|
|
||||||
this.revalidate();
|
|
||||||
|
|
||||||
int bww = (int) (data.size() * (this.x_unit_width * this.em_width));
|
|
||||||
int p0 = pwidth - clip_bounds.width - (clip_bounds.width - (int) (13 * em_width));
|
|
||||||
if (p0 < 0) {
|
|
||||||
p0 = 0;
|
|
||||||
}
|
|
||||||
JViewport vp = (JViewport) this.getParent();
|
|
||||||
Point pp = vp.getViewPosition();
|
|
||||||
Point cp = vp.getViewPosition();
|
|
||||||
|
|
||||||
if (autoScroll && this.lastvpos != cp.x) {
|
|
||||||
autoScroll = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!autoScroll && cp.x >= p0) {
|
|
||||||
autoScroll = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (autoScroll) {
|
|
||||||
vp.setViewPosition(new Point(p0, 0));
|
|
||||||
lastvpos = p0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int cheight = gdim.height - 6 * em_width;
|
|
||||||
|
|
||||||
int h = (int) (cheight * 0.8);
|
|
||||||
Rectangle r = new Rectangle(0, 0, pwidth, h);
|
|
||||||
c_rect0 = r;
|
|
||||||
|
|
||||||
RenderCtx ctx = new RenderCtx();
|
|
||||||
// c_rect.x = 0;
|
|
||||||
// c_rect.y = 50;
|
|
||||||
// c_rect.height = ;
|
|
||||||
ctx.rect = c_rect0;
|
|
||||||
ctx.scaling = (float) r.height / (c_mm.getMax() - c_mm.getMin());
|
|
||||||
ctx.min = c_mm.getMin();
|
|
||||||
ctx.g = g;
|
|
||||||
ctx.iwidth = (float) ((x_unit_width * em_width) * 0.9f);
|
|
||||||
|
|
||||||
this.ct = ChartType.CANDLESTICK;
|
|
||||||
// logs = true;
|
|
||||||
c_mm.setLog(true);
|
|
||||||
drawChart(ctx);
|
|
||||||
|
|
||||||
c_mm = data.getVolMinMax(first_bar, last_bar);
|
|
||||||
|
|
||||||
// c_mm.min = 0f;
|
|
||||||
c_mm.setMin(0);
|
|
||||||
|
|
||||||
int h1 = h + em_width;
|
|
||||||
h = (int) (cheight * 0.2);
|
|
||||||
|
|
||||||
r = new Rectangle(0, h1, pwidth, h);
|
|
||||||
c_rect0 = r;
|
|
||||||
|
|
||||||
// c_rect.x = 0;
|
|
||||||
// c_rect.y = 250;
|
|
||||||
// c_rect.height = 50;
|
|
||||||
ctx.rect = c_rect0;
|
|
||||||
ctx.scaling = (float) r.height / (c_mm.getMax() - c_mm.getMin());
|
|
||||||
ctx.min = c_mm.getMin();
|
|
||||||
ctx.g = g;
|
|
||||||
ctx.iwidth = (float) ((x_unit_width * em_width) * 0.9f);
|
|
||||||
|
|
||||||
// logs = false;
|
|
||||||
c_mm.setLog(false);
|
|
||||||
this.ct = ChartType.VOL;
|
|
||||||
drawChart(ctx);
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
private float c_font_height;
|
private float c_font_height;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user