// ===================================================== // private: setDatumJahrVonBis() // // <datum jahr-von="1998" jahr-bis="2007"/> // // ===================================================== private void setDateFromTo() { java.util.List result = new java.util.ArrayList(); // ----------------------------------------------------------------- // <datum> // ----------------------------------------------------------------- result = PM_XML_Utils.getElementListe(document, "//" + TAG_DATUM); if (result.size() == 1) { Element elDatum = (Element) result.get(0); datumJahrVon = PM_XML_Utils.getAttributeInt(elDatum, ATTR_DATUM_JAHR_VON); datumJahrBis = PM_XML_Utils.getAttributeInt(elDatum, ATTR_DATUM_JAHR_BIS); } }
// ===================================================== // private: setPreftch() // // <prefetch plus="2" minus="0"/> // // ===================================================== private void setPrefetch() { java.util.List result = new java.util.ArrayList(); // ----------------------------------------------------------------- // <datum> // ----------------------------------------------------------------- result = PM_XML_Utils.getElementListe(document, "//" + TAG_PREFETCH); if (result.size() == 1) { Element elPrefetch = (Element) result.get(0); prefetchPlus = PM_XML_Utils.getAttributeInt(elPrefetch, ATTR_PREFETCH_PLUS); prefetchMinus = PM_XML_Utils.getAttributeInt(elPrefetch, ATTR_PREFETCH_MINUS); } }
/** * Read all printer formats from config file. * * <pre> * <bild-format name="13 x 15" papier-format="F2" breite-mm="130" hoehe-mm="150" /> * </pre> */ private void setPrinterFormat() { PM_PictureFormatCollection instance = PM_PictureFormatCollection.getInstance(); List formatList = PM_XML_Utils.getElementListe(document, "//" + TAG_BILD_FORMAT); // loop over all tags for (Iterator itFormate = formatList.iterator(); itFormate.hasNext(); ) { Element format = (Element) itFormate.next(); String name = PM_XML_Utils.getAttribute(format, ATTR_FORMAT_NAME); String papierFormatString = PM_XML_Utils.getAttribute(format, ATTR_FORMAT_FORMAT); int breite = PM_XML_Utils.getAttributeInt(format, ATTR_FORMAT_BREITE); int hoehe = PM_XML_Utils.getAttributeInt(format, ATTR_FORMAT_HOEHE); PM_PaperFormat papierFormat = PM_PaperFormat.getPaperFormat(papierFormatString); if (papierFormat == null) { continue; } if (hoehe == 0 || breite == 0) continue; // unzul�ssige Eingaben instance.addBildFormat( new PM_PictureFormatFix(papierFormat, new Rectangle(breite, hoehe), name)); } }