(BufferedReader bs, String datatype, int iVersion)
| 836 | } |
| 837 | |
| 838 | public void loadGeneralData(BufferedReader bs, String datatype, |
| 839 | int iVersion) { |
| 840 | try { |
| 841 | String tmpStr; |
| 842 | String nix = bs.readLine(); |
| 843 | // System.out.println("gendata:"+nix); |
| 844 | if (datatype.equals("complete") || datatype.equals("onlystyle")) { |
| 845 | lastUpVector = new PdVector(Double.parseDouble(bs.readLine()), |
| 846 | Double.parseDouble(bs.readLine()), Double |
| 847 | .parseDouble(bs.readLine())); |
| 848 | // System.out.println("lup:"+lastUpVector); |
| 849 | lastViewDir = new PdVector(Double.parseDouble(bs.readLine()), |
| 850 | Double.parseDouble(bs.readLine()), Double |
| 851 | .parseDouble(bs.readLine())); |
| 852 | lastPosition = new PdVector(Double.parseDouble(bs.readLine()), |
| 853 | Double.parseDouble(bs.readLine()), Double |
| 854 | .parseDouble(bs.readLine())); |
| 855 | lastInterest = new PdVector(Double.parseDouble(bs.readLine()), |
| 856 | Double.parseDouble(bs.readLine()), Double |
| 857 | .parseDouble(bs.readLine())); |
| 858 | jv4sx.setScale(Double.parseDouble(bs.readLine())); |
| 859 | project.setScale(jv4sx.getScale()); |
| 860 | tmpStr = bs.readLine(); |
| 861 | int cTmp = 0; |
| 862 | try{ |
| 863 | // test if the file contains a min/max info for the scale |
| 864 | cTmp = Integer.parseInt(tmpStr); |
| 865 | // System.out.println("int:"+cTmp); |
| 866 | } catch(Exception intEx) { |
| 867 | // System.out.println("no int:"+tmpStr); |
| 868 | double tmpD = project.getScale(); |
| 869 | try{ |
| 870 | jv4sx.setScaleMinMax(Double.parseDouble(tmpStr), |
| 871 | Double.parseDouble(bs.readLine())); |
| 872 | cTmp = Integer.parseInt(bs.readLine()); |
| 873 | } catch(Exception doubEx) { |
| 874 | System.out.println("ex:"+doubEx.toString()); |
| 875 | } |
| 876 | } |
| 877 | // System.out.println("scale:"+jv4sx.getScale()); |
| 878 | // System.out.println("scale:"+project.getScale()); |
| 879 | // lastScale = Double.parseDouble(bs.readLine()); |
| 880 | // project.scaleSlider.setValue((int) (lastScale * 100)); |
| 881 | // project.scaleSliderUpdated(); |
| 882 | project.bgColorButton.setBackground( |
| 883 | new Color(cTmp, |
| 884 | Integer.parseInt(bs.readLine()), |
| 885 | Integer.parseInt(bs.readLine()))); |
| 886 | project.antialiasing.setSelected( |
| 887 | (Boolean.valueOf(bs.readLine())).booleanValue()); |
| 888 | if(iVersion>=8907) { |
| 889 | project.clipMode.setSelectedIndex( |
| 890 | Integer.parseInt(bs.readLine())); |
| 891 | project.clipRadius.setText(bs.readLine()); |
| 892 | } |
| 893 | } else { |
| 894 | if (datatype.equals("specify")) { |
| 895 | String strline; |
no test coverage detected