while (it.hasNext()) {
type = (Integer) it.next();
// I'm creating a NEW chart that is the same type as the one in the chartTabs
// In the case when I have pages (e.g. 3 pages) and charts (e.g. 2 charts)
// I will create 3*2 charts.
Chart pageChart = new Chart(er, cs, type.intValue());
chartTabbedPane.addTab(null, pageChart.getIcon(), pageChart);
}
jtp.addTab(er.getAxis("Axis2").getTupleAt(cc).getShortCaption()
, null
, chartTabbedPane
, er.getAxis("Axis2").getTupleAt(cc).getToolTip()
);
}else{
JPanel holder = new JPanel(){
{
setOpaque(false);
} // instance initializer
public void paintComponent(Graphics g) {
S.paintBackground(g, this);
super.paintComponent(g);
}
};
holder.setLayout(new BoxLayout(holder, BoxLayout.Y_AXIS));
holder.add(c);
jtp.addTab(er.getAxis("Axis2").getTupleAt(cc).
getShortCaption()
, null
, holder
, er.getAxis("Axis2").getTupleAt(cc).getToolTip()
);
}
}
jtp.addMouseListener(new PageLabelPopUpListener(jtp));
rightPane.add(jtp);
}else{
// ***************** NO PAGES *************************/
chapterCount = 1;
// chapters.clear();
clearChapters(); //Jules Grengbondai
if (cubeExplorer != null) {
cubeExplorer.removeAll();
cubeExplorer.removeLanguageListener();
}
CubeSlicer cs = new CubeSlicer( (short) 1, (short) 0);
cubeExplorer = new CubeExplorer2(er, cs, toolbar.isShowColumnTotalsOn(), toolbar.isShowRowTotalsOn());
cubeExplorer.setMaximumSize(new Dimension(Short.MAX_VALUE, cubeExplorer.getPrefferedHeight()));
Page c = new Page(dimTree.getTree(), q, cubeExplorer);
c.setMaximumSize(new Dimension(Short.MAX_VALUE, Page.getAdditionalHeight() + cubeExplorer.getPrefferedHeight()));
c.setCurrent(true);
chapters.add(c);
if (chartTabs != null && chartTabs.size()>0){
JTabbedPane chartTabbedPane = new JTabbedPane(JTabbedPane.RIGHT);
chartTabbedPane.addTab(null, tableIcon, c);
Iterator it = chartTabs.iterator();
Integer type;
Chart chart;
while (it.hasNext()) {
type = (Integer) it.next();
chart = new Chart(er, cs, type.intValue());
chartTabbedPane.addTab(null, chart.getIcon(), chart);
}
rightPane.add(chartTabbedPane);
}
else {
rightPane.add(c);