home *** CD-ROM | disk | FTP | other *** search
- import java.util.StringTokenizer;
- import java.util.Vector;
-
- class APInfo {
- public int defparamcount = 0;
- public int specparamcount = 0;
- public int mlparamcount = 0;
- public int branchparamcount = 0;
- public int levelparamcount = 0;
- public int iconparamcount = 0;
- private String[] def_params;
- private Vector spec_params;
- public MLparam specml_params;
- public Vector icon_params;
- private String[] def_dv;
- private String[] spec_dv;
- private String[] specml_dv;
- private String[] branch_dv;
- private String[] level_dv;
- private String[] icon_dv;
- private String[] def_pn;
- private String[] spec_pn;
- private String[] specml_pn;
- private String[] branch_pn;
- private String[] level_pn;
- private String[] icon_pn;
- private String[] def_pd;
- private String[] spec_pd;
- private String[] specml_pd;
- private String[] branch_pd;
- private String[] level_pd;
- private String[] icon_pd;
- private int[] def_key;
- private int[] spec_key;
- private int[] specml_key;
- private int[] branch_key;
- private int[] level_key;
- private int[] icon_key;
- public int[] spec_x;
- public int[] specml_x;
- public int cur_icon_index = 0;
- public int cur_spec_index = 0;
- public int maxindex = 0;
- public int max_icon_index = 0;
- private Vector cur_tree;
- public int cur_tree_index = 0;
- public int max_tree_index = 0;
- public int cur_tree_level = 1;
- public int cur_tree_level_nav = 1;
- public int max_tree_level = 1;
- public boolean multi_level = false;
- public boolean branch_level = false;
- public boolean level_level = false;
- public boolean icon_level = false;
- private boolean fileLoad;
-
- public void initBranchFromFile(String var1) {
- if (!this.specml_params.isBranchItem(var1)) {
- this.specml_params.addBranchItem(var1, this.branch_dv);
- }
-
- }
-
- public void addBranchDataFromFile(String var1, String[] var2) {
- this.specml_params.editBranchItemFromFile(var1, var2);
- }
-
- public int[] getLevelKeys() {
- return this.level_key;
- }
-
- public String[] getLevelDefValues() {
- String[] var1 = new String[this.level_dv.length];
- System.arraycopy(this.level_dv, 0, var1, 0, this.level_dv.length);
- return var1;
- }
-
- public MLparam getSpecMLValues() {
- return this.specml_params;
- }
-
- public String convertTree() {
- String var1 = "";
-
- for(int var2 = 0; var2 < this.cur_tree.size(); ++var2) {
- if (var2 < this.cur_tree.size() - 1) {
- var1 = var1 + (String)this.cur_tree.elementAt(var2) + "-";
- } else {
- var1 = var1 + (String)this.cur_tree.elementAt(var2);
- }
- }
-
- return var1;
- }
-
- public void updateSpecMLParams(String[] var1) {
- this.specml_params.editItem(this.convertTree(), var1);
- }
-
- public void updateBranchParams(String[] var1) {
- this.specml_params.editBranchItem(this.convertTree(), var1);
- }
-
- public int goToNewSpecParamFF() {
- String[] var1 = new String[this.spec_dv.length];
- System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
- var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index + 1)).toString();
- this.addSpecParam(var1);
- return this.cur_spec_index;
- }
-
- public void resetTree(int var1) {
- this.cur_tree_level = 1;
- this.cur_tree_index = 0;
- this.cur_tree = null;
- this.cur_tree = new Vector();
- this.cur_tree.addElement((new Integer(var1)).toString());
- this.addTreeLevel();
- this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
- }
-
- public String[] getIconParamNames() {
- return this.icon_pn;
- }
-
- public void addInitialLevel() {
- String[] var1 = this.specml_params.valueLevelAt(1);
- if (var1 == null) {
- var1 = new String[this.level_dv.length];
- System.arraycopy(this.level_dv, 0, var1, 0, this.level_dv.length);
- this.specml_params.addLevelItem(var1);
- }
-
- }
-
- private void addTreeLevel() {
- this.cur_tree.addElement((new Integer(0)).toString());
- }
-
- public int goToNextSpecMLLevel() {
- if (this.specml_params.isItem(this.convertTree() + "-0")) {
- ++this.cur_tree_level;
- this.addTreeLevel();
- this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
- this.cur_tree_index = this.max_tree_index;
- this.setTreeIndex();
- } else {
- this.max_tree_index = 0;
- this.cur_tree_index = 0;
- ++this.cur_tree_level;
- this.addTreeLevel();
- this.goToNewSpecMLLevel();
- }
-
- return this.cur_tree_level;
- }
-
- private void setTreeIndex() {
- this.cur_tree.setElementAt((new Integer(this.cur_tree_index)).toString(), this.cur_tree_level);
- }
-
- public String[] getLevelParamDescs() {
- return this.level_pd;
- }
-
- private void setTreeIndexAtLevel(String var1, int var2) {
- this.cur_tree.setElementAt(var1, var2);
- }
-
- public void goToBranch() {
- if (!this.specml_params.isBranchItem(this.convertTree())) {
- this.specml_params.addBranchItem(this.convertTree(), this.branch_dv);
- }
-
- }
-
- public int[] getDefKeys() {
- return this.def_key;
- }
-
- public int[] getSpecKeys() {
- return this.spec_key;
- }
-
- public void addIconParam(String[] var1) {
- ++this.max_icon_index;
- this.cur_icon_index = this.max_icon_index;
- this.icon_params.addElement(var1);
- }
-
- public int insertSpecMLParam() {
- String[] var1 = new String[this.specml_dv.length];
- System.arraycopy(this.specml_dv, 0, var1, 0, this.specml_dv.length);
- var1[0] = this.specml_dv[0] + this.convertTree();
- this.specml_params.insertMLItem(this.convertTree(), var1);
- this.setTreeIndex();
- ++this.max_tree_index;
- return this.cur_tree_index;
- }
-
- public String[] getSpecParam(int var1) {
- return (String[])this.spec_params.elementAt(var1);
- }
-
- public int goToFirstSpecParam() {
- if (this.cur_spec_index > 0) {
- this.cur_spec_index = 0;
- if (this.multi_level) {
- this.resetTree(this.cur_spec_index);
- this.cur_tree_index = this.max_tree_index;
- }
- }
-
- return this.cur_spec_index;
- }
-
- public int goToNewSpecParam() {
- String[] var1 = new String[this.spec_dv.length];
- System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
- var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index + 1)).toString();
- this.addSpecParam(var1);
- return this.cur_spec_index;
- }
-
- public int goToNextIconParam() {
- if (this.cur_icon_index < this.max_icon_index) {
- ++this.cur_icon_index;
- }
-
- return this.cur_icon_index;
- }
-
- public int goToPrevSpecMLParam() {
- if (this.cur_tree_index > 0) {
- this.cur_tree_index += -1;
- }
-
- this.setTreeIndex();
- return this.cur_tree_index;
- }
-
- public int goToLastSpecMLParam() {
- if (this.cur_tree_index < this.max_tree_index) {
- this.cur_tree_index = this.max_tree_index;
- }
-
- this.setTreeIndex();
- return this.cur_tree_index;
- }
-
- public void addLevelFromFile(String[] var1) {
- this.specml_params.addLevelItem(var1);
- ++this.max_tree_level;
- }
-
- public int goToSpecMLParam(int var1) {
- this.cur_tree_index = var1;
- this.setTreeIndex();
- return this.cur_tree_index;
- }
-
- public int deleteSpecMLParam() {
- if (this.max_tree_index > 0) {
- this.specml_params.deleteMLItem(this.convertTree());
- this.max_tree_index += -1;
- this.max_tree_level = this.specml_params.getMaxLevel();
- if (this.cur_tree_index > this.max_tree_index) {
- this.goToPrevSpecMLParam();
- }
- } else if (this.cur_tree_level > 1) {
- this.specml_params.deleteMLItem(this.convertTree());
- this.max_tree_level = this.specml_params.getMaxLevel(this.cur_spec_index);
- this.goToPrevSpecMLLevel();
- this.goToBranch();
- } else {
- this.specml_params.deleteMLItem(this.convertTree());
- this.max_tree_level = this.specml_params.getMaxLevel();
- }
-
- return this.cur_tree_index;
- }
-
- public String[] getDefDefValues() {
- return this.def_dv;
- }
-
- public String[] getSpecDefValues() {
- String[] var1 = new String[this.spec_dv.length];
- System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
- var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index)).toString();
- return var1;
- }
-
- public Vector getIconValues() {
- return this.icon_params;
- }
-
- public void updateIconParams(String[] var1) {
- this.icon_params.setElementAt(var1, this.cur_icon_index);
- }
-
- public int getMaxLevelParams() {
- return this.specml_params.getLevelDataCouunt();
- }
-
- public int goToFirstSpecMLParamOrNew() {
- this.getSpecMLOneValues();
- if (this.branch_level) {
- this.getBranchOneValues();
- }
-
- this.cur_tree_level = 1;
- this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
- this.cur_tree_index = this.max_tree_index;
- this.setTreeIndex();
- return this.cur_tree_index;
- }
-
- public void updateLevelParams(String[] var1) {
- this.specml_params.editLevelItem(this.cur_tree_level_nav, var1);
- }
-
- public MLparam getMLparamObject() {
- return this.specml_params;
- }
-
- public String[] getLevelParamNames() {
- return this.level_pn;
- }
-
- public boolean hasAnySpecMLBeenAdded() {
- String[] var1 = this.specml_params.valueAt(this.convertTree());
- return var1 != null;
- }
-
- public boolean hasAnyBranchBeenAdded() {
- if (this.branch_level) {
- String[] var1 = this.specml_params.valueBranchAt(this.convertTree());
- if (var1 != null) {
- return true;
- }
- }
-
- return false;
- }
-
- public void checkLevel() {
- if (!this.specml_params.isLevelItem(this.cur_tree_level)) {
- String[] var1 = new String[this.level_dv.length];
- System.arraycopy(this.level_dv, 0, var1, 0, this.level_dv.length);
- this.specml_params.addLevelItem(var1);
- ++this.max_tree_level;
- }
-
- }
-
- public void goToNextLevel() {
- if (this.cur_tree_level_nav < this.max_tree_level) {
- ++this.cur_tree_level_nav;
- }
-
- }
-
- public int goToSpecMLLevel(int var1, String var2, int var3) {
- StringTokenizer var4 = new StringTokenizer(var2, "-");
- var4.nextToken();
-
- for(int var5 = 1; var4.hasMoreTokens(); ++var5) {
- String var6 = var4.nextToken();
- this.setTreeIndexAtLevel(var6, var5);
- }
-
- if (this.cur_tree_level != var1) {
- if (this.cur_tree_level < var1) {
- for(int var7 = this.cur_tree_level + 1; var7 <= var1; ++var7) {
- this.goToNextSpecMLLevel();
- }
- } else if (this.cur_tree_level > var1) {
- for(int var8 = this.cur_tree_level; var8 > var1; --var8) {
- this.goToPrevSpecMLLevel();
- }
- }
- }
-
- this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
- if (var3 > -1) {
- this.cur_tree_index = var3;
- } else {
- this.cur_tree_index = this.max_tree_index;
- }
-
- this.setTreeIndex();
- return this.cur_tree_level;
- }
-
- public int goToPrevSpecMLLevel() {
- this.cur_tree_level += -1;
- this.cur_tree_index = this.getLastTreeLevelIndex();
- this.removeTreeLevel();
- this.setTreeIndex();
- this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
- return this.cur_tree_level;
- }
-
- public String[] getSpecMLParam() {
- return this.specml_params.valueAt(this.convertTree());
- }
-
- public String[] getDefParamDescs() {
- return this.def_pd;
- }
-
- public String[] getSpecParamDescs() {
- return this.spec_pd;
- }
-
- public String[] getBranchParam() {
- return this.specml_params.valueBranchAt(this.convertTree());
- }
-
- public int goToPrevIconParam() {
- if (this.cur_icon_index > 0) {
- this.cur_icon_index += -1;
- }
-
- return this.cur_icon_index;
- }
-
- public int goToLastIconParam() {
- if (this.cur_icon_index < this.max_icon_index) {
- this.cur_icon_index = this.max_icon_index;
- }
-
- return this.cur_icon_index;
- }
-
- public int goToIconParam(int var1) {
- this.cur_icon_index = var1;
- return this.cur_icon_index;
- }
-
- public String[] getDefParamNames() {
- return this.def_pn;
- }
-
- public String[] getSpecParamNames() {
- return this.spec_pn;
- }
-
- public int deleteIconParam() {
- if (this.max_icon_index > -1) {
- this.icon_params.removeElementAt(this.cur_icon_index);
- if (this.cur_icon_index > -1) {
- if (this.cur_icon_index == 0 && this.max_icon_index == 0) {
- String[] var1 = new String[this.icon_dv.length];
- System.arraycopy(this.icon_dv, 0, var1, 0, this.icon_dv.length);
- var1[0] = this.icon_dv[0] + (new Integer(this.cur_icon_index)).toString();
- this.addIconParam(var1);
- }
-
- if (this.cur_icon_index > 0 && this.cur_icon_index == this.max_icon_index) {
- this.cur_icon_index += -1;
- }
- }
-
- if (this.max_icon_index > 0) {
- this.max_icon_index += -1;
- }
- }
-
- return this.cur_icon_index;
- }
-
- public int insertIconParam() {
- String[] var1 = new String[this.icon_dv.length];
- System.arraycopy(this.icon_dv, 0, var1, 0, this.icon_dv.length);
- var1[0] = this.icon_dv[0] + (new Integer(this.cur_icon_index)).toString();
- this.icon_params.insertElementAt(var1, this.cur_icon_index);
- ++this.max_icon_index;
- return this.cur_icon_index;
- }
-
- public int goToFirstSpecMLParam() {
- if (this.cur_tree_index > 0) {
- this.cur_tree_index = 0;
- }
-
- this.setTreeIndex();
- return this.cur_tree_index;
- }
-
- public int[] getSpecMLKeys() {
- return this.specml_key;
- }
-
- public int[] getBranchKeys() {
- return this.branch_key;
- }
-
- public String getDefValue(String var1) {
- for(int var2 = 0; var2 < this.defparamcount; ++var2) {
- if (var1.equalsIgnoreCase(this.def_pd[var2])) {
- return this.def_params[var2];
- }
- }
-
- return "-1";
- }
-
- public int goToNewSpecMLParam() {
- String[] var1 = new String[this.specml_dv.length];
- System.arraycopy(this.specml_dv, 0, var1, 0, this.specml_dv.length);
- this.addSpecMLParam(var1);
- return this.cur_tree_index;
- }
-
- private int getLastTreeLevelIndex() {
- return Integer.parseInt((String)this.cur_tree.elementAt(this.cur_tree.size() - 2));
- }
-
- public void addSpecParam(String[] var1) {
- ++this.maxindex;
- this.cur_spec_index = this.maxindex;
- if (this.multi_level) {
- this.resetTree(this.cur_spec_index);
- }
-
- this.spec_params.addElement(var1);
- }
-
- public String[] getSpecMLParamDescs() {
- return this.specml_pd;
- }
-
- public String[] getBranchParamDescs() {
- return this.branch_pd;
- }
-
- public String[] getIconParam() {
- return (String[])this.icon_params.elementAt(this.cur_icon_index);
- }
-
- public String[] getIconParam(int var1) {
- return var1 < this.icon_params.size() ? (String[])this.icon_params.elementAt(var1) : null;
- }
-
- public int goToNextSpecParam() {
- if (this.cur_spec_index < this.maxindex) {
- ++this.cur_spec_index;
- if (this.multi_level) {
- this.resetTree(this.cur_spec_index);
- this.cur_tree_index = this.max_tree_index;
- }
- }
-
- return this.cur_spec_index;
- }
-
- public int goToFirstIconParam() {
- if (this.cur_icon_index > 0) {
- this.cur_icon_index = 0;
- }
-
- return this.cur_icon_index;
- }
-
- public int goToNewIconParam() {
- if (!((String[])this.icon_params.elementAt(this.max_icon_index))[0].equals("")) {
- String[] var1 = new String[this.icon_dv.length];
- System.arraycopy(this.icon_dv, 0, var1, 0, this.icon_dv.length);
- var1[0] = this.icon_dv[0] + (new Integer(this.max_icon_index + 1)).toString();
- this.addIconParam(var1);
- } else {
- this.goToLastIconParam();
- }
-
- return this.cur_icon_index;
- }
-
- public String[] getSpecMLDefValues() {
- return this.specml_dv;
- }
-
- public String[] getBranchDefValues() {
- return this.branch_dv;
- }
-
- public String[] getSpecMLOneValues() {
- String[] var1 = this.specml_params.valueAt(this.convertTree());
- if (var1 == null) {
- var1 = new String[this.specml_dv.length];
- System.arraycopy(this.specml_dv, 0, var1, 0, this.specml_dv.length);
- var1[0] = this.specml_dv[0] + this.convertTree();
- this.specml_params.addItem(this.convertTree(), var1);
- return var1;
- } else {
- return var1;
- }
- }
-
- public String[] getBranchOneValues() {
- String[] var1 = this.specml_params.valueBranchAt(this.convertTree());
- if (var1 == null) {
- var1 = new String[this.branch_dv.length];
- System.arraycopy(this.branch_dv, 0, var1, 0, this.branch_dv.length);
- this.specml_params.addBranchItem(this.convertTree(), var1);
- return var1;
- } else {
- return var1;
- }
- }
-
- public String[] getLevelValues() {
- return this.specml_params.valueLevelAt(this.cur_tree_level_nav);
- }
-
- public String[] getIconDefValues() {
- String[] var1 = new String[this.icon_dv.length];
- System.arraycopy(this.icon_dv, 0, var1, 0, this.icon_dv.length);
- var1[0] = this.icon_dv[0] + (new Integer(this.cur_icon_index)).toString();
- return var1;
- }
-
- public String[] getDefValues() {
- return this.def_params;
- }
-
- public Vector getSpecValues() {
- return this.spec_params;
- }
-
- public String[] getIconOneValues() {
- Object var1 = null;
- if (this.icon_params.size() < 1) {
- String[] var3 = new String[this.icon_dv.length];
- System.arraycopy(this.icon_dv, 0, var3, 0, this.icon_dv.length);
- var3[0] = this.icon_dv[0] + this.cur_icon_index;
- this.icon_params.addElement(var3);
- return var3;
- } else {
- String[] var2 = (String[])this.icon_params.elementAt(this.cur_icon_index);
- return var2;
- }
- }
-
- public void updateDefParams(String[] var1) {
- this.def_params = var1;
- }
-
- public void updateSpecParams(String[] var1) {
- this.spec_params.setElementAt(var1, this.cur_spec_index);
- }
-
- public int getNumDefinedTreeParams() {
- return this.specml_params.getNumDefinedTreeParams();
- }
-
- public APInfo(String[][] var1, boolean var2) {
- this.fileLoad = var2;
- if (this.fileLoad) {
- this.maxindex = -1;
- this.cur_spec_index = -1;
- }
-
- this.spec_params = new Vector();
- this.icon_params = new Vector();
- int var3 = 0;
- this.cur_tree = new Vector();
- this.specml_params = new MLparam(this);
-
- for(int var4 = 0; var4 < var1[0].length; ++var4) {
- var3 = Integer.parseInt(var1[0][var4]);
- if (var3 == 0) {
- ++this.defparamcount;
- } else if (var3 != 1 && var3 != 2) {
- if (var3 == 3) {
- ++this.mlparamcount;
- } else if (var3 == 4) {
- ++this.branchparamcount;
- } else if (var3 == 5) {
- ++this.levelparamcount;
- } else if (var3 == 10) {
- ++this.iconparamcount;
- }
- } else {
- ++this.specparamcount;
- }
- }
-
- this.def_pd = new String[this.defparamcount];
- this.spec_pd = new String[this.specparamcount];
- this.specml_pd = new String[this.mlparamcount];
- this.branch_pd = new String[this.branchparamcount];
- this.level_pd = new String[this.levelparamcount];
- this.icon_pd = new String[this.iconparamcount];
- this.def_pn = new String[this.defparamcount];
- this.spec_pn = new String[this.specparamcount];
- this.specml_pn = new String[this.mlparamcount];
- this.branch_pn = new String[this.branchparamcount];
- this.level_pn = new String[this.levelparamcount];
- this.icon_pn = new String[this.iconparamcount];
- this.def_key = new int[this.defparamcount];
- this.spec_key = new int[this.specparamcount];
- this.specml_key = new int[this.mlparamcount];
- this.branch_key = new int[this.branchparamcount];
- this.level_key = new int[this.levelparamcount];
- this.icon_key = new int[this.iconparamcount];
- this.def_dv = new String[this.defparamcount];
- this.spec_dv = new String[this.specparamcount];
- this.specml_dv = new String[this.mlparamcount];
- this.branch_dv = new String[this.branchparamcount];
- this.level_dv = new String[this.levelparamcount];
- this.icon_dv = new String[this.iconparamcount];
- this.spec_x = new int[this.specparamcount];
- this.specml_x = new int[this.mlparamcount];
- this.def_params = new String[this.defparamcount];
- int var13 = 0;
- int var5 = 0;
- int var6 = 0;
- int var7 = 0;
- int var8 = 0;
- int var9 = 0;
-
- for(int var10 = 0; var10 < var1[0].length; ++var10) {
- var3 = Integer.parseInt(var1[0][var10]);
- if (var3 == 0) {
- this.def_pn[var13] = var1[1][var10];
- this.def_pd[var13] = var1[2][var10];
- this.def_dv[var13] = var1[3][var10];
- this.def_key[var13] = new Integer(var1[4][var10]);
- ++var13;
- } else if (var3 != 1 && var3 != 2) {
- if (var3 == 3) {
- this.multi_level = true;
- this.specml_pn[var6] = var1[1][var10];
- this.specml_pd[var6] = var1[2][var10];
- this.specml_dv[var6] = var1[3][var10];
- this.specml_key[var6] = new Integer(var1[4][var10]);
- this.specml_x[var6] = new Integer(var1[5][var10]);
- ++var6;
- } else if (var3 == 4) {
- this.branch_level = true;
- this.branch_pn[var7] = var1[1][var10];
- this.branch_pd[var7] = var1[2][var10];
- this.branch_dv[var7] = var1[3][var10];
- this.branch_key[var7] = new Integer(var1[4][var10]);
- ++var7;
- } else if (var3 == 5) {
- this.level_level = true;
- this.level_pn[var8] = var1[1][var10];
- this.level_pd[var8] = var1[2][var10];
- this.level_dv[var8] = var1[3][var10];
- this.level_key[var8] = new Integer(var1[4][var10]);
- ++var8;
- } else if (var3 == 10) {
- this.icon_level = true;
- this.icon_pn[var9] = var1[1][var10];
- this.icon_pd[var9] = var1[2][var10];
- this.icon_dv[var9] = var1[3][var10];
- this.icon_key[var9] = new Integer(var1[4][var10]);
- ++var9;
- }
- } else {
- this.spec_pn[var5] = var1[1][var10];
- this.spec_pd[var5] = var1[2][var10];
- this.spec_dv[var5] = var1[3][var10];
- this.spec_key[var5] = new Integer(var1[4][var10]);
- this.spec_x[var5] = new Integer(var1[5][var10]);
- ++var5;
- }
- }
-
- if (!this.fileLoad) {
- String[] var14 = new String[this.spec_dv.length];
- System.arraycopy(this.spec_dv, 0, var14, 0, this.spec_dv.length);
- this.spec_params.addElement(var14);
- }
-
- if (this.multi_level) {
- this.cur_tree.addElement((new Integer(0)).toString());
- this.cur_tree.addElement((new Integer(0)).toString());
- }
-
- }
-
- public boolean hasAnyLevelBeenAdded() {
- String[] var1 = this.specml_params.valueLevelAt(this.cur_tree_level_nav);
- return var1 != null;
- }
-
- public void goToPrevLevel() {
- if (this.cur_tree_level_nav > 1) {
- this.cur_tree_level_nav += -1;
- }
-
- }
-
- private int goToNewSpecMLLevel() {
- String[] var1 = new String[this.specml_dv.length];
- var1 = new String[this.specml_dv.length];
- System.arraycopy(this.specml_dv, 0, var1, 0, this.specml_dv.length);
- var1[0] = this.specml_dv[0] + this.convertTree();
- this.specml_params.addItem(this.convertTree(), var1);
- return 0;
- }
-
- private void removeTreeLevel() {
- this.cur_tree.removeElementAt(this.cur_tree.size() - 1);
- }
-
- public String[] getIconParamDescs() {
- return this.icon_pd;
- }
-
- public int getMaxIndex() {
- return this.maxindex;
- }
-
- public String[] getSpecMLParamNames() {
- return this.specml_pn;
- }
-
- public String[] getBranchParamNames() {
- return this.branch_pn;
- }
-
- public int[] getIconKeys() {
- return this.icon_key;
- }
-
- public void resetAfterLoad() {
- this.cur_spec_index = 0;
- this.cur_tree = new Vector();
- this.cur_tree.addElement((new Integer(0)).toString());
- this.cur_tree.addElement((new Integer(0)).toString());
- String[] var2 = this.specml_params.getTreeIds();
-
- for(int var3 = 0; var3 < this.spec_params.size(); ++var3) {
- int var1 = 0;
-
- for(int var4 = 0; var4 < var2.length; ++var4) {
- if (var2[var4].startsWith(var3 + "-")) {
- ++var1;
- }
- }
- }
-
- this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
- }
-
- public void addSpecMLParam(String[] var1) {
- if (this.cur_tree_index < this.max_tree_index) {
- ++this.max_tree_index;
- this.cur_tree_index = this.max_tree_index;
- } else {
- ++this.cur_tree_index;
- this.max_tree_index = this.cur_tree_index;
- }
-
- this.setTreeIndex();
- var1[0] = this.specml_dv[0] + this.convertTree();
- this.specml_params.addItem(this.convertTree(), var1);
- }
-
- public String[] getLevelParam() {
- return this.specml_params.valueLevelAt(this.convertTree());
- }
-
- public int goToPrevSpecParam() {
- if (this.cur_spec_index > 0) {
- this.cur_spec_index += -1;
- if (this.multi_level) {
- this.resetTree(this.cur_spec_index);
- this.cur_tree_index = this.max_tree_index;
- }
- }
-
- return this.cur_spec_index;
- }
-
- public int goToLastSpecParam() {
- if (this.cur_spec_index < this.maxindex) {
- this.cur_spec_index = this.maxindex;
- if (this.multi_level) {
- this.resetTree(this.cur_spec_index);
- this.cur_tree_index = this.max_tree_index;
- }
- }
-
- return this.cur_spec_index;
- }
-
- public int goToSpecParam(int var1) {
- this.cur_spec_index = var1;
- if (this.multi_level) {
- this.resetTree(this.cur_spec_index);
- this.cur_tree_index = this.max_tree_index;
- }
-
- return this.cur_spec_index;
- }
-
- public int deleteSpecParam() {
- if (this.maxindex > -1) {
- this.spec_params.removeElementAt(this.cur_spec_index);
- if (this.cur_spec_index > -1) {
- if (this.multi_level) {
- this.specml_params.deleteSpecItem(this.cur_spec_index);
- this.resetTree(this.cur_spec_index);
- this.max_tree_level = this.specml_params.getMaxLevel();
- }
-
- if (this.cur_spec_index == 0 && this.maxindex == 0) {
- String[] var1 = new String[this.spec_dv.length];
- System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
- var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index)).toString();
- this.addSpecParam(var1);
- }
-
- if (this.cur_spec_index > 0 && this.cur_spec_index == this.maxindex) {
- this.cur_spec_index += -1;
- }
- }
-
- if (this.maxindex > 0) {
- this.maxindex += -1;
- }
- }
-
- return this.cur_spec_index;
- }
-
- public int insertSpecParam() {
- String[] var1 = new String[this.spec_dv.length];
- System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
- var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index)).toString();
- this.spec_params.insertElementAt(var1, this.cur_spec_index);
- ++this.maxindex;
- if (this.multi_level) {
- this.specml_params.insertSpecItem(this.cur_spec_index);
- }
-
- return this.cur_spec_index;
- }
-
- public int goToNextSpecMLParam() {
- if (this.cur_tree_index < this.max_tree_index) {
- ++this.cur_tree_index;
- }
-
- this.setTreeIndex();
- return this.cur_tree_index;
- }
-
- public void addSpecMLParamFFile(String var1, String[] var2) {
- if (this.cur_tree_index < this.max_tree_index) {
- ++this.max_tree_index;
- this.cur_tree_index = this.max_tree_index;
- } else {
- ++this.cur_tree_index;
- this.max_tree_index = this.cur_tree_index;
- }
-
- this.specml_params.addItem(var1, var2);
- }
- }
-