public class ChartSelectionTabContributor {\r
\r
public static boolean contibuteTabs(ReadGraph backend, Resource r, List<ComparableTabContributor> tabs) throws DatabaseException{\r
- return contibuteTabs(backend, r, tabs, ChartPropertyOptions.SHOW_TIME);\r
+ return contibuteTabs(backend, r, tabs, ChartPropertyOptions.SHOW_TIME|ChartPropertyOptions.SHOW_AXIS|ChartPropertyOptions.SHOW_VARIABLES|ChartPropertyOptions.SHOW_CHART);\r
}\r
public static boolean contibuteTabs(ReadGraph backend, Resource r, List<ComparableTabContributor> tabs, int options) throws DatabaseException {\r
JFreeChartResource jfree = JFreeChartResource.getInstance(backend);\r
10,\r
r,\r
"General"));\r
- tabs.add(new ComparableTabContributor(\r
- new XYLineAxisAndVariablesTab(r),\r
- 9,\r
- r,\r
- "Axis and Variables"));\r
+ if ((options&ChartPropertyOptions.SHOW_AXIS )>0 ||(options&ChartPropertyOptions.SHOW_VARIABLES)>0 )\r
+ tabs.add(new ComparableTabContributor(\r
+ new XYLineAxisAndVariablesTab(r),\r
+ 9,\r
+ r,\r
+ "Axis and Variables"));\r
} else if(backend.isInstanceOf(plot, jfree.CategoryPlot)) {\r
tabs.add(new ComparableTabContributor(\r
new BarGeneralPropertiesTab(r, options),\r
10,\r
r,\r
"General"));\r
- tabs.add(new ComparableTabContributor(\r
- new BarSeriesTab(r, options),\r
- 9,\r
- r,\r
- "Variables"));\r
- tabs.add(new ComparableTabContributor(\r
- new BarAxisTab(r),\r
- 8,\r
- r,\r
- "Axis")); \r
+ if ((options&ChartPropertyOptions.SHOW_VARIABLES )>0)\r
+ tabs.add(new ComparableTabContributor(\r
+ new BarSeriesTab(r, options),\r
+ 9,\r
+ r,\r
+ "Variables"));\r
+ if ((options&ChartPropertyOptions.SHOW_AXIS )>0)\r
+ tabs.add(new ComparableTabContributor(\r
+ new BarAxisTab(r),\r
+ 8,\r
+ r,\r
+ "Axis")); \r
} else if(backend.isInstanceOf(plot, jfree.PiePlot)) {\r
tabs.add(new ComparableTabContributor(\r
new PieGeneralPropertiesTab(r, options),\r
10,\r
r,\r
"General"));\r
- tabs.add(new ComparableTabContributor(\r
- new PieSeriesTab(r, options),\r
- 9,\r
- r,\r
- "Variables"));\r
+ if ((options&ChartPropertyOptions.SHOW_VARIABLES )>0)\r
+ tabs.add(new ComparableTabContributor(\r
+ new PieSeriesTab(r, options),\r
+ 9,\r
+ r,\r
+ "Variables"));\r
}\r
-\r
- tabs.add(new ComparableTabContributor(\r
- new ChartTab(r),\r
- 1,\r
- r,\r
- "Chart"));\r
+ if ((options&ChartPropertyOptions.SHOW_CHART )>0)\r
+ tabs.add(new ComparableTabContributor(\r
+ new ChartTab(r),\r
+ 1,\r
+ r,\r
+ "Chart"));\r
\r
return true;\r
} \r
}\r
\r
public static boolean contibuteTabs2(ReadGraph backend, Resource r, List<ComparableTabContributor> tabs) throws DatabaseException{\r
- return contibuteTabs2(backend, r, tabs, ChartPropertyOptions.SHOW_TIME);\r
+ return contibuteTabs2(backend, r, tabs, ChartPropertyOptions.SHOW_TIME|ChartPropertyOptions.SHOW_AXIS|ChartPropertyOptions.SHOW_VARIABLES|ChartPropertyOptions.SHOW_CHART);\r
}\r
\r
public static boolean contibuteTabs2(ReadGraph backend, Resource r, List<ComparableTabContributor> tabs, int options) throws DatabaseException {\r
10,\r
r,\r
"General"));\r
- tabs.add(new ComparableTabContributor(\r
- new XYLineAxisAndVariablesTab(r),\r
- 9,\r
- r,\r
- "Axis and Variables"));\r
- } else if(backend.isInstanceOf(plot, jfree.CategoryPlot)) {\r
- tabs.add(new ComparableTabContributor(\r
+ if ((options&ChartPropertyOptions.SHOW_AXIS )>0 ||(options&ChartPropertyOptions.SHOW_VARIABLES)>0 )\r
+ tabs.add(new ComparableTabContributor(\r
+ new XYLineAxisAndVariablesTab(r),\r
+ 9,\r
+ r,\r
+ "Axis and Variables"));\r
+ } else if (backend.isInstanceOf(plot, jfree.CategoryPlot)) {\r
+ tabs.add(new ComparableTabContributor(\r
new BarGeneralPropertiesTab(r, options),\r
10,\r
r,\r
"General"));\r
- tabs.add(new ComparableTabContributor(\r
- new BarSeriesTab2(r, options),\r
- 9,\r
- r,\r
- "Variables"));\r
- tabs.add(new ComparableTabContributor(\r
- new BarAxisTab(r),\r
- 8,\r
- r,\r
- "Axis")); \r
+ if ((options&ChartPropertyOptions.SHOW_VARIABLES)>0)\r
+ tabs.add(new ComparableTabContributor(\r
+ new BarSeriesTab2(r, options),\r
+ 9,\r
+ r,\r
+ "Variables"));\r
+ if ((options&ChartPropertyOptions.SHOW_AXIS )>0)\r
+ tabs.add(new ComparableTabContributor(\r
+ new BarAxisTab(r),\r
+ 8,\r
+ r,\r
+ "Axis")); \r
} else if(backend.isInstanceOf(plot, jfree.PiePlot)) {\r
tabs.add(new ComparableTabContributor(\r
new PieGeneralPropertiesTab(r, options),\r
10,\r
r,\r
"General"));\r
- tabs.add(new ComparableTabContributor(\r
- new PieSeriesTab2(r, options),\r
- 9,\r
- r,\r
- "Variables"));\r
+ if ((options&ChartPropertyOptions.SHOW_VARIABLES)>0)\r
+ tabs.add(new ComparableTabContributor(\r
+ new PieSeriesTab2(r, options),\r
+ 9,\r
+ r,\r
+ "Variables"));\r
}\r
-\r
- tabs.add(new ComparableTabContributor(\r
- new ChartTab(r),\r
- 1,\r
- r,\r
- "Chart"));\r
+ if ((options&ChartPropertyOptions.SHOW_CHART )>0)\r
+ tabs.add(new ComparableTabContributor(\r
+ new ChartTab(r),\r
+ 1,\r
+ r,\r
+ "Chart"));\r
\r
return true;\r
} \r