setupLayout not called in draw context anymore
This commit is contained in:
parent
05d3fe3861
commit
84b7cb3c5d
@ -56,6 +56,7 @@ public class MMChart extends javax.swing.JPanel {
|
||||
public MMChart() {
|
||||
stock = Globals.se.getDefaultStock();
|
||||
initComponents();
|
||||
this.em_width=10;
|
||||
setupLayout();
|
||||
|
||||
}
|
||||
@ -115,6 +116,7 @@ public class MMChart extends javax.swing.JPanel {
|
||||
|
||||
private void setupMainChart() {
|
||||
mainChart = new ChartPanel();
|
||||
mainChart.setDoubleBuffered(true);
|
||||
mainChart.setBackground(Color.green);
|
||||
|
||||
GridBagConstraints gbConstraints;
|
||||
@ -129,6 +131,8 @@ public class MMChart extends javax.swing.JPanel {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ChartDef chartDef;
|
||||
@ -142,12 +146,14 @@ public class MMChart extends javax.swing.JPanel {
|
||||
GridBagLayout layout = new GridBagLayout();
|
||||
setLayout(layout);
|
||||
|
||||
chartDef = new ChartDef();
|
||||
chartDef.x_unit_width = 3.0;
|
||||
|
||||
|
||||
setupYLegend();
|
||||
setupXLegend();
|
||||
setupMainChart();
|
||||
|
||||
chartDef = new ChartDef();
|
||||
chartDef.x_unit_width = 3.0;
|
||||
|
||||
java.awt.GridBagConstraints gbConstraints;
|
||||
|
||||
@ -164,7 +170,10 @@ public class MMChart extends javax.swing.JPanel {
|
||||
// this.removeAll();
|
||||
|
||||
// repaint();
|
||||
setupLayout();
|
||||
// setupLayout();
|
||||
xLegend.setPreferredSize(new Dimension(em_width * 2, em_width * 3));
|
||||
xLegend.setMinimumSize(new Dimension(em_width * 2, em_width * 3));
|
||||
|
||||
revalidate();
|
||||
super.paint(g); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user