01: package com.calipso.reportgenerator.userinterface.dinamicchart;
02:
03: import javax.swing.*;
04: import java.awt.*;
05:
06: /**
07: * Frame para mostrar os chart cube solos
08: */
09: public class ChartPivotFrame extends JFrame {
10: private ChartPivotTable chartPivotTable;
11:
12: private JPanel mainPanel;
13:
14: public void show(ChartPivotTable chartPivotTable) {
15: this .chartPivotTable = chartPivotTable;
16: getMainPanel().add(chartPivotTable);
17: init();
18: pack();
19: super .setVisible(true);
20: }
21:
22: private void init() {
23: java.awt.Dimension screenSize = java.awt.Toolkit
24: .getDefaultToolkit().getScreenSize();
25: this .setSize(screenSize);
26: }
27:
28: public JPanel getMainPanel() {
29: if (mainPanel == null) {
30: mainPanel = new JPanel();
31: mainPanel.setLayout(new GridLayout(1, 1));
32: getContentPane().add(mainPanel);
33: }
34: return mainPanel;
35: }
36: }
|