serverWidths = new int[5]; serverWidths[0] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "server", "column0", "width"})); serverWidths[1] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "server", "column1", "width"})); serverWidths[2] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "server", "column2", "width"})); serverWidths[3] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "server", "column3", "width"})); xmlTest = getFirstAttrbuteByTagName(new String[] {"options", "columns", "server", "column4", "width"}); if (xmlTest.length() == 0) { throw new Exception( "Properties.xml hat altes Format. Wird neu erstellt."); } serverWidths[4] = Integer.parseInt(xmlTest);  shareWidths = new int[3]; shareWidths[0] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "share", "column0", "width"})); shareWidths[1] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "share", "column1", "width"})); shareWidths[2] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "share", "column2", "width"}));  downloadVisibilities = new boolean[10]; downloadVisibilities[0] = true; xmlTest = getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column1", "visibility"}); if (xmlTest.length() == 0) { throw new Exception( "Properties.xml hat altes Format. Wird neu erstellt."); } downloadVisibilities[1] = new Boolean(xmlTest).booleanValue(); downloadVisibilities[2] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column2", "visibility"})).booleanValue(); downloadVisibilities[3] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column3", "visibility"})).booleanValue(); downloadVisibilities[4] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column4", "visibility"})).booleanValue(); downloadVisibilities[5] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column5", "visibility"})).booleanValue(); downloadVisibilities[6] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column6", "visibility"})).booleanValue(); downloadVisibilities[7] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column7", "visibility"})).booleanValue(); downloadVisibilities[8] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column8", "visibility"})).booleanValue(); downloadVisibilities[9] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column9", "visibility"})).booleanValue();  uploadVisibilities = new boolean[8]; uploadVisibilities[0] = true; uploadVisibilities[1] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column1", "visibility"})).booleanValue(); uploadVisibilities[2] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column2", "visibility"})).booleanValue(); uploadVisibilities[3] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column3", "visibility"})).booleanValue(); uploadVisibilities[4] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column4", "visibility"})).booleanValue(); uploadVisibilities[5] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column5", "visibility"})).booleanValue(); uploadVisibilities[6] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column6", "visibility"})).booleanValue(); uploadVisibilities[7] = new Boolean(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column7", "visibility"})).booleanValue();  downloadIndex = new int[10]; xmlTest = getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column0", "index"}); if (xmlTest.length() == 0) { throw new Exception( "Properties.xml hat altes Format. Wird neu erstellt."); } downloadIndex[0] = Integer.parseInt(xmlTest); downloadIndex[1] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column1", "index"})); downloadIndex[2] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column2", "index"})); downloadIndex[3] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column3", "index"})); downloadIndex[4] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column4", "index"})); downloadIndex[5] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column5", "index"})); downloadIndex[6] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column6", "index"})); downloadIndex[7] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column7", "index"})); downloadIndex[8] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column8", "index"})); downloadIndex[9] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "download", "column9", "index"}));  uploadIndex = new int[8]; uploadIndex[0] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column0", "index"})); uploadIndex[1] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column1", "index"})); uploadIndex[2] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column2", "index"})); uploadIndex[3] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column3", "index"})); uploadIndex[4] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column4", "index"})); uploadIndex[5] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column5", "index"})); uploadIndex[6] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column6", "index"})); uploadIndex[7] = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {"options", "columns", "upload", "column7", "index"})); boolean use = new Boolean(getFirstAttrbuteByTagName(new String[] { "options", "proxy", "use"})).booleanValue(); String host = getFirstAttrbuteByTagName(new String[] {"options", "proxy", "host"}); int port; try { port = Integer.parseInt(getFirstAttrbuteByTagName(new String[] { "options", "proxy", "port"})); } catch (Exception e) { port = -1; } String userpass = getFirstAttrbuteByTagName(new String[] {"options", "proxy", "userpass"}); proxySettings = new ProxySettings(use, host, port, userpass); } catch (Exception e) { if (logger.isEnabledFor(Level.ERROR)) { logger.error(PROPERTIES_ERROR_MESSAGE, e); } if (firstReadError == true) { AppleJuiceDialog.restorePropertiesXml(); AppleJuiceDialog.showInformation(PROPERTIES_ERROR); firstReadError = false; super.reload(PropertiesManager.path); init(); } else { AppleJuiceDialog.rewriteProperties = true; AppleJuiceDialog.closeWithErrormessage(PROPERTIES_ERROR, false); } } }
mainXY = new Point(mainX, mainY); int mainWidth = propertyHandler.getAsInt( "options_location_width").intValue(); int mainHeight = propertyHandler.getAsInt( "options_location_height").intValue(); mainDimension = new Dimension(mainWidth, mainHeight); } String xmlTest = propertyHandler .get("options_columns_download_column0_width"); if (xmlTest.length() == 0) { throw new Exception( "Properties.xml hat altes Format. Wird neu erstellt."); } downloadWidths = new int[10]; downloadWidths[0] = Integer.parseInt(xmlTest); for (int i = 1; i < downloadWidths.length; i++) { downloadWidths[i] = propertyHandler.getAsInt( "options_columns_download_column" + i + "_width") .intValue(); } uploadWidths = new int[8]; for (int i = 0; i < uploadWidths.length; i++) { uploadWidths[i] = propertyHandler.getAsInt( "options_columns_upload_column" + i + "_width") .intValue(); } serverWidths = new int[5]; for (int i = 0; i < serverWidths.length; i++) { serverWidths[i] = propertyHandler.getAsInt( "options_columns_server_column" + i + "_width") .intValue(); } shareWidths = new int[3]; for (int i = 0; i < shareWidths.length; i++) { shareWidths[i] = propertyHandler.getAsInt( "options_columns_share_column" + i + "_width") .intValue(); } downloadVisibilities = new boolean[10]; downloadVisibilities[0] = true; xmlTest = propertyHandler .get("options_columns_download_column1_visibility"); if (xmlTest.length() == 0) { throw new Exception( "Properties.xml hat altes Format. Wird neu erstellt."); } downloadVisibilities[1] = new Boolean(xmlTest).booleanValue(); for (int i = 2; i < downloadVisibilities.length; i++) { downloadVisibilities[i] = propertyHandler.getAsBoolean( "options_columns_download_column" + i + "_visibility") .booleanValue(); } uploadVisibilities = new boolean[8]; uploadVisibilities[0] = true; for (int i = 1; i < uploadVisibilities.length; i++) { uploadVisibilities[i] = propertyHandler.getAsBoolean( "options_columns_upload_column" + i + "_visibility") .booleanValue(); } downloadIndex = new int[10]; xmlTest = propertyHandler .get("options_columns_download_column0_index"); if (xmlTest.length() == 0) { throw new Exception( "Properties.xml hat altes Format. Wird neu erstellt."); } downloadIndex[0] = Integer.parseInt(xmlTest); for (int i = 1; i < downloadIndex.length; i++) { downloadIndex[i] = propertyHandler.getAsInt( "options_columns_download_column" + i + "_index") .intValue(); } uploadIndex = new int[8]; for (int i = 1; i < uploadIndex.length; i++) { uploadIndex[i] = propertyHandler.getAsInt( "options_columns_upload_column" + i + "_index") .intValue(); } boolean use = propertyHandler.getAsBoolean("options_proxy_use") .booleanValue(); int port; Integer tmp = propertyHandler.getAsInt("options_proxy_port"); if (tmp != null) { port = tmp.intValue(); } else { port = -1; } String userpass = propertyHandler.get("options_proxy_userpass"); String host = propertyHandler.get("options_proxy_host"); proxySettings = new ProxySettings(use, host, port, userpass); } catch (Exception e) { if (logger.isEnabledFor(Level.ERROR)) { logger.error(PROPERTIES_ERROR_MESSAGE, e); } if (firstReadError == true) { PropertiesManager.restoreProperties(); AppleJuiceDialog.showInformation(PROPERTIES_ERROR); firstReadError = false; init(); } else { AppleJuiceDialog.rewriteProperties = true; AppleJuiceDialog.closeWithErrormessage(PROPERTIES_ERROR, false); } } }
    protected void init() {        try {            if (isVeralteteXML()) {                throw new Exception(                    "Properties.xml hat altes Format. Wird neu erstellt.");            }            String temp = getFirstAttrbuteByTagName(new String[] {"options",                "location", "x"});            if (temp.length() != 0) {                legal = true;                int mainX = Integer.parseInt(getFirstAttrbuteByTagName(new                    String[] {"options", "location", "x"}));                int mainY = Integer.parseInt(getFirstAttrbuteByTagName(new                    String[] {"options", "location", "y"}));                mainXY = new Point(mainX, mainY);                int mainWidth = Integer.parseInt(getFirstAttrbuteByTagName(new                    String[] {"options", "location", "width"}));                int mainHeight = Integer.parseInt(getFirstAttrbuteByTagName(new                    String[] {"options", "location", "height"}));                mainDimension = new Dimension(mainWidth, mainHeight);            }            String xmlTest = getFirstAttrbuteByTagName(new String[] {"options",                "columns", "download", "column0", "width"});            if (xmlTest.length() == 0) {                throw new Exception(                    "Properties.xml hat altes Format. Wird neu erstellt.");            }            downloadWidths = new int[10];            downloadWidths[0] = Integer.parseInt(xmlTest);            downloadWidths[1] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column1", "width"}));            downloadWidths[2] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column2", "width"}));            downloadWidths[3] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column3", "width"}));            downloadWidths[4] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column4", "width"}));            downloadWidths[5] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column5", "width"}));            downloadWidths[6] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column6", "width"}));            downloadWidths[7] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column7", "width"}));            downloadWidths[8] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column8", "width"}));            downloadWidths[9] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column9", "width"}));            uploadWidths = new int[8];            uploadWidths[0] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column0", "width"}));            uploadWidths[1] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column1", "width"}));            uploadWidths[2] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column2", "width"}));            uploadWidths[3] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column3", "width"}));            uploadWidths[4] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column4", "width"}));            uploadWidths[5] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column5", "width"}));            uploadWidths[6] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column6", "width"}));            uploadWidths[7] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column7", "width"}));            serverWidths = new int[5];            serverWidths[0] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "server", "column0", "width"}));            serverWidths[1] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "server", "column1", "width"}));            serverWidths[2] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "server", "column2", "width"}));            serverWidths[3] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "server", "column3", "width"}));            xmlTest = getFirstAttrbuteByTagName(new String[] {"options",                                                "columns",                                                "server", "column4", "width"});            if (xmlTest.length() == 0) {                throw new Exception(                    "Properties.xml hat altes Format. Wird neu erstellt.");            }            serverWidths[4] = Integer.parseInt(xmlTest);            shareWidths = new int[3];            shareWidths[0] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "share", "column0", "width"}));            shareWidths[1] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "share", "column1", "width"}));            shareWidths[2] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "share", "column2", "width"}));            downloadVisibilities = new boolean[10];            downloadVisibilities[0] = true;            xmlTest = getFirstAttrbuteByTagName(new String[] {"options",                                                "columns", "download",                                                "column1", "visibility"});            if (xmlTest.length() == 0) {                throw new Exception(                    "Properties.xml hat altes Format. Wird neu erstellt.");            }            downloadVisibilities[1] = new Boolean(xmlTest).booleanValue();            downloadVisibilities[2] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column2",                "visibility"})).booleanValue();            downloadVisibilities[3] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column3",                "visibility"})).booleanValue();            downloadVisibilities[4] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column4",                "visibility"})).booleanValue();            downloadVisibilities[5] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column5",                "visibility"})).booleanValue();            downloadVisibilities[6] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column6",                "visibility"})).booleanValue();            downloadVisibilities[7] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column7",                "visibility"})).booleanValue();            downloadVisibilities[8] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column8",                "visibility"})).booleanValue();            downloadVisibilities[9] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column9",                "visibility"})).booleanValue();            uploadVisibilities = new boolean[8];            uploadVisibilities[0] = true;            uploadVisibilities[1] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column1",                "visibility"})).booleanValue();            uploadVisibilities[2] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column2",                "visibility"})).booleanValue();            uploadVisibilities[3] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column3",                "visibility"})).booleanValue();            uploadVisibilities[4] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column4",                "visibility"})).booleanValue();            uploadVisibilities[5] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column5",                "visibility"})).booleanValue();            uploadVisibilities[6] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column6",                "visibility"})).booleanValue();            uploadVisibilities[7] = new Boolean(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column7",                "visibility"})).booleanValue();            downloadIndex = new int[10];            xmlTest = getFirstAttrbuteByTagName(new String[] {"options",                                                "columns", "download",                                                "column0", "index"});            if (xmlTest.length() == 0) {                throw new Exception(                    "Properties.xml hat altes Format. Wird neu erstellt.");            }            downloadIndex[0] = Integer.parseInt(xmlTest);            downloadIndex[1] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column1", "index"}));            downloadIndex[2] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column2", "index"}));            downloadIndex[3] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column3", "index"}));            downloadIndex[4] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column4", "index"}));            downloadIndex[5] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column5", "index"}));            downloadIndex[6] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column6", "index"}));            downloadIndex[7] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column7", "index"}));            downloadIndex[8] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column8", "index"}));            downloadIndex[9] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "download", "column9", "index"}));            uploadIndex = new int[8];            uploadIndex[0] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column0", "index"}));            uploadIndex[1] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column1", "index"}));            uploadIndex[2] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column2", "index"}));            uploadIndex[3] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column3", "index"}));            uploadIndex[4] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column4", "index"}));            uploadIndex[5] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column5", "index"}));            uploadIndex[6] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column6", "index"}));            uploadIndex[7] = Integer.parseInt(getFirstAttrbuteByTagName(new                String[] {"options", "columns", "upload", "column7", "index"}));            boolean use = new Boolean(getFirstAttrbuteByTagName(new String[] {                "options", "proxy", "use"})).booleanValue();            String host = getFirstAttrbuteByTagName(new String[] {"options",                "proxy", "host"});            int port;            try {                port = Integer.parseInt(getFirstAttrbuteByTagName(new String[] {                    "options", "proxy", "port"}));            }            catch (Exception e) {                port = -1;            }            String userpass = getFirstAttrbuteByTagName(new String[] {"options",                "proxy", "userpass"});            proxySettings = new ProxySettings(use, host, port, userpass);        }        catch (Exception e) {            if (logger.isEnabledFor(Level.ERROR)) {                logger.error(PROPERTIES_ERROR_MESSAGE, e);            }            if (firstReadError == true) {                AppleJuiceDialog.restorePropertiesXml();                AppleJuiceDialog.showInformation(PROPERTIES_ERROR);                firstReadError = false;                super.reload(PropertiesManager.path);                init();            }            else {                AppleJuiceDialog.rewriteProperties = true;                AppleJuiceDialog.closeWithErrormessage(PROPERTIES_ERROR, false);            }        }    }