home *** CD-ROM | disk | FTP | other *** search
Wrap
import java.awt.BorderLayout; import java.awt.Button; import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Event; import java.awt.GridLayout; import java.awt.Label; import java.awt.Panel; import java.awt.TextField; import java.util.Vector; public class JDPSelectChartDef extends JDPClassLayout { JDPSelectDSN targetDSN; JDPSelectColumns target; JDPChartLayout targetChart; JDPPopupMessage popuppanel; JDPLayoutMgr targetLayoutMgr; JDPList groupBy; JDPList multipleSeries; TextField multipleSeriesSQL; TextField groupBySQL; TextField chartTitle; JDPComboBox chartTitleColor; JDPComboBox chartType; TextField xaxisTitle; JDPComboBox xaxisTitleColor; JDPComboBox xaxisLabelColor; JDPComboBox yaxisLabelColor; JDPComboBox chartFrameColor; TextField maxRows; TextField pfromwhereclause; JDPComboBox autoscale; JDPComboBox autozoom; TextField minPlotValue; TextField maxPlotValue; JDPComboBox gridLineSettingH; JDPComboBox gridLineSettingV; JDPComboBox gridLineSettingB; JDPComboBox gridLineSettingF; JDPComboBox gridColor; JDPComboBox dategroupby; String[] dateGroupBy; JDPList columns; JDPComboBox fieldactive; JDPComboBox aggregatefunction; TextField elementlegend; TextField fieldsql; JDPComboBox elementcolor; JDPComboBox elementbordercolor; Label listCount; boolean[] fieldActive; String[] aggregateFunction; String[] elementLegend; String[] fieldSql; Color[] elementColor; Color[] elementBorderColor; int[] indexes; Vector gParmObject; int currentSelection = -1; int currentColumnSelection = -1; JDPTabSelectPanel tabPanel; void updateArrays() { if (this.currentSelection >= 0) { this.dateGroupBy[this.currentSelection] = this.dategroupby.getSelectedItem(); } } void clearList() { this.groupBy.clear(); this.multipleSeries.clear(); this.columns.clear(); } void loadList() { this.clearList(); if (this.target != null && this.target.columnName != null && this.target.columns.getSelectedIndexes().length != 0) { if (this.chartTitle.getText().equals("")) { String var1 = this.target.table.getText().toUpperCase(); int var2 = var1.indexOf("."); if (var2 >= 0) { var1 = var1.substring(var2 + 1); } var1 = var1 + " CHART"; this.chartTitle.setText(var1); } String[] var6 = this.target.columns.getSelectedItems(); this.indexes = this.target.columns.getSelectedIndexes(); int var7 = var6.length; this.dateGroupBy = new String[var7]; this.fieldActive = new boolean[var7]; this.aggregateFunction = new String[var7]; this.elementLegend = new String[var7]; this.fieldSql = new String[var7]; this.elementColor = new Color[var7]; this.elementBorderColor = new Color[var7]; int var3 = 0; for(int var4 = 0; var4 < var6.length; ++var4) { this.groupBy.addItem(var6[var4]); this.multipleSeries.addItem(var6[var4]); this.dateGroupBy[var4] = ""; if (JDPUtils.isOdbcDate(this.target.columnDatatype[this.indexes[var4]])) { this.dateGroupBy[var4] = "Month"; } if (JDPUtils.isOdbcNum(this.target.columnDatatype[this.indexes[var4]]) && !this.chartType.getSelectedItem().equals("Gantt")) { this.fieldActive[var3] = true; this.aggregateFunction[var3] = ""; this.aggregatefunction.enable(); this.elementLegend[var3] = super.user.u.makeLabel(var6[var4]); this.fieldSql[var3] = var6[var4]; this.elementColor[var3] = super.user.u._cvtcolor(this.elementcolor.getItem(var4 % 12)); this.elementBorderColor[var3] = Color.black; this.elementcolor.enable(); this.elementbordercolor.enable(); this.columns.addItem(var6[var4]); this.columns.select(var4); ++var3; } if (JDPUtils.isOdbcDate(this.target.columnDatatype[this.indexes[var4]]) && this.chartType.getSelectedItem().equals("Gantt")) { if (this.columns.countItems() < 2) { this.fieldActive[var3] = true; } else { this.fieldActive[var3] = false; } this.aggregateFunction[var3] = ""; this.aggregatefunction.disable(); this.elementLegend[var3] = super.user.u.makeLabel(var6[var4]); this.fieldSql[var3] = var6[var4]; this.elementColor[var3] = super.user.u._cvtcolor(this.elementcolor.getItem(var4 % 12)); this.elementBorderColor[var3] = Color.black; this.elementcolor.disable(); this.elementbordercolor.disable(); this.columns.addItem(var6[var4]); if (this.fieldActive[var3]) { this.columns.select(var4); } else { this.columns.deselect(var4); } ++var3; } } } else { if (super.componentName.equals("") && ((Component)this).isShowing()) { super.user.mainmsg.setStatusMsg("You must first select a Table.", 10); } } } boolean restoreSelections() { JDPSaveProps var1 = super.user.saveProperties; if (super.user.prevProperties != null) { var1 = super.user.prevProperties; } String var2 = "JDPSelectChartDef" + super.componentName; var1.restoreObject(this.groupBy, var2, "groupBy"); var1.restoreObject(this.groupBySQL, var2, "groupBySQL"); var1.restoreObject(this.multipleSeries, var2, "multipleSeries"); var1.restoreObject(this.multipleSeriesSQL, var2, "multipleSeriesSQL"); var1.restoreObject(this.chartTitle, var2, "chartTitle"); var1.restoreObject(this.chartTitleColor, var2, "chartTitleColor"); var1.restoreObject(this.chartType, var2, "chartType"); var1.restoreObject(this.xaxisTitle, var2, "xaxisTitle"); var1.restoreObject(this.xaxisTitleColor, var2, "xaxisTitleColor"); var1.restoreObject(this.xaxisLabelColor, var2, "xaxisLabelColor"); var1.restoreObject(this.yaxisLabelColor, var2, "yaxisLabelColor"); var1.restoreObject(this.chartFrameColor, var2, "chartFrameColor"); var1.restoreObject(this.maxRows, var2, "maxRows"); var1.restoreObject(this.pfromwhereclause, var2, "pfromwhereclause"); var1.restoreObject(this.autoscale, var2, "autoscale"); var1.restoreObject(this.autozoom, var2, "autozoom"); var1.restoreObject(this.minPlotValue, var2, "minPlotValue"); var1.restoreObject(this.maxPlotValue, var2, "maxPlotValue"); var1.restoreObject(this.gridLineSettingH, var2, "gridLineSettingH"); var1.restoreObject(this.gridLineSettingV, var2, "gridLineSettingV"); var1.restoreObject(this.gridLineSettingB, var2, "gridLineSettingB"); var1.restoreObject(this.gridLineSettingF, var2, "gridLineSettingF"); var1.restoreObject(this.gridColor, var2, "gridColor"); var1.restoreObject(this.dategroupby, var2, "dategroupby"); String[] var3 = (String[])var1.restoreObject(this.dateGroupBy, var2, "dateGroupBy"); boolean[] var4 = (boolean[])var1.restoreObject(this.fieldActive, var2, "fieldActive"); String[] var5 = (String[])var1.restoreObject(this.aggregateFunction, var2, "aggregateFunction"); String[] var6 = (String[])var1.restoreObject(this.elementLegend, var2, "elementLegend"); String[] var7 = (String[])var1.restoreObject(this.fieldSql, var2, "fieldSql"); Color[] var8 = (Color[])var1.restoreObject(this.elementColor, var2, "elementColor"); Color[] var9 = (Color[])var1.restoreObject(this.elementBorderColor, var2, "elementBorderColor"); if (var3 != null) { if (this.dateGroupBy.length < var3.length) { this.dateGroupBy = new String[var3.length]; } if (this.fieldActive.length < var4.length) { this.fieldActive = new boolean[var4.length]; } if (this.aggregateFunction.length < var5.length) { this.aggregateFunction = new String[var5.length]; } if (this.elementLegend.length < var6.length) { this.elementLegend = new String[var6.length]; } if (this.fieldSql.length < var7.length) { this.fieldSql = new String[var7.length]; } if (this.elementColor.length < var8.length) { this.elementColor = new Color[var8.length]; } if (this.elementBorderColor.length < var9.length) { this.elementBorderColor = new Color[var9.length]; } for(int var10 = 0; var10 < var3.length; ++var10) { this.dateGroupBy[var10] = var3[var10]; this.fieldActive[var10] = var4[var10]; this.aggregateFunction[var10] = var5[var10]; this.elementLegend[var10] = var6[var10]; this.fieldSql[var10] = var7[var10]; this.elementColor[var10] = var8[var10]; this.elementBorderColor[var10] = var9[var10]; if (this.fieldActive[var10]) { this.columns.select(var10); } else { this.columns.deselect(var10); } } } if (this.autoscale.getSelectedItem().equals("Yes")) { this.minPlotValue.setEditable(false); this.maxPlotValue.setEditable(false); } else { this.minPlotValue.setEditable(true); this.maxPlotValue.setEditable(true); } if (this.autozoom.getSelectedItem().equals("Yes")) { this.minPlotValue.setEditable(false); this.minPlotValue.setText("0"); } if (this.chartType.getSelectedItem().equals("Pie")) { this.xaxisLabelColor.disable(); this.yaxisLabelColor.disable(); this.chartFrameColor.disable(); this.autoscale.disable(); this.autozoom.disable(); this.minPlotValue.disable(); this.maxPlotValue.disable(); this.gridLineSettingH.disable(); this.gridLineSettingV.disable(); this.gridLineSettingB.disable(); this.gridLineSettingF.disable(); this.gridColor.disable(); this.elementlegend.disable(); this.elementcolor.disable(); this.elementbordercolor.disable(); for(int var11 = 0; var11 < this.multipleSeries.countItems(); ++var11) { this.multipleSeries.deselect(var11); } this.multipleSeries.disable(); this.multipleSeriesSQL.disable(); } else { this.xaxisLabelColor.enable(); this.yaxisLabelColor.enable(); this.chartFrameColor.enable(); this.autoscale.enable(); this.autozoom.enable(); this.minPlotValue.enable(); this.maxPlotValue.enable(); this.gridLineSettingH.enable(); this.gridLineSettingV.enable(); this.gridLineSettingB.enable(); this.gridLineSettingF.enable(); this.gridColor.enable(); this.elementlegend.enable(); this.elementcolor.enable(); this.elementbordercolor.enable(); this.multipleSeries.enable(); this.multipleSeriesSQL.enable(); } if (this.dategroupby.getSelectedIndex() > 0) { this.dategroupby.disable(); } else { this.dategroupby.enable(); } return true; } void clearFields() { this.multipleSeriesSQL.setText(""); this.groupBySQL.setText(""); this.chartTitle.setText(""); this.chartTitleColor.select(0); this.chartType.select(0); this.xaxisTitle.setText(""); this.xaxisTitleColor.select(0); this.xaxisLabelColor.select(0); this.yaxisLabelColor.select(0); this.chartFrameColor.select(0); this.maxRows.setText("1000"); this.pfromwhereclause.setText("(1=1)"); this.autoscale.select(0); this.autozoom.select(0); this.minPlotValue.setText("0"); this.maxPlotValue.setText("100"); this.gridLineSettingH.select(0); this.gridLineSettingV.select(0); this.gridLineSettingB.select(0); this.gridLineSettingF.select(0); this.gridColor.select(0); this.dategroupby.select(0); } void loadLayoutComponent() { boolean var1 = false; boolean var2 = false; if (!super.thisBranch.compType.startsWith("JDPWiz")) { if (this.targetChart != null) { this.targetChart.refresh(); } if (this.targetLayoutMgr != null) { this.targetLayoutMgr.gSource.constructMethod(super.thisBranch, "Main"); this.targetLayoutMgr.setButton("Layout"); this.targetLayoutMgr.reDraw(); return; } } else if (this.targetLayoutMgr != null && (!this.targetLayoutMgr.projectLoading || this.targetLayoutMgr.loadingWizardApp)) { if (super.thisBranch.leaves.size() > 0) { this.targetLayoutMgr.lView.removeSelectedBranch(); } JDPTreeBranch[] var3 = new JDPTreeBranch[1]; JDPJagg var5 = new JDPJagg(super.user.jaggPath); var5.loadSettings(this.targetDSN); var5.setMRW("100"); new JDPLoadChoice(super.user, var5, (Object)null, "", "", "", "", -1); JDPTreeBranch[] var6 = this.targetLayoutMgr.layoutTree.getTreeBranch(super.thisBranch.thisObject); JDPTreeBranch[] var7 = var6; JDPTreeBranch var8 = var6[var6.length - 1]; if (this.columns.countItems() > 0) { Component var9 = this.targetLayoutMgr.gSource.findRelatedComp(super.thisBranch, "JDPSearchLayout"); Component var10 = this.targetLayoutMgr.gSource.findRelatedComp(super.thisBranch, "JDPListLayout"); JDPTreeBranch var11 = null; if (var9 != null && ((JDPSearchLayout)var9).columns.getSelectedIndexes().length > 0) { var1 = true; } if (var10 != null && ((JDPListLayout)var10).columns.getSelectedItems().length > 0) { var2 = true; } boolean var12 = this.targetLayoutMgr.projectLoading; this.targetLayoutMgr.projectLoading = true; if (var1 || var2) { var3[0] = new JDPTreeBranch(); var3[0].name = "Panel"; var3[0].compType = "Panel"; var3[0].icon = 24; this.targetLayoutMgr.checkDragNDrop(var3, var6); var11 = this.targetLayoutMgr.layoutTree.getLastAddedBranch(); var6 = this.targetLayoutMgr.layoutTree.getTreeBranch(var11); var7 = var6; } if (var2) { var3[0] = new JDPTreeBranch(); var3[0].name = "Panel"; var3[0].compType = "Panel"; var3[0].icon = 24; this.targetLayoutMgr.checkDragNDrop(var3, this.targetLayoutMgr.layoutTree.getTreeBranch(super.thisBranch.thisObject)); var11 = this.targetLayoutMgr.layoutTree.getLastAddedBranch(); } JDPTreeBranch var13 = null; JDPTreeBranch var14 = null; if (var1) { this.targetLayoutMgr.setButton("Blank"); this.targetLayoutMgr.layoutTree.addBranch(var11, super.thisBranch.name + "SP1", 7); ((JDPSearchLayout)var9).thisBranch = this.targetLayoutMgr.layoutTree.getLastAddedBranch(); ((JDPSearchLayout)var9).thisBranch.compType = "JDPWhereClause"; ((JDPSearchLayout)var9).thisBranch.compPosition = "North"; ((JDPSearchLayout)var9).thisBranch.thisObject = new Panel(); ((Container)super.thisBranch.thisObject).add(((JDPSearchLayout)var9).thisBranch.compPosition, (Component)((JDPSearchLayout)var9).thisBranch.thisObject); ((JDPSearchLayout)var9).loadLayoutComponent(); this.targetLayoutMgr.setProperties(((JDPSearchLayout)var9).thisBranch); var13 = this.targetLayoutMgr.layoutTree.getLastAddedBranch(); } if (var2) { this.targetLayoutMgr.setButton("Blank"); this.targetLayoutMgr.layoutTree.addBranch(var11, super.thisBranch.name + "RL1", 26); ((JDPListLayout)var10).thisBranch = this.targetLayoutMgr.layoutTree.getLastAddedBranch(); ((JDPListLayout)var10).thisBranch.compType = "JDPSearchResults"; ((JDPListLayout)var10).thisBranch.compPosition = "Center"; ((JDPListLayout)var10).thisBranch.thisObject = new Panel(); ((Container)super.thisBranch.thisObject).add(((JDPListLayout)var10).thisBranch.compPosition, (Component)((JDPListLayout)var10).thisBranch.thisObject); ((JDPListLayout)var10).loadLayoutComponent(); this.targetLayoutMgr.setProperties(((JDPListLayout)var10).thisBranch); var14 = this.targetLayoutMgr.layoutTree.getLastAddedBranch(); } var3[0] = new JDPTreeBranch(); var3[0].name = super.thisBranch.name + "CL1"; var3[0].compType = "JDPChartLayout"; var3[0].icon = 33; JDPChartLayout var4 = new JDPChartLayout(); ((JDPClassLayout)var4).InitClass(super.user, (Panel)var7[var7.length - 1].thisObject, "JDPLayoutMgr:" + super.componentName); this.targetLayoutMgr.checkDragNDrop(var3, var7, var4); this.targetLayoutMgr.gSource.targetGenerator.setHandle((JDPClassLayout)var4); if (var14 != null) { var14.treeVector = new Vector(); JDPTreePicker var16 = new JDPTreePicker(super.user, this.targetLayoutMgr, this.targetLayoutMgr.dragPanel); int[] var17 = new int[]{4, 1, 2, 1}; var16.setIcons(var17); var16.setRoot("Component Events", true); JDPTreeBranch var18 = var16.treeRoot; Object[] var19 = new Object[]{null, "Methods"}; String[] var20 = new String[]{null, "Drop here to attach this component/method to this Event"}; var16.setDropKeys(var19); var16.setDragAndDrop((boolean[])null); var16.setDropMessages(var20); String[] var21 = new String[]{"ACTION_EVENT", null, null, null}; boolean[] var22 = new boolean[]{true, true, true, false}; var16.setIcons(var17); var16.setExpanded(var22); var16.addEntry(var21, var17, var21[0]); var14.treeVector.addElement(var18); var17[2] = super.thisBranch.icon; var21[1] = super.thisBranch.name; var21[2] = super.thisBranch.name + "LoadData"; var16.addEntry(var21, var17, var21[2]); JDPTreeBranch var23 = var16.getLastAddedBranch(); var23.text = new String[1]; var23.text[0] = var21[2] + "(" + super.thisBranch.name + "RL1.getSelectedKey());"; String[] var24 = new String[]{"String"}; this.loadParameters(var23, var24); } if (var13 != null) { var13.treeVector = new Vector(); JDPTreePicker var27 = new JDPTreePicker(super.user, this.targetLayoutMgr, this.targetLayoutMgr.dragPanel); int[] var28 = new int[]{4, 1, 2, 1}; var27.setIcons(var28); var27.setRoot("Component Events", true); JDPTreeBranch var29 = var27.treeRoot; Object[] var30 = new Object[]{null, "Methods"}; String[] var31 = new String[]{null, "Drop here to attach this component/method to this Event"}; var27.setDropKeys(var30); var27.setDragAndDrop((boolean[])null); var27.setDropMessages(var31); String[] var32 = new String[]{"ACTION_EVENT", null, null, null}; boolean[] var33 = new boolean[]{true, true, true, false}; var27.setIcons(var28); var27.setExpanded(var33); var27.addEntry(var32, var28, var32[0]); var13.treeVector.addElement(var29); if (var14 != null) { var28[2] = var14.icon; var32[1] = super.thisBranch.name + "RL1"; var32[2] = "clearList()"; var27.addEntry(var32, var28, var32[2]); JDPTreeBranch var34 = var27.getLastAddedBranch(); var34.text = new String[1]; var34.text[0] = var32[1] + "." + var32[2] + ";"; String[] var38 = new String[0]; this.loadParameters(var34, var38); var32[2] = "setFromWhereClause(String)"; var27.addEntry(var32, var28, var32[2]); var34 = var27.getLastAddedBranch(); var34.text = new String[1]; var34.text[0] = var32[1] + ".setFromWhereClause(" + super.thisBranch.name + "SP1.getFromWhereClause());"; String[] var25 = new String[]{"String"}; this.loadParameters(var34, var25); var32[2] = "loadList()"; var27.addEntry(var32, var28, var32[2]); var34 = var27.getLastAddedBranch(); var34.text = new String[1]; var34.text[0] = var32[1] + "." + var32[2] + ";"; this.loadParameters(var34, var38); } else if (var13 != null) { ((JDPWhereClause)var13.thisObject).setHorizontalLayout(true); var13.properties = new String[3][1]; var13.properties[0][0] = "HorizontalLayout:"; var13.properties[1][0] = "true"; var13.properties[2][0] = "boolean"; var28[2] = 33; var32[1] = super.thisBranch.name + "CL1"; var32[2] = "LoadDataFromWhereClause(String)"; var27.addEntry(var32, var28, var32[2]); JDPTreeBranch var37 = var27.getLastAddedBranch(); var37.text = new String[1]; var37.text[0] = super.thisBranch.name + "LoadDataFromWhereClause(" + super.thisBranch.name + "SP1.getFromWhereClause());"; String[] var39 = new String[0]; this.loadParameters(var37, var39); } } this.targetLayoutMgr.projectLoading = var12; var8.expanded = false; this.targetLayoutMgr.setProperties(var8); if (var8.thisObject instanceof Component) { ((Component)var8.thisObject).layout(); ((Component)var8.thisObject).paintAll(((Component)var8.thisObject).getGraphics()); } this.targetLayoutMgr.interactionMgr.loadMethodTree(var8, false); this.targetLayoutMgr.currentBranch = super.thisBranch; this.targetLayoutMgr.gSource.constructMethod(super.thisBranch, "Main"); if (!this.targetLayoutMgr.projectLoading) { this.targetLayoutMgr.setButton("Blank"); this.targetLayoutMgr.layoutTree.select(this.targetLayoutMgr.layoutTree.getTreeBranchNames(var8)); if (var9 != null || var10 != null) { this.targetLayoutMgr.refreshLayout(super.thisBranch); } this.targetLayoutMgr.setButton("Layout"); this.targetLayoutMgr.reDraw(); } } } } void loadColumnItem(int var1) { this.aggregatefunction.select(this.aggregateFunction[var1]); this.elementlegend.setText(this.elementLegend[var1]); this.fieldsql.setText(this.fieldSql[var1]); this.elementcolor.select(JDPUtils._cvtbcolor(this.elementColor[var1])); this.elementbordercolor.select(JDPUtils._cvtbcolor(this.elementBorderColor[var1])); } void updateColumnArrays() { if (this.currentColumnSelection >= 0) { this.fieldActive[this.currentColumnSelection] = this.columns.isSelected(this.currentColumnSelection); this.aggregateFunction[this.currentColumnSelection] = this.aggregatefunction.getSelectedItem(); this.elementLegend[this.currentColumnSelection] = this.elementlegend.getText(); this.fieldSql[this.currentColumnSelection] = this.fieldsql.getText(); this.elementColor[this.currentColumnSelection] = super.user.u._cvtcolor(this.elementcolor.getSelectedItem()); this.elementBorderColor[this.currentColumnSelection] = super.user.u._cvtcolor(this.elementbordercolor.getSelectedItem()); } } void loadParameters(JDPTreeBranch var1, String[] var2) { this.targetLayoutMgr.interactionMgr.loadParameterTree(var1, var2); } boolean saveSelections() { JDPSaveProps var1 = super.user.saveProperties; String var2 = "JDPSelectChartDef" + super.componentName; var1.saveObject(this.groupBy, var2, "groupBy"); var1.saveObject(this.groupBySQL, var2, "groupBySQL"); var1.saveObject(this.multipleSeries, var2, "multipleSeries"); var1.saveObject(this.multipleSeriesSQL, var2, "multipleSeriesSQL"); var1.saveObject(this.chartTitle, var2, "chartTitle"); var1.saveObject(this.chartTitleColor, var2, "chartTitleColor"); var1.saveObject(this.chartType, var2, "chartType"); var1.saveObject(this.xaxisTitle, var2, "xaxisTitle"); var1.saveObject(this.xaxisTitleColor, var2, "xaxisTitleColor"); var1.saveObject(this.xaxisLabelColor, var2, "xaxisLabelColor"); var1.saveObject(this.yaxisLabelColor, var2, "yaxisLabelColor"); var1.saveObject(this.chartFrameColor, var2, "chartFrameColor"); var1.saveObject(this.maxRows, var2, "maxRows"); var1.saveObject(this.pfromwhereclause, var2, "pfromwhereclause"); var1.saveObject(this.autoscale, var2, "autoscale"); var1.saveObject(this.autozoom, var2, "autozoom"); var1.saveObject(this.minPlotValue, var2, "minPlotValue"); var1.saveObject(this.maxPlotValue, var2, "maxPlotValue"); var1.saveObject(this.gridLineSettingH, var2, "gridLineSettingH"); var1.saveObject(this.gridLineSettingV, var2, "gridLineSettingV"); var1.saveObject(this.gridLineSettingB, var2, "gridLineSettingB"); var1.saveObject(this.gridLineSettingF, var2, "gridLineSettingF"); var1.saveObject(this.gridColor, var2, "gridColor"); var1.saveObject(this.dategroupby, var2, "dategroupby"); var1.saveObject(this.dateGroupBy, var2, "dateGroupBy"); var1.saveObject(this.fieldActive, var2, "fieldActive"); var1.saveObject(this.aggregateFunction, var2, "aggregateFunction"); var1.saveObject(this.elementLegend, var2, "elementLegend"); var1.saveObject(this.fieldSql, var2, "fieldSql"); var1.saveObject(this.elementColor, var2, "elementColor"); var1.saveObject(this.elementBorderColor, var2, "elementBorderColor"); return true; } void refresh() { this.clearFields(); this.currentSelection = -1; this.currentColumnSelection = -1; this.retrieveColumns(); this.loadList(); this.restoreSelections(); if (this.targetChart != null) { this.targetChart.refresh(); } } void retrieveColumns() { for(int var1 = 0; var1 < super.user.gParm.size(); ++var1) { if (super.user.gParm.elementAt(var1) instanceof Vector) { Vector var2 = (Vector)super.user.gParm.elementAt(var1); if (((String)var2.elementAt(0)).compareTo("SelectDSN" + super.componentName) == 0) { this.targetDSN = (JDPSelectDSN)var2.elementAt(3); } if (((String)var2.elementAt(0)).compareTo("SelectColumns" + super.componentName) == 0) { this.target = (JDPSelectColumns)var2.elementAt(1); } if (((String)var2.elementAt(0)).compareTo("ChartLayout" + super.componentName) == 0) { this.targetChart = (JDPChartLayout)var2.elementAt(1); } } if (super.user.gParm.elementAt(var1) instanceof JDPLayoutMgr && !super.componentName.equals("")) { this.targetLayoutMgr = (JDPLayoutMgr)super.user.gParm.elementAt(var1); } } } public boolean handleEvent(Event var1) { switch (var1.id) { case 202: if (var1.target instanceof JDPTabSelectTopPanel) { this.retrieveColumns(); return true; } return false; case 401: if (var1.key == 9) { if (var1.target.equals(this.chartTitle)) { super.user.u.cursor(this.chartTitleColor); return true; } if (var1.target.equals(this.chartTitleColor)) { super.user.u.cursor(this.xaxisTitle); return true; } if (var1.target.equals(this.xaxisTitle)) { super.user.u.cursor(this.xaxisTitleColor); return true; } if (var1.target.equals(this.xaxisTitleColor)) { super.user.u.cursor(this.xaxisLabelColor); return true; } if (var1.target.equals(this.xaxisLabelColor)) { super.user.u.cursor(this.yaxisLabelColor); return true; } if (var1.target.equals(this.yaxisLabelColor)) { super.user.u.cursor(this.chartFrameColor); return true; } if (var1.target.equals(this.chartFrameColor)) { super.user.u.cursor(this.chartTitle); return true; } if (var1.target.equals(this.autoscale)) { super.user.u.cursor(this.autozoom); return true; } if (var1.target.equals(this.autozoom)) { super.user.u.cursor(this.minPlotValue); return true; } if (var1.target.equals(this.minPlotValue)) { super.user.u.cursor(this.maxPlotValue); return true; } if (var1.target.equals(this.maxPlotValue)) { super.user.u.cursor(this.gridLineSettingH); return true; } if (var1.target.equals(this.gridLineSettingH)) { super.user.u.cursor(this.gridLineSettingV); return true; } if (var1.target.equals(this.gridLineSettingV)) { super.user.u.cursor(this.gridLineSettingB); return true; } if (var1.target.equals(this.gridLineSettingB)) { super.user.u.cursor(this.gridLineSettingF); return true; } if (var1.target.equals(this.gridLineSettingF)) { super.user.u.cursor(this.gridColor); return true; } if (var1.target.equals(this.gridColor)) { super.user.u.cursor(this.autoscale); return true; } if (var1.target.equals(this.chartType)) { super.user.u.cursor(this.pfromwhereclause); return true; } if (super.componentName.equals("")) { if (var1.target.equals(this.pfromwhereclause)) { super.user.u.cursor(this.maxRows); return true; } if (var1.target.equals(this.maxRows)) { super.user.u.cursor(this.chartType); return true; } } else if (var1.target.equals(this.pfromwhereclause)) { super.user.u.cursor(this.chartType); return true; } return true; } return false; case 503: case 504: case 505: this.popuppanel.postEvent(var1); return false; case 701: case 702: if (var1.target instanceof JDPList) { if (var1.target.equals(this.columns)) { this.updateColumnArrays(); int var5 = (Integer)var1.arg; this.loadColumnItem(var5); this.currentColumnSelection = var5; this.fieldActive[this.currentColumnSelection] = this.columns.isSelected(this.currentColumnSelection); } if (var1.target.equals(this.groupBy)) { this.groupBySQL.setText(""); int var6 = (Integer)var1.arg; for(int var3 = 0; var3 < this.groupBy.countItems(); ++var3) { if (var3 != var6) { this.groupBy.deselect(var3); } } if (this.groupBy.getSelectedIndex() >= 0) { this.dategroupby.select(this.dateGroupBy[var6]); this.loadItem(var6); } if (this.groupBy.getSelectedIndex() >= 0 && !this.chartType.getSelectedItem().equals("Gantt")) { for(int var8 = 0; var8 < this.aggregateFunction.length; ++var8) { this.aggregateFunction[var8] = "Sum"; } } else { for(int var7 = 0; var7 < this.aggregateFunction.length; ++var7) { this.aggregateFunction[var7] = ""; } } } if (var1.target.equals(this.multipleSeries)) { this.multipleSeriesSQL.setText(""); if (this.multipleSeries.getSelectedIndex() >= 0) { this.multipleSeriesSQL.setText(this.multipleSeries.getSelectedItem()); } } return true; } else { return false; } case 1001: if (var1.target instanceof TextField) { super.user.u.isnumeric(this.maxRows, super.user.mainmsg); super.user.u.isfloat(this.minPlotValue, super.user.mainmsg); super.user.u.isfloat(this.maxPlotValue, super.user.mainmsg); return true; } else if (var1.target instanceof JDPComboBox) { if (this.autoscale.getSelectedItem().equals("Yes")) { this.minPlotValue.setEditable(false); this.maxPlotValue.setEditable(false); } else { this.minPlotValue.setEditable(true); this.maxPlotValue.setEditable(true); } if (this.autozoom.getSelectedItem().equals("Yes")) { this.minPlotValue.setEditable(false); this.minPlotValue.setText("0"); } if (var1.target.equals(this.dategroupby) && this.groupBy.getSelectedIndex() >= 0) { this.loadItem(this.groupBy.getSelectedIndex()); } if (var1.target.equals(this.aggregatefunction) && (this.groupBy.getSelectedIndex() >= 0 || this.multipleSeries.getSelectedIndex() >= 0) && this.aggregatefunction.getSelectedItem().equals("")) { this.aggregatefunction.select("Sum"); } if (var1.target.equals(this.chartType)) { if (!this.chartType.getSelectedItem().equals("Pie")) { this.xaxisLabelColor.enable(); this.yaxisLabelColor.enable(); this.chartFrameColor.enable(); this.autoscale.enable(); this.autozoom.enable(); this.minPlotValue.enable(); this.maxPlotValue.enable(); this.gridLineSettingH.enable(); this.gridLineSettingV.enable(); this.gridLineSettingB.enable(); this.gridLineSettingF.enable(); this.gridColor.enable(); this.elementlegend.enable(); this.elementcolor.enable(); this.elementbordercolor.enable(); this.multipleSeries.enable(); this.multipleSeriesSQL.enable(); } else { this.xaxisLabelColor.disable(); this.yaxisLabelColor.disable(); this.chartFrameColor.disable(); this.autoscale.disable(); this.autozoom.disable(); this.minPlotValue.disable(); this.maxPlotValue.disable(); this.gridLineSettingH.disable(); this.gridLineSettingV.disable(); this.gridLineSettingB.disable(); this.gridLineSettingF.disable(); this.gridColor.disable(); this.elementlegend.disable(); this.elementcolor.disable(); this.elementbordercolor.disable(); for(int var4 = 0; var4 < this.multipleSeries.countItems(); ++var4) { this.multipleSeries.deselect(var4); } this.multipleSeries.disable(); this.multipleSeriesSQL.disable(); } this.loadList(); } return true; } else { if (var1.target instanceof Button) { String var2 = (String)var1.arg; if (var2.trim().compareTo("Accept") == 0) { if (super.user.u.isnumeric(this.maxRows, super.user.mainmsg) && super.user.u.isfloat(this.minPlotValue, super.user.mainmsg) && super.user.u.isfloat(this.maxPlotValue, super.user.mainmsg)) { super.user.mainmsg.setStatusMsg("Saving selections...", 0); this.updateArrays(); this.updateColumnArrays(); this.saveSelections(); this.retrieveColumns(); this.loadLayoutComponent(); if (super.componentName.equals("")) { super.user.jdpMenuPanel.loadNextTab(); } super.user.mainmsg.setStatusMsg("Selections accepted.", 5); } return true; } if (var2.trim().compareTo("Reset") == 0) { this.refresh(); return true; } } return true; } default: return false; } } boolean removeSelections() { JDPSaveProps var1 = super.user.saveProperties; String var2 = "JDPSelectChartDef" + super.componentName; var1.removeObject(this.groupBy, var2, "groupBy"); var1.removeObject(this.groupBySQL, var2, "groupBySQL"); var1.removeObject(this.multipleSeries, var2, "multipleSeries"); var1.removeObject(this.multipleSeriesSQL, var2, "multipleSeriesSQL"); var1.removeObject(this.chartTitle, var2, "chartTitle"); var1.removeObject(this.chartTitleColor, var2, "chartTitleColor"); var1.removeObject(this.chartType, var2, "chartType"); var1.removeObject(this.xaxisTitle, var2, "xaxisTitle"); var1.removeObject(this.xaxisTitleColor, var2, "xaxisTitleColor"); var1.removeObject(this.xaxisLabelColor, var2, "xaxisLabelColor"); var1.removeObject(this.yaxisLabelColor, var2, "yaxisLabelColor"); var1.removeObject(this.chartFrameColor, var2, "chartFrameColor"); var1.removeObject(this.maxRows, var2, "maxRows"); var1.removeObject(this.pfromwhereclause, var2, "pfromwhereclause"); var1.removeObject(this.autoscale, var2, "autoscale"); var1.removeObject(this.autozoom, var2, "autozoom"); var1.removeObject(this.minPlotValue, var2, "minPlotValue"); var1.removeObject(this.maxPlotValue, var2, "maxPlotValue"); var1.removeObject(this.gridLineSettingH, var2, "gridLineSettingH"); var1.removeObject(this.gridLineSettingV, var2, "gridLineSettingV"); var1.removeObject(this.gridLineSettingB, var2, "gridLineSettingB"); var1.removeObject(this.gridLineSettingF, var2, "gridLineSettingF"); var1.removeObject(this.gridColor, var2, "gridColor"); var1.removeObject(this.dategroupby, var2, "dategroupby"); var1.removeObject(this.dateGroupBy, var2, "dateGroupBy"); var1.removeObject(this.fieldActive, var2, "fieldActive"); var1.removeObject(this.aggregateFunction, var2, "aggregateFunction"); var1.removeObject(this.elementLegend, var2, "elementLegend"); var1.removeObject(this.fieldSql, var2, "fieldSql"); var1.removeObject(this.elementColor, var2, "elementColor"); var1.removeObject(this.elementBorderColor, var2, "elementBorderColor"); return true; } void loadItem(int var1) { this.groupBySQL.setText(this.groupBy.getSelectedItem()); if (this.dateGroupBy[var1].equals("")) { this.dategroupby.disable(); } else { this.dategroupby.enable(); int var2 = this.target.columnDatatype[this.indexes[var1]]; String var3 = this.groupBy.getSelectedItem(); if (JDPUtils.isOdbcDate(var2)) { if (this.targetDSN.dsnType.indexOf(JDPJagg.MSSQLSERVER) >= 0) { var3 = "CONVERT(char," + var3 + ",11)"; if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "SUBSTRING(" + var3 + ",1,5)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "SUBSTRING(" + var3 + ",1,2)"; } } else if (this.targetDSN.dsnType.indexOf(JDPJagg.SYBASE) < 0 && this.targetDSN.dsnType.indexOf(JDPJagg.SYBASE10) < 0) { if (this.targetDSN.dsnType.indexOf(JDPJagg.ANYWHERE) >= 0) { var3 = "CONVERT(char," + var3 + ",11)"; if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "SUBSTRING(" + var3 + ",1,5)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "SUBSTRING(" + var3 + ",1,2)"; } } else if (this.targetDSN.dsnType.indexOf(JDPJagg.SOLIDSERVER) >= 0) { var3 = "CONVERT_CHAR(" + var3 + ")"; if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "SUBSTRING(" + var3 + ",6,2)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "SUBSTRING(" + var3 + ",1,4)"; } } else if (this.targetDSN.dsnType.indexOf(JDPJagg.ORACLE) < 0 && this.targetDSN.dsnType.indexOf(JDPJagg.POLITE) < 0) { if (this.targetDSN.dsnType.indexOf(JDPJagg.ACCESS) >= 0) { var3 = "format(" + var3 + ", 'yy/mm/dd')"; if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "LEFT(" + var3 + ",5)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "LEFT(" + var3 + ",2)"; } } else if (this.targetDSN.dsnType.indexOf(JDPJagg.DB2) >= 0) { if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "CHAR(MONTH(" + var3 + "))"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "CHAR(YEAR(" + var3 + "))"; } } else if (this.targetDSN.dsnType.indexOf(JDPJagg.VFOXPRO) >= 0) { if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "SUBSTR(DTOC(" + var3 + "),1,2)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "SUBSTR(DTOC(" + var3 + "),7,2)"; } } else if (this.targetDSN.dsnType.indexOf(JDPJagg.FOXPRO) >= 0) { if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "SUBSTR(STR(" + var3 + "),1,2)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "SUBSTR(STR(" + var3 + "),7,2)"; } } else if (this.targetDSN.dsnType.indexOf(JDPJagg.CLOUDSCAPE) >= 0) { var3 = "cast(" + var3 + " as char(14))"; if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "SUBSTR(" + var3 + ",6,10)+SUBSTR(" + var3 + ",11,13)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "SUBSTR(" + var3 + ",6,10)"; } } } else { var3 = "to_char(" + var3 + ", 'yy/mm/dd')"; if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "SUBSTR(" + var3 + ",1,5)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "SUBSTR(" + var3 + ",1,2)"; } } } else { var3 = "CONVERT(char," + var3 + ",11)"; if (this.dategroupby.getSelectedItem().equals("Month")) { var3 = "SUBSTRING(" + var3 + ",1,5)"; } if (this.dategroupby.getSelectedItem().equals("Year")) { var3 = "SUBSTRING(" + var3 + ",1,2)"; } } } this.groupBySQL.setText(var3); } } public void InitClass(JDPUser var1, Panel var2, String var3) { super.user = var1; super.moduleName = "SelectChartDef"; if (var3.startsWith("JDPLayoutMgr:")) { super.componentName = var3.substring(13); var3 = ""; } ((Container)this).setLayout(new BorderLayout()); ((Component)this).setFont(var1.plainFont); this.popuppanel = new JDPPopupMessage(var1, var2); ((Container)var2).add(this.popuppanel); Panel var4 = new Panel(); ((Container)var4).setLayout(new BorderLayout()); Panel var5 = new Panel(); ((Container)var5).setLayout(new BorderLayout()); Panel var6 = new Panel(); ((Container)var6).setLayout(new BorderLayout()); Panel var7 = new Panel(); ((Container)var7).setLayout(new GridLayout(4, 1)); JDPScrollPanel var8 = new JDPScrollPanel(); Panel var9 = new Panel(); ((Container)var9).setLayout(new BorderLayout()); JDPScrollPanel var10 = new JDPScrollPanel(); Panel var11 = new Panel(); ((Container)var11).setLayout(new BorderLayout()); JDPScrollPanel var12 = new JDPScrollPanel(); Panel var13 = new Panel(); ((Container)var13).setLayout(new BorderLayout()); Panel var14 = new Panel(); ((Container)var14).setLayout(new BorderLayout()); Panel var15 = new Panel(); ((Container)var15).setLayout(new BorderLayout()); Panel var16 = new Panel(); ((Container)var16).setLayout(new BorderLayout()); Panel var17 = new Panel(); ((Container)var17).setLayout(new BorderLayout()); Panel var18 = new Panel(); ((Container)var18).setLayout(new BorderLayout()); JDPScrollPanel var19 = new JDPScrollPanel(); JDPScrollPanel var20 = new JDPScrollPanel(); JDPScrollPanel var21 = new JDPScrollPanel(); Panel var22 = new Panel(); ((Container)var22).setLayout(new BorderLayout()); this.chartType = new JDPComboBox(var1, "", 10); this.chartType.setEditable(false); this.chartType.addItem("Column"); this.chartType.addItem("Bar"); this.chartType.addItem("Line"); this.chartType.addItem("Area"); this.chartType.addItem("Pie"); this.chartType.addItem("Gantt"); this.chartTitle = new TextField("", 30); this.xaxisTitle = new TextField("", 30); this.chartTitleColor = new JDPComboBox(var1, "", 10); this.chartTitleColor.setEditable(false); this.chartTitleColor.addItem("Black"); this.chartTitleColor.addItem("Gray"); this.chartTitleColor.addItem("Blue"); this.chartTitleColor.addItem("Cyan"); this.chartTitleColor.addItem("DarkGray"); this.chartTitleColor.addItem("Green"); this.chartTitleColor.addItem("LightGray"); this.chartTitleColor.addItem("Magenta"); this.chartTitleColor.addItem("Orange"); this.chartTitleColor.addItem("Pink"); this.chartTitleColor.addItem("Red"); this.chartTitleColor.addItem("White"); this.chartTitleColor.addItem("Yellow"); this.xaxisTitleColor = new JDPComboBox(var1, "", 10); this.xaxisTitleColor.setEditable(false); this.xaxisTitleColor.addItem("Black"); this.xaxisTitleColor.addItem("Gray"); this.xaxisTitleColor.addItem("Blue"); this.xaxisTitleColor.addItem("Cyan"); this.xaxisTitleColor.addItem("DarkGray"); this.xaxisTitleColor.addItem("Green"); this.xaxisTitleColor.addItem("LightGray"); this.xaxisTitleColor.addItem("Magenta"); this.xaxisTitleColor.addItem("Orange"); this.xaxisTitleColor.addItem("Pink"); this.xaxisTitleColor.addItem("Red"); this.xaxisTitleColor.addItem("White"); this.xaxisTitleColor.addItem("Yellow"); this.xaxisLabelColor = new JDPComboBox(var1, "", 10); this.xaxisLabelColor.setEditable(false); this.xaxisLabelColor.addItem("Black"); this.xaxisLabelColor.addItem("Gray"); this.xaxisLabelColor.addItem("Blue"); this.xaxisLabelColor.addItem("Cyan"); this.xaxisLabelColor.addItem("DarkGray"); this.xaxisLabelColor.addItem("Green"); this.xaxisLabelColor.addItem("LightGray"); this.xaxisLabelColor.addItem("Magenta"); this.xaxisLabelColor.addItem("Orange"); this.xaxisLabelColor.addItem("Pink"); this.xaxisLabelColor.addItem("Red"); this.xaxisLabelColor.addItem("White"); this.xaxisLabelColor.addItem("Yellow"); this.yaxisLabelColor = new JDPComboBox(var1, "", 10); this.yaxisLabelColor.setEditable(false); this.yaxisLabelColor.addItem("Black"); this.yaxisLabelColor.addItem("Gray"); this.yaxisLabelColor.addItem("Blue"); this.yaxisLabelColor.addItem("Cyan"); this.yaxisLabelColor.addItem("DarkGray"); this.yaxisLabelColor.addItem("Green"); this.yaxisLabelColor.addItem("LightGray"); this.yaxisLabelColor.addItem("Magenta"); this.yaxisLabelColor.addItem("Orange"); this.yaxisLabelColor.addItem("Pink"); this.yaxisLabelColor.addItem("Red"); this.yaxisLabelColor.addItem("White"); this.yaxisLabelColor.addItem("Yellow"); this.chartFrameColor = new JDPComboBox(var1, "", 10); this.chartFrameColor.setEditable(false); this.chartFrameColor.addItem("Black"); this.chartFrameColor.addItem("Gray"); this.chartFrameColor.addItem("Blue"); this.chartFrameColor.addItem("Cyan"); this.chartFrameColor.addItem("DarkGray"); this.chartFrameColor.addItem("Green"); this.chartFrameColor.addItem("LightGray"); this.chartFrameColor.addItem("Magenta"); this.chartFrameColor.addItem("Orange"); this.chartFrameColor.addItem("Pink"); this.chartFrameColor.addItem("Red"); this.chartFrameColor.addItem("White"); this.chartFrameColor.addItem("Yellow"); this.pfromwhereclause = new TextField("(1=1)", 30); this.maxRows = new TextField("1000", 10); ((Container)var8).add("Left", new JDPWrapLabel(var1, "Chart Type:")); ((Container)var8).add("Right", this.chartType); ((Container)var8).add("Left", new JDPWrapLabel(var1, "Special Where Clause:")); ((Container)var8).add("Right", this.pfromwhereclause); if (super.componentName.equals("")) { ((Container)var8).add("Left", new JDPWrapLabel(var1, "Maximum rows to report on:")); ((Container)var8).add("Right", this.maxRows); } ((Container)var9).add("Center", new JDPChiselFramePanel(var1, "Define basic chart settings:", var8, "North")); ((Container)var10).add("Left", new JDPWrapLabel(var1, "Chart Title:")); ((Container)var10).add("Right", this.chartTitle); ((Container)var10).add("Left", new JDPWrapLabel(var1, "Chart Title Color:")); ((Container)var10).add("Right", this.chartTitleColor); ((Container)var10).add("Left", new JDPWrapLabel(var1, "X Axis Title:")); ((Container)var10).add("Right", this.xaxisTitle); ((Container)var10).add("Left", new JDPWrapLabel(var1, "X Axis Title Color:")); ((Container)var10).add("Right", this.xaxisTitleColor); ((Container)var10).add("Left", new JDPWrapLabel(var1, "X Axis Label Color:")); ((Container)var10).add("Right", this.xaxisLabelColor); ((Container)var10).add("Left", new JDPWrapLabel(var1, "Y Axis Label Color:")); ((Container)var10).add("Right", this.yaxisLabelColor); ((Container)var10).add("Left", new JDPWrapLabel(var1, "Chart frame Color:")); ((Container)var10).add("Right", this.chartFrameColor); ((Container)var11).add("Center", new JDPChiselFramePanel(var1, "Define chart titles:", var10, "North")); this.autoscale = new JDPComboBox(var1, "", 5); this.autoscale.setEditable(false); this.autoscale.addItem("Yes"); this.autoscale.addItem("No"); this.autozoom = new JDPComboBox(var1, "", 5); this.autozoom.setEditable(false); this.autozoom.addItem("No"); this.autozoom.addItem("Yes"); this.minPlotValue = new TextField("0", 5); this.maxPlotValue = new TextField("100", 5); this.minPlotValue.setEditable(false); this.maxPlotValue.setEditable(false); this.gridLineSettingH = new JDPComboBox(var1, "", 5); this.gridLineSettingH.setEditable(false); this.gridLineSettingH.addItem("Yes"); this.gridLineSettingH.addItem("No"); this.gridLineSettingV = new JDPComboBox(var1, "", 5); this.gridLineSettingV.setEditable(false); this.gridLineSettingV.addItem("Yes"); this.gridLineSettingV.addItem("No"); this.gridLineSettingB = new JDPComboBox(var1, "", 5); this.gridLineSettingB.setEditable(false); this.gridLineSettingB.addItem("Yes"); this.gridLineSettingB.addItem("No"); this.gridLineSettingF = new JDPComboBox(var1, "", 5); this.gridLineSettingF.setEditable(false); this.gridLineSettingF.addItem("Yes"); this.gridLineSettingF.addItem("No"); this.gridColor = new JDPComboBox(var1, "", 10); this.gridColor.setEditable(false); this.gridColor.addItem("Gray"); this.gridColor.addItem("LightGray"); this.gridColor.addItem("Black"); this.gridColor.addItem("Blue"); this.gridColor.addItem("Cyan"); this.gridColor.addItem("DarkGray"); this.gridColor.addItem("Green"); this.gridColor.addItem("Magenta"); this.gridColor.addItem("Orange"); this.gridColor.addItem("Pink"); this.gridColor.addItem("Red"); this.gridColor.addItem("White"); this.gridColor.addItem("Yellow"); ((Container)var12).add("Left", new JDPWrapLabel(var1, "Auto calc min and max values:")); ((Container)var12).add("Right", this.autoscale); ((Container)var12).add("Left", new JDPWrapLabel(var1, "Adjust min y value to zoom in:")); ((Container)var12).add("Right", this.autozoom); ((Container)var12).add("Left", new JDPWrapLabel(var1, "Minimum y value:")); ((Container)var12).add("Right", this.minPlotValue); ((Container)var12).add("Left", new JDPWrapLabel(var1, "Maximum y value:")); ((Container)var12).add("Right", this.maxPlotValue); ((Container)var12).add("Left", new JDPWrapLabel(var1, "Grid setting: Horizontal:")); Panel var23 = new Panel(); ((Container)var23).setLayout(new JDPLineLayout(1)); ((Container)var23).add("Left", this.gridLineSettingH); ((Container)var23).add("Left", new JDPWrapLabel(var1, "Vertical:")); ((Container)var23).add("Left", this.gridLineSettingV); ((Container)var12).add("Right", var23); ((Container)var12).add("Left", new JDPWrapLabel(var1, "Grid setting: Background:")); Panel var24 = new Panel(); ((Container)var24).setLayout(new JDPLineLayout(1)); ((Container)var24).add("Left", this.gridLineSettingB); ((Container)var24).add("Left", new JDPWrapLabel(var1, "Foreground:")); ((Container)var24).add("Left", this.gridLineSettingF); ((Container)var12).add("Right", var24); ((Container)var12).add("Left", new JDPWrapLabel(var1, "Background grid color:")); ((Container)var12).add("Right", this.gridColor); ((Container)var13).add("Center", new JDPChiselFramePanel(var1, "Define chart scaling:", var12, "North")); this.dategroupby = new JDPComboBox(var1, "", 7); this.dategroupby.setEditable(false); this.dategroupby.addItem(""); this.dategroupby.addItem("Day"); this.dategroupby.addItem("Month"); this.dategroupby.addItem("Year"); this.dategroupby.disable(); ((Container)var19).add("Left", new JDPWrapLabel(var1, "For this column:")); ((Container)var19).add("Right", new Panel()); ((Container)var19).add("Left", new JDPWrapLabel(var1, "Group by: ")); ((Container)var19).add("Right", this.dategroupby); this.groupBySQL = new TextField("", 25); ((Container)var19).add("Left", new JDPWrapLabel(var1, "SQL Select:")); ((Container)var19).add("Right", this.groupBySQL); this.groupBy = new JDPList(var1); this.groupBy.setMinWidth(160); ((Container)var17).add("West", this.groupBy); Panel var25 = new Panel(); ((Container)var25).setLayout(new BorderLayout()); ((Container)var25).add("Center", var19); ((Container)var17).add("Center", var25); ((Container)var15).add("Center", new JDPChiselFramePanel(var1, "Choose the column by which to group your data (optional):", var17, "North")); this.multipleSeries = new JDPList(var1); this.multipleSeries.setMinWidth(160); ((Container)var6).add("Center", this.multipleSeries); this.multipleSeriesSQL = new TextField("", 30); ((Container)var20).add("Left", new JDPWrapLabel(var1, "SQL Select:")); ((Container)var20).add("Right", this.multipleSeriesSQL); ((Container)var18).add("West", var6); Panel var26 = new Panel(); ((Container)var26).setLayout(new BorderLayout()); ((Container)var26).add("Center", var20); ((Container)var18).add("Center", var26); ((Container)var16).add("Center", new JDPChiselFramePanel(var1, "Choose the column that defines values for multiple series (optional):", var18, "North")); String[] var27 = new String[]{"Type", "Titles", "Scaling", "Data grouping", "Multiple series", "Chart detail"}; Panel[] var28 = new Panel[]{var9, var11, var13, var15, var16, var22}; JDPTabSelectPanel var29 = new JDPTabSelectPanel(var1, var27, var28, "North"); ((Container)var4).add("Center", var29); this.columns = new JDPList(var1); this.columns.setMinWidth(160); this.columns.setSelectionsCheckboxes(true); this.columns.allowMultipleSelections(true); this.aggregatefunction = new JDPComboBox(var1, "", 10); this.aggregatefunction.setEditable(false); this.aggregatefunction.addItem(""); this.aggregatefunction.addItem("Sum"); this.aggregatefunction.addItem("Average"); this.elementlegend = new TextField("", 20); this.fieldsql = new TextField("", 20); this.elementcolor = new JDPComboBox(var1, "", 10); this.elementcolor.setEditable(false); this.elementcolor.addItem("Blue"); this.elementcolor.addItem("Cyan"); this.elementcolor.addItem("Green"); this.elementcolor.addItem("Magenta"); this.elementcolor.addItem("Orange"); this.elementcolor.addItem("Red"); this.elementcolor.addItem("White"); this.elementcolor.addItem("Yellow"); this.elementcolor.addItem("Pink"); this.elementcolor.addItem("Black"); this.elementcolor.addItem("DarkGray"); this.elementcolor.addItem("Gray"); this.elementbordercolor = new JDPComboBox(var1, "", 10); this.elementbordercolor.setEditable(false); this.elementbordercolor.addItem("Black"); this.elementbordercolor.addItem("Gray"); this.elementbordercolor.addItem("Blue"); this.elementbordercolor.addItem("Cyan"); this.elementbordercolor.addItem("DarkGray"); this.elementbordercolor.addItem("Green"); this.elementbordercolor.addItem("LightGray"); this.elementbordercolor.addItem("Magenta"); this.elementbordercolor.addItem("Orange"); this.elementbordercolor.addItem("Pink"); this.elementbordercolor.addItem("Red"); this.elementbordercolor.addItem("White"); this.elementbordercolor.addItem("Yellow"); ((Container)var21).add("Left", new JDPWrapLabel(var1, "Aggregate Function:")); ((Container)var21).add("Right", this.aggregatefunction); ((Container)var21).add("Left", new JDPWrapLabel(var1, "Legend Text:")); ((Container)var21).add("Right", this.elementlegend); ((Container)var21).add("Left", new JDPWrapLabel(var1, "Element Color:")); ((Container)var21).add("Right", this.elementcolor); ((Container)var21).add("Left", new JDPWrapLabel(var1, "Element Border Color:")); ((Container)var21).add("Right", this.elementbordercolor); ((Container)var21).add("Left", new JDPWrapLabel(var1, "SQL Select:")); ((Container)var21).add("Right", this.fieldsql); Panel var30 = new Panel(); ((Container)var30).setLayout(new BorderLayout()); ((Container)var30).add("West", this.columns); ((Container)var30).add("Center", var21); ((Container)var22).add("Center", new JDPChiselFramePanel(var1, "Select the columns that contain the chart data:", var30, "North")); String[] var31 = new String[]{"Accept", "Reset"}; int[] var32 = new int[]{5, 6}; JDPButtons var33 = new JDPButtons(var1, var31, var32, JDPButtons.HORIZONTAL); ((Container)var4).add("South", var33); this.popuppanel.addComponent(var33.button[0], "Accept Selections", "Accept selections and proceed to next screen"); this.popuppanel.addComponent(var33.button[1], "Reset Selections", "Reset selections back to default settings"); ((Container)this).add("Center", new JDPChiselFramePanel(var1, "Chart definition:", var4, "North")); this.gParmObject = new Vector(); this.gParmObject.addElement(super.moduleName + super.componentName); this.gParmObject.addElement(this); var1.gParm.addElement(this.gParmObject); ((Component)var2).paintAll(((Component)var2).getGraphics()); } }