home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 June / INTERNET92.ISO / pc / software / windows / building / visual_dhtml / visualdhtmlwin2000.exe / APInfo.___ (.txt) < prev    next >
Encoding:
Java Class File  |  2001-10-19  |  13.1 KB  |  967 lines

  1. import java.util.StringTokenizer;
  2. import java.util.Vector;
  3.  
  4. class APInfo {
  5.    public int defparamcount = 0;
  6.    public int specparamcount = 0;
  7.    public int mlparamcount = 0;
  8.    public int branchparamcount = 0;
  9.    public int levelparamcount = 0;
  10.    public int iconparamcount = 0;
  11.    private String[] def_params;
  12.    private Vector spec_params;
  13.    public MLparam specml_params;
  14.    public Vector icon_params;
  15.    private String[] def_dv;
  16.    private String[] spec_dv;
  17.    private String[] specml_dv;
  18.    private String[] branch_dv;
  19.    private String[] level_dv;
  20.    private String[] icon_dv;
  21.    private String[] def_pn;
  22.    private String[] spec_pn;
  23.    private String[] specml_pn;
  24.    private String[] branch_pn;
  25.    private String[] level_pn;
  26.    private String[] icon_pn;
  27.    private String[] def_pd;
  28.    private String[] spec_pd;
  29.    private String[] specml_pd;
  30.    private String[] branch_pd;
  31.    private String[] level_pd;
  32.    private String[] icon_pd;
  33.    private int[] def_key;
  34.    private int[] spec_key;
  35.    private int[] specml_key;
  36.    private int[] branch_key;
  37.    private int[] level_key;
  38.    private int[] icon_key;
  39.    public int[] spec_x;
  40.    public int[] specml_x;
  41.    public int cur_icon_index = 0;
  42.    public int cur_spec_index = 0;
  43.    public int maxindex = 0;
  44.    public int max_icon_index = 0;
  45.    private Vector cur_tree;
  46.    public int cur_tree_index = 0;
  47.    public int max_tree_index = 0;
  48.    public int cur_tree_level = 1;
  49.    public int cur_tree_level_nav = 1;
  50.    public int max_tree_level = 1;
  51.    public boolean multi_level = false;
  52.    public boolean branch_level = false;
  53.    public boolean level_level = false;
  54.    public boolean icon_level = false;
  55.    private boolean fileLoad;
  56.  
  57.    public void initBranchFromFile(String var1) {
  58.       if (!this.specml_params.isBranchItem(var1)) {
  59.          this.specml_params.addBranchItem(var1, this.branch_dv);
  60.       }
  61.  
  62.    }
  63.  
  64.    public void addBranchDataFromFile(String var1, String[] var2) {
  65.       this.specml_params.editBranchItemFromFile(var1, var2);
  66.    }
  67.  
  68.    public int[] getLevelKeys() {
  69.       return this.level_key;
  70.    }
  71.  
  72.    public String[] getLevelDefValues() {
  73.       String[] var1 = new String[this.level_dv.length];
  74.       System.arraycopy(this.level_dv, 0, var1, 0, this.level_dv.length);
  75.       return var1;
  76.    }
  77.  
  78.    public MLparam getSpecMLValues() {
  79.       return this.specml_params;
  80.    }
  81.  
  82.    public String convertTree() {
  83.       String var1 = "";
  84.  
  85.       for(int var2 = 0; var2 < this.cur_tree.size(); ++var2) {
  86.          if (var2 < this.cur_tree.size() - 1) {
  87.             var1 = var1 + (String)this.cur_tree.elementAt(var2) + "-";
  88.          } else {
  89.             var1 = var1 + (String)this.cur_tree.elementAt(var2);
  90.          }
  91.       }
  92.  
  93.       return var1;
  94.    }
  95.  
  96.    public void updateSpecMLParams(String[] var1) {
  97.       this.specml_params.editItem(this.convertTree(), var1);
  98.    }
  99.  
  100.    public void updateBranchParams(String[] var1) {
  101.       this.specml_params.editBranchItem(this.convertTree(), var1);
  102.    }
  103.  
  104.    public int goToNewSpecParamFF() {
  105.       String[] var1 = new String[this.spec_dv.length];
  106.       System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
  107.       var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index + 1)).toString();
  108.       this.addSpecParam(var1);
  109.       return this.cur_spec_index;
  110.    }
  111.  
  112.    public void resetTree(int var1) {
  113.       this.cur_tree_level = 1;
  114.       this.cur_tree_index = 0;
  115.       this.cur_tree = null;
  116.       this.cur_tree = new Vector();
  117.       this.cur_tree.addElement((new Integer(var1)).toString());
  118.       this.addTreeLevel();
  119.       this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
  120.    }
  121.  
  122.    public String[] getIconParamNames() {
  123.       return this.icon_pn;
  124.    }
  125.  
  126.    public void addInitialLevel() {
  127.       String[] var1 = this.specml_params.valueLevelAt(1);
  128.       if (var1 == null) {
  129.          var1 = new String[this.level_dv.length];
  130.          System.arraycopy(this.level_dv, 0, var1, 0, this.level_dv.length);
  131.          this.specml_params.addLevelItem(var1);
  132.       }
  133.  
  134.    }
  135.  
  136.    private void addTreeLevel() {
  137.       this.cur_tree.addElement((new Integer(0)).toString());
  138.    }
  139.  
  140.    public int goToNextSpecMLLevel() {
  141.       if (this.specml_params.isItem(this.convertTree() + "-0")) {
  142.          ++this.cur_tree_level;
  143.          this.addTreeLevel();
  144.          this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
  145.          this.cur_tree_index = this.max_tree_index;
  146.          this.setTreeIndex();
  147.       } else {
  148.          this.max_tree_index = 0;
  149.          this.cur_tree_index = 0;
  150.          ++this.cur_tree_level;
  151.          this.addTreeLevel();
  152.          this.goToNewSpecMLLevel();
  153.       }
  154.  
  155.       return this.cur_tree_level;
  156.    }
  157.  
  158.    private void setTreeIndex() {
  159.       this.cur_tree.setElementAt((new Integer(this.cur_tree_index)).toString(), this.cur_tree_level);
  160.    }
  161.  
  162.    public String[] getLevelParamDescs() {
  163.       return this.level_pd;
  164.    }
  165.  
  166.    private void setTreeIndexAtLevel(String var1, int var2) {
  167.       this.cur_tree.setElementAt(var1, var2);
  168.    }
  169.  
  170.    public void goToBranch() {
  171.       if (!this.specml_params.isBranchItem(this.convertTree())) {
  172.          this.specml_params.addBranchItem(this.convertTree(), this.branch_dv);
  173.       }
  174.  
  175.    }
  176.  
  177.    public int[] getDefKeys() {
  178.       return this.def_key;
  179.    }
  180.  
  181.    public int[] getSpecKeys() {
  182.       return this.spec_key;
  183.    }
  184.  
  185.    public void addIconParam(String[] var1) {
  186.       ++this.max_icon_index;
  187.       this.cur_icon_index = this.max_icon_index;
  188.       this.icon_params.addElement(var1);
  189.    }
  190.  
  191.    public int insertSpecMLParam() {
  192.       String[] var1 = new String[this.specml_dv.length];
  193.       System.arraycopy(this.specml_dv, 0, var1, 0, this.specml_dv.length);
  194.       var1[0] = this.specml_dv[0] + this.convertTree();
  195.       this.specml_params.insertMLItem(this.convertTree(), var1);
  196.       this.setTreeIndex();
  197.       ++this.max_tree_index;
  198.       return this.cur_tree_index;
  199.    }
  200.  
  201.    public String[] getSpecParam(int var1) {
  202.       return (String[])this.spec_params.elementAt(var1);
  203.    }
  204.  
  205.    public int goToFirstSpecParam() {
  206.       if (this.cur_spec_index > 0) {
  207.          this.cur_spec_index = 0;
  208.          if (this.multi_level) {
  209.             this.resetTree(this.cur_spec_index);
  210.             this.cur_tree_index = this.max_tree_index;
  211.          }
  212.       }
  213.  
  214.       return this.cur_spec_index;
  215.    }
  216.  
  217.    public int goToNewSpecParam() {
  218.       String[] var1 = new String[this.spec_dv.length];
  219.       System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
  220.       var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index + 1)).toString();
  221.       this.addSpecParam(var1);
  222.       return this.cur_spec_index;
  223.    }
  224.  
  225.    public int goToNextIconParam() {
  226.       if (this.cur_icon_index < this.max_icon_index) {
  227.          ++this.cur_icon_index;
  228.       }
  229.  
  230.       return this.cur_icon_index;
  231.    }
  232.  
  233.    public int goToPrevSpecMLParam() {
  234.       if (this.cur_tree_index > 0) {
  235.          this.cur_tree_index += -1;
  236.       }
  237.  
  238.       this.setTreeIndex();
  239.       return this.cur_tree_index;
  240.    }
  241.  
  242.    public int goToLastSpecMLParam() {
  243.       if (this.cur_tree_index < this.max_tree_index) {
  244.          this.cur_tree_index = this.max_tree_index;
  245.       }
  246.  
  247.       this.setTreeIndex();
  248.       return this.cur_tree_index;
  249.    }
  250.  
  251.    public void addLevelFromFile(String[] var1) {
  252.       this.specml_params.addLevelItem(var1);
  253.       ++this.max_tree_level;
  254.    }
  255.  
  256.    public int goToSpecMLParam(int var1) {
  257.       this.cur_tree_index = var1;
  258.       this.setTreeIndex();
  259.       return this.cur_tree_index;
  260.    }
  261.  
  262.    public int deleteSpecMLParam() {
  263.       if (this.max_tree_index > 0) {
  264.          this.specml_params.deleteMLItem(this.convertTree());
  265.          this.max_tree_index += -1;
  266.          this.max_tree_level = this.specml_params.getMaxLevel();
  267.          if (this.cur_tree_index > this.max_tree_index) {
  268.             this.goToPrevSpecMLParam();
  269.          }
  270.       } else if (this.cur_tree_level > 1) {
  271.          this.specml_params.deleteMLItem(this.convertTree());
  272.          this.max_tree_level = this.specml_params.getMaxLevel(this.cur_spec_index);
  273.          this.goToPrevSpecMLLevel();
  274.          this.goToBranch();
  275.       } else {
  276.          this.specml_params.deleteMLItem(this.convertTree());
  277.          this.max_tree_level = this.specml_params.getMaxLevel();
  278.       }
  279.  
  280.       return this.cur_tree_index;
  281.    }
  282.  
  283.    public String[] getDefDefValues() {
  284.       return this.def_dv;
  285.    }
  286.  
  287.    public String[] getSpecDefValues() {
  288.       String[] var1 = new String[this.spec_dv.length];
  289.       System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
  290.       var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index)).toString();
  291.       return var1;
  292.    }
  293.  
  294.    public Vector getIconValues() {
  295.       return this.icon_params;
  296.    }
  297.  
  298.    public void updateIconParams(String[] var1) {
  299.       this.icon_params.setElementAt(var1, this.cur_icon_index);
  300.    }
  301.  
  302.    public int getMaxLevelParams() {
  303.       return this.specml_params.getLevelDataCouunt();
  304.    }
  305.  
  306.    public int goToFirstSpecMLParamOrNew() {
  307.       this.getSpecMLOneValues();
  308.       if (this.branch_level) {
  309.          this.getBranchOneValues();
  310.       }
  311.  
  312.       this.cur_tree_level = 1;
  313.       this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
  314.       this.cur_tree_index = this.max_tree_index;
  315.       this.setTreeIndex();
  316.       return this.cur_tree_index;
  317.    }
  318.  
  319.    public void updateLevelParams(String[] var1) {
  320.       this.specml_params.editLevelItem(this.cur_tree_level_nav, var1);
  321.    }
  322.  
  323.    public MLparam getMLparamObject() {
  324.       return this.specml_params;
  325.    }
  326.  
  327.    public String[] getLevelParamNames() {
  328.       return this.level_pn;
  329.    }
  330.  
  331.    public boolean hasAnySpecMLBeenAdded() {
  332.       String[] var1 = this.specml_params.valueAt(this.convertTree());
  333.       return var1 != null;
  334.    }
  335.  
  336.    public boolean hasAnyBranchBeenAdded() {
  337.       if (this.branch_level) {
  338.          String[] var1 = this.specml_params.valueBranchAt(this.convertTree());
  339.          if (var1 != null) {
  340.             return true;
  341.          }
  342.       }
  343.  
  344.       return false;
  345.    }
  346.  
  347.    public void checkLevel() {
  348.       if (!this.specml_params.isLevelItem(this.cur_tree_level)) {
  349.          String[] var1 = new String[this.level_dv.length];
  350.          System.arraycopy(this.level_dv, 0, var1, 0, this.level_dv.length);
  351.          this.specml_params.addLevelItem(var1);
  352.          ++this.max_tree_level;
  353.       }
  354.  
  355.    }
  356.  
  357.    public void goToNextLevel() {
  358.       if (this.cur_tree_level_nav < this.max_tree_level) {
  359.          ++this.cur_tree_level_nav;
  360.       }
  361.  
  362.    }
  363.  
  364.    public int goToSpecMLLevel(int var1, String var2, int var3) {
  365.       StringTokenizer var4 = new StringTokenizer(var2, "-");
  366.       var4.nextToken();
  367.  
  368.       for(int var5 = 1; var4.hasMoreTokens(); ++var5) {
  369.          String var6 = var4.nextToken();
  370.          this.setTreeIndexAtLevel(var6, var5);
  371.       }
  372.  
  373.       if (this.cur_tree_level != var1) {
  374.          if (this.cur_tree_level < var1) {
  375.             for(int var7 = this.cur_tree_level + 1; var7 <= var1; ++var7) {
  376.                this.goToNextSpecMLLevel();
  377.             }
  378.          } else if (this.cur_tree_level > var1) {
  379.             for(int var8 = this.cur_tree_level; var8 > var1; --var8) {
  380.                this.goToPrevSpecMLLevel();
  381.             }
  382.          }
  383.       }
  384.  
  385.       this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
  386.       if (var3 > -1) {
  387.          this.cur_tree_index = var3;
  388.       } else {
  389.          this.cur_tree_index = this.max_tree_index;
  390.       }
  391.  
  392.       this.setTreeIndex();
  393.       return this.cur_tree_level;
  394.    }
  395.  
  396.    public int goToPrevSpecMLLevel() {
  397.       this.cur_tree_level += -1;
  398.       this.cur_tree_index = this.getLastTreeLevelIndex();
  399.       this.removeTreeLevel();
  400.       this.setTreeIndex();
  401.       this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
  402.       return this.cur_tree_level;
  403.    }
  404.  
  405.    public String[] getSpecMLParam() {
  406.       return this.specml_params.valueAt(this.convertTree());
  407.    }
  408.  
  409.    public String[] getDefParamDescs() {
  410.       return this.def_pd;
  411.    }
  412.  
  413.    public String[] getSpecParamDescs() {
  414.       return this.spec_pd;
  415.    }
  416.  
  417.    public String[] getBranchParam() {
  418.       return this.specml_params.valueBranchAt(this.convertTree());
  419.    }
  420.  
  421.    public int goToPrevIconParam() {
  422.       if (this.cur_icon_index > 0) {
  423.          this.cur_icon_index += -1;
  424.       }
  425.  
  426.       return this.cur_icon_index;
  427.    }
  428.  
  429.    public int goToLastIconParam() {
  430.       if (this.cur_icon_index < this.max_icon_index) {
  431.          this.cur_icon_index = this.max_icon_index;
  432.       }
  433.  
  434.       return this.cur_icon_index;
  435.    }
  436.  
  437.    public int goToIconParam(int var1) {
  438.       this.cur_icon_index = var1;
  439.       return this.cur_icon_index;
  440.    }
  441.  
  442.    public String[] getDefParamNames() {
  443.       return this.def_pn;
  444.    }
  445.  
  446.    public String[] getSpecParamNames() {
  447.       return this.spec_pn;
  448.    }
  449.  
  450.    public int deleteIconParam() {
  451.       if (this.max_icon_index > -1) {
  452.          this.icon_params.removeElementAt(this.cur_icon_index);
  453.          if (this.cur_icon_index > -1) {
  454.             if (this.cur_icon_index == 0 && this.max_icon_index == 0) {
  455.                String[] var1 = new String[this.icon_dv.length];
  456.                System.arraycopy(this.icon_dv, 0, var1, 0, this.icon_dv.length);
  457.                var1[0] = this.icon_dv[0] + (new Integer(this.cur_icon_index)).toString();
  458.                this.addIconParam(var1);
  459.             }
  460.  
  461.             if (this.cur_icon_index > 0 && this.cur_icon_index == this.max_icon_index) {
  462.                this.cur_icon_index += -1;
  463.             }
  464.          }
  465.  
  466.          if (this.max_icon_index > 0) {
  467.             this.max_icon_index += -1;
  468.          }
  469.       }
  470.  
  471.       return this.cur_icon_index;
  472.    }
  473.  
  474.    public int insertIconParam() {
  475.       String[] var1 = new String[this.icon_dv.length];
  476.       System.arraycopy(this.icon_dv, 0, var1, 0, this.icon_dv.length);
  477.       var1[0] = this.icon_dv[0] + (new Integer(this.cur_icon_index)).toString();
  478.       this.icon_params.insertElementAt(var1, this.cur_icon_index);
  479.       ++this.max_icon_index;
  480.       return this.cur_icon_index;
  481.    }
  482.  
  483.    public int goToFirstSpecMLParam() {
  484.       if (this.cur_tree_index > 0) {
  485.          this.cur_tree_index = 0;
  486.       }
  487.  
  488.       this.setTreeIndex();
  489.       return this.cur_tree_index;
  490.    }
  491.  
  492.    public int[] getSpecMLKeys() {
  493.       return this.specml_key;
  494.    }
  495.  
  496.    public int[] getBranchKeys() {
  497.       return this.branch_key;
  498.    }
  499.  
  500.    public String getDefValue(String var1) {
  501.       for(int var2 = 0; var2 < this.defparamcount; ++var2) {
  502.          if (var1.equalsIgnoreCase(this.def_pd[var2])) {
  503.             return this.def_params[var2];
  504.          }
  505.       }
  506.  
  507.       return "-1";
  508.    }
  509.  
  510.    public int goToNewSpecMLParam() {
  511.       String[] var1 = new String[this.specml_dv.length];
  512.       System.arraycopy(this.specml_dv, 0, var1, 0, this.specml_dv.length);
  513.       this.addSpecMLParam(var1);
  514.       return this.cur_tree_index;
  515.    }
  516.  
  517.    private int getLastTreeLevelIndex() {
  518.       return Integer.parseInt((String)this.cur_tree.elementAt(this.cur_tree.size() - 2));
  519.    }
  520.  
  521.    public void addSpecParam(String[] var1) {
  522.       ++this.maxindex;
  523.       this.cur_spec_index = this.maxindex;
  524.       if (this.multi_level) {
  525.          this.resetTree(this.cur_spec_index);
  526.       }
  527.  
  528.       this.spec_params.addElement(var1);
  529.    }
  530.  
  531.    public String[] getSpecMLParamDescs() {
  532.       return this.specml_pd;
  533.    }
  534.  
  535.    public String[] getBranchParamDescs() {
  536.       return this.branch_pd;
  537.    }
  538.  
  539.    public String[] getIconParam() {
  540.       return (String[])this.icon_params.elementAt(this.cur_icon_index);
  541.    }
  542.  
  543.    public String[] getIconParam(int var1) {
  544.       return var1 < this.icon_params.size() ? (String[])this.icon_params.elementAt(var1) : null;
  545.    }
  546.  
  547.    public int goToNextSpecParam() {
  548.       if (this.cur_spec_index < this.maxindex) {
  549.          ++this.cur_spec_index;
  550.          if (this.multi_level) {
  551.             this.resetTree(this.cur_spec_index);
  552.             this.cur_tree_index = this.max_tree_index;
  553.          }
  554.       }
  555.  
  556.       return this.cur_spec_index;
  557.    }
  558.  
  559.    public int goToFirstIconParam() {
  560.       if (this.cur_icon_index > 0) {
  561.          this.cur_icon_index = 0;
  562.       }
  563.  
  564.       return this.cur_icon_index;
  565.    }
  566.  
  567.    public int goToNewIconParam() {
  568.       if (!((String[])this.icon_params.elementAt(this.max_icon_index))[0].equals("")) {
  569.          String[] var1 = new String[this.icon_dv.length];
  570.          System.arraycopy(this.icon_dv, 0, var1, 0, this.icon_dv.length);
  571.          var1[0] = this.icon_dv[0] + (new Integer(this.max_icon_index + 1)).toString();
  572.          this.addIconParam(var1);
  573.       } else {
  574.          this.goToLastIconParam();
  575.       }
  576.  
  577.       return this.cur_icon_index;
  578.    }
  579.  
  580.    public String[] getSpecMLDefValues() {
  581.       return this.specml_dv;
  582.    }
  583.  
  584.    public String[] getBranchDefValues() {
  585.       return this.branch_dv;
  586.    }
  587.  
  588.    public String[] getSpecMLOneValues() {
  589.       String[] var1 = this.specml_params.valueAt(this.convertTree());
  590.       if (var1 == null) {
  591.          var1 = new String[this.specml_dv.length];
  592.          System.arraycopy(this.specml_dv, 0, var1, 0, this.specml_dv.length);
  593.          var1[0] = this.specml_dv[0] + this.convertTree();
  594.          this.specml_params.addItem(this.convertTree(), var1);
  595.          return var1;
  596.       } else {
  597.          return var1;
  598.       }
  599.    }
  600.  
  601.    public String[] getBranchOneValues() {
  602.       String[] var1 = this.specml_params.valueBranchAt(this.convertTree());
  603.       if (var1 == null) {
  604.          var1 = new String[this.branch_dv.length];
  605.          System.arraycopy(this.branch_dv, 0, var1, 0, this.branch_dv.length);
  606.          this.specml_params.addBranchItem(this.convertTree(), var1);
  607.          return var1;
  608.       } else {
  609.          return var1;
  610.       }
  611.    }
  612.  
  613.    public String[] getLevelValues() {
  614.       return this.specml_params.valueLevelAt(this.cur_tree_level_nav);
  615.    }
  616.  
  617.    public String[] getIconDefValues() {
  618.       String[] var1 = new String[this.icon_dv.length];
  619.       System.arraycopy(this.icon_dv, 0, var1, 0, this.icon_dv.length);
  620.       var1[0] = this.icon_dv[0] + (new Integer(this.cur_icon_index)).toString();
  621.       return var1;
  622.    }
  623.  
  624.    public String[] getDefValues() {
  625.       return this.def_params;
  626.    }
  627.  
  628.    public Vector getSpecValues() {
  629.       return this.spec_params;
  630.    }
  631.  
  632.    public String[] getIconOneValues() {
  633.       Object var1 = null;
  634.       if (this.icon_params.size() < 1) {
  635.          String[] var3 = new String[this.icon_dv.length];
  636.          System.arraycopy(this.icon_dv, 0, var3, 0, this.icon_dv.length);
  637.          var3[0] = this.icon_dv[0] + this.cur_icon_index;
  638.          this.icon_params.addElement(var3);
  639.          return var3;
  640.       } else {
  641.          String[] var2 = (String[])this.icon_params.elementAt(this.cur_icon_index);
  642.          return var2;
  643.       }
  644.    }
  645.  
  646.    public void updateDefParams(String[] var1) {
  647.       this.def_params = var1;
  648.    }
  649.  
  650.    public void updateSpecParams(String[] var1) {
  651.       this.spec_params.setElementAt(var1, this.cur_spec_index);
  652.    }
  653.  
  654.    public int getNumDefinedTreeParams() {
  655.       return this.specml_params.getNumDefinedTreeParams();
  656.    }
  657.  
  658.    public APInfo(String[][] var1, boolean var2) {
  659.       this.fileLoad = var2;
  660.       if (this.fileLoad) {
  661.          this.maxindex = -1;
  662.          this.cur_spec_index = -1;
  663.       }
  664.  
  665.       this.spec_params = new Vector();
  666.       this.icon_params = new Vector();
  667.       int var3 = 0;
  668.       this.cur_tree = new Vector();
  669.       this.specml_params = new MLparam(this);
  670.  
  671.       for(int var4 = 0; var4 < var1[0].length; ++var4) {
  672.          var3 = Integer.parseInt(var1[0][var4]);
  673.          if (var3 == 0) {
  674.             ++this.defparamcount;
  675.          } else if (var3 != 1 && var3 != 2) {
  676.             if (var3 == 3) {
  677.                ++this.mlparamcount;
  678.             } else if (var3 == 4) {
  679.                ++this.branchparamcount;
  680.             } else if (var3 == 5) {
  681.                ++this.levelparamcount;
  682.             } else if (var3 == 10) {
  683.                ++this.iconparamcount;
  684.             }
  685.          } else {
  686.             ++this.specparamcount;
  687.          }
  688.       }
  689.  
  690.       this.def_pd = new String[this.defparamcount];
  691.       this.spec_pd = new String[this.specparamcount];
  692.       this.specml_pd = new String[this.mlparamcount];
  693.       this.branch_pd = new String[this.branchparamcount];
  694.       this.level_pd = new String[this.levelparamcount];
  695.       this.icon_pd = new String[this.iconparamcount];
  696.       this.def_pn = new String[this.defparamcount];
  697.       this.spec_pn = new String[this.specparamcount];
  698.       this.specml_pn = new String[this.mlparamcount];
  699.       this.branch_pn = new String[this.branchparamcount];
  700.       this.level_pn = new String[this.levelparamcount];
  701.       this.icon_pn = new String[this.iconparamcount];
  702.       this.def_key = new int[this.defparamcount];
  703.       this.spec_key = new int[this.specparamcount];
  704.       this.specml_key = new int[this.mlparamcount];
  705.       this.branch_key = new int[this.branchparamcount];
  706.       this.level_key = new int[this.levelparamcount];
  707.       this.icon_key = new int[this.iconparamcount];
  708.       this.def_dv = new String[this.defparamcount];
  709.       this.spec_dv = new String[this.specparamcount];
  710.       this.specml_dv = new String[this.mlparamcount];
  711.       this.branch_dv = new String[this.branchparamcount];
  712.       this.level_dv = new String[this.levelparamcount];
  713.       this.icon_dv = new String[this.iconparamcount];
  714.       this.spec_x = new int[this.specparamcount];
  715.       this.specml_x = new int[this.mlparamcount];
  716.       this.def_params = new String[this.defparamcount];
  717.       int var13 = 0;
  718.       int var5 = 0;
  719.       int var6 = 0;
  720.       int var7 = 0;
  721.       int var8 = 0;
  722.       int var9 = 0;
  723.  
  724.       for(int var10 = 0; var10 < var1[0].length; ++var10) {
  725.          var3 = Integer.parseInt(var1[0][var10]);
  726.          if (var3 == 0) {
  727.             this.def_pn[var13] = var1[1][var10];
  728.             this.def_pd[var13] = var1[2][var10];
  729.             this.def_dv[var13] = var1[3][var10];
  730.             this.def_key[var13] = new Integer(var1[4][var10]);
  731.             ++var13;
  732.          } else if (var3 != 1 && var3 != 2) {
  733.             if (var3 == 3) {
  734.                this.multi_level = true;
  735.                this.specml_pn[var6] = var1[1][var10];
  736.                this.specml_pd[var6] = var1[2][var10];
  737.                this.specml_dv[var6] = var1[3][var10];
  738.                this.specml_key[var6] = new Integer(var1[4][var10]);
  739.                this.specml_x[var6] = new Integer(var1[5][var10]);
  740.                ++var6;
  741.             } else if (var3 == 4) {
  742.                this.branch_level = true;
  743.                this.branch_pn[var7] = var1[1][var10];
  744.                this.branch_pd[var7] = var1[2][var10];
  745.                this.branch_dv[var7] = var1[3][var10];
  746.                this.branch_key[var7] = new Integer(var1[4][var10]);
  747.                ++var7;
  748.             } else if (var3 == 5) {
  749.                this.level_level = true;
  750.                this.level_pn[var8] = var1[1][var10];
  751.                this.level_pd[var8] = var1[2][var10];
  752.                this.level_dv[var8] = var1[3][var10];
  753.                this.level_key[var8] = new Integer(var1[4][var10]);
  754.                ++var8;
  755.             } else if (var3 == 10) {
  756.                this.icon_level = true;
  757.                this.icon_pn[var9] = var1[1][var10];
  758.                this.icon_pd[var9] = var1[2][var10];
  759.                this.icon_dv[var9] = var1[3][var10];
  760.                this.icon_key[var9] = new Integer(var1[4][var10]);
  761.                ++var9;
  762.             }
  763.          } else {
  764.             this.spec_pn[var5] = var1[1][var10];
  765.             this.spec_pd[var5] = var1[2][var10];
  766.             this.spec_dv[var5] = var1[3][var10];
  767.             this.spec_key[var5] = new Integer(var1[4][var10]);
  768.             this.spec_x[var5] = new Integer(var1[5][var10]);
  769.             ++var5;
  770.          }
  771.       }
  772.  
  773.       if (!this.fileLoad) {
  774.          String[] var14 = new String[this.spec_dv.length];
  775.          System.arraycopy(this.spec_dv, 0, var14, 0, this.spec_dv.length);
  776.          this.spec_params.addElement(var14);
  777.       }
  778.  
  779.       if (this.multi_level) {
  780.          this.cur_tree.addElement((new Integer(0)).toString());
  781.          this.cur_tree.addElement((new Integer(0)).toString());
  782.       }
  783.  
  784.    }
  785.  
  786.    public boolean hasAnyLevelBeenAdded() {
  787.       String[] var1 = this.specml_params.valueLevelAt(this.cur_tree_level_nav);
  788.       return var1 != null;
  789.    }
  790.  
  791.    public void goToPrevLevel() {
  792.       if (this.cur_tree_level_nav > 1) {
  793.          this.cur_tree_level_nav += -1;
  794.       }
  795.  
  796.    }
  797.  
  798.    private int goToNewSpecMLLevel() {
  799.       String[] var1 = new String[this.specml_dv.length];
  800.       var1 = new String[this.specml_dv.length];
  801.       System.arraycopy(this.specml_dv, 0, var1, 0, this.specml_dv.length);
  802.       var1[0] = this.specml_dv[0] + this.convertTree();
  803.       this.specml_params.addItem(this.convertTree(), var1);
  804.       return 0;
  805.    }
  806.  
  807.    private void removeTreeLevel() {
  808.       this.cur_tree.removeElementAt(this.cur_tree.size() - 1);
  809.    }
  810.  
  811.    public String[] getIconParamDescs() {
  812.       return this.icon_pd;
  813.    }
  814.  
  815.    public int getMaxIndex() {
  816.       return this.maxindex;
  817.    }
  818.  
  819.    public String[] getSpecMLParamNames() {
  820.       return this.specml_pn;
  821.    }
  822.  
  823.    public String[] getBranchParamNames() {
  824.       return this.branch_pn;
  825.    }
  826.  
  827.    public int[] getIconKeys() {
  828.       return this.icon_key;
  829.    }
  830.  
  831.    public void resetAfterLoad() {
  832.       this.cur_spec_index = 0;
  833.       this.cur_tree = new Vector();
  834.       this.cur_tree.addElement((new Integer(0)).toString());
  835.       this.cur_tree.addElement((new Integer(0)).toString());
  836.       String[] var2 = this.specml_params.getTreeIds();
  837.  
  838.       for(int var3 = 0; var3 < this.spec_params.size(); ++var3) {
  839.          int var1 = 0;
  840.  
  841.          for(int var4 = 0; var4 < var2.length; ++var4) {
  842.             if (var2[var4].startsWith(var3 + "-")) {
  843.                ++var1;
  844.             }
  845.          }
  846.       }
  847.  
  848.       this.max_tree_index = this.specml_params.getMaxIndex(this.convertTree());
  849.    }
  850.  
  851.    public void addSpecMLParam(String[] var1) {
  852.       if (this.cur_tree_index < this.max_tree_index) {
  853.          ++this.max_tree_index;
  854.          this.cur_tree_index = this.max_tree_index;
  855.       } else {
  856.          ++this.cur_tree_index;
  857.          this.max_tree_index = this.cur_tree_index;
  858.       }
  859.  
  860.       this.setTreeIndex();
  861.       var1[0] = this.specml_dv[0] + this.convertTree();
  862.       this.specml_params.addItem(this.convertTree(), var1);
  863.    }
  864.  
  865.    public String[] getLevelParam() {
  866.       return this.specml_params.valueLevelAt(this.convertTree());
  867.    }
  868.  
  869.    public int goToPrevSpecParam() {
  870.       if (this.cur_spec_index > 0) {
  871.          this.cur_spec_index += -1;
  872.          if (this.multi_level) {
  873.             this.resetTree(this.cur_spec_index);
  874.             this.cur_tree_index = this.max_tree_index;
  875.          }
  876.       }
  877.  
  878.       return this.cur_spec_index;
  879.    }
  880.  
  881.    public int goToLastSpecParam() {
  882.       if (this.cur_spec_index < this.maxindex) {
  883.          this.cur_spec_index = this.maxindex;
  884.          if (this.multi_level) {
  885.             this.resetTree(this.cur_spec_index);
  886.             this.cur_tree_index = this.max_tree_index;
  887.          }
  888.       }
  889.  
  890.       return this.cur_spec_index;
  891.    }
  892.  
  893.    public int goToSpecParam(int var1) {
  894.       this.cur_spec_index = var1;
  895.       if (this.multi_level) {
  896.          this.resetTree(this.cur_spec_index);
  897.          this.cur_tree_index = this.max_tree_index;
  898.       }
  899.  
  900.       return this.cur_spec_index;
  901.    }
  902.  
  903.    public int deleteSpecParam() {
  904.       if (this.maxindex > -1) {
  905.          this.spec_params.removeElementAt(this.cur_spec_index);
  906.          if (this.cur_spec_index > -1) {
  907.             if (this.multi_level) {
  908.                this.specml_params.deleteSpecItem(this.cur_spec_index);
  909.                this.resetTree(this.cur_spec_index);
  910.                this.max_tree_level = this.specml_params.getMaxLevel();
  911.             }
  912.  
  913.             if (this.cur_spec_index == 0 && this.maxindex == 0) {
  914.                String[] var1 = new String[this.spec_dv.length];
  915.                System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
  916.                var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index)).toString();
  917.                this.addSpecParam(var1);
  918.             }
  919.  
  920.             if (this.cur_spec_index > 0 && this.cur_spec_index == this.maxindex) {
  921.                this.cur_spec_index += -1;
  922.             }
  923.          }
  924.  
  925.          if (this.maxindex > 0) {
  926.             this.maxindex += -1;
  927.          }
  928.       }
  929.  
  930.       return this.cur_spec_index;
  931.    }
  932.  
  933.    public int insertSpecParam() {
  934.       String[] var1 = new String[this.spec_dv.length];
  935.       System.arraycopy(this.spec_dv, 0, var1, 0, this.spec_dv.length);
  936.       var1[0] = this.spec_dv[0] + (new Integer(this.cur_spec_index)).toString();
  937.       this.spec_params.insertElementAt(var1, this.cur_spec_index);
  938.       ++this.maxindex;
  939.       if (this.multi_level) {
  940.          this.specml_params.insertSpecItem(this.cur_spec_index);
  941.       }
  942.  
  943.       return this.cur_spec_index;
  944.    }
  945.  
  946.    public int goToNextSpecMLParam() {
  947.       if (this.cur_tree_index < this.max_tree_index) {
  948.          ++this.cur_tree_index;
  949.       }
  950.  
  951.       this.setTreeIndex();
  952.       return this.cur_tree_index;
  953.    }
  954.  
  955.    public void addSpecMLParamFFile(String var1, String[] var2) {
  956.       if (this.cur_tree_index < this.max_tree_index) {
  957.          ++this.max_tree_index;
  958.          this.cur_tree_index = this.max_tree_index;
  959.       } else {
  960.          ++this.cur_tree_index;
  961.          this.max_tree_index = this.cur_tree_index;
  962.       }
  963.  
  964.       this.specml_params.addItem(var1, var2);
  965.    }
  966. }
  967.