report.java

来自「优秀的打印控件全源代码,类似水晶表的设计器!」· Java 代码 · 共 1,537 行 · 第 1/5 页

JAVA
1,537
字号
				if (subNodeAttributes.getNamedItem("reportFont") != null) {										IReportFont baseFont = null;					re.setReportFont(subNodeAttributes.getNamedItem("reportFont").getNodeValue());					for (int fn =0; fn < this.fonts.size(); ++fn) {						baseFont = (IReportFont)this.fonts.elementAt(fn);						if (baseFont != null && baseFont.getReportFont().equals(re.getReportFont())) {							break;						}						else							baseFont = null;					}					if (baseFont != null) {						re.setFontSize(baseFont.getFontSize());						re.setFontName(baseFont.getFontName());						re.setPDFFontName( baseFont.getPDFFontName());						re.setPdfEncoding( baseFont.getPdfEncoding());						re.setPdfEmbedded( baseFont.isPdfEmbedded());						re.setBold(baseFont.isBold()) ;						re.setItalic( baseFont.isItalic());						re.setStrikeTrought(baseFont.isStrikeTrought());						re.setUnderline(baseFont.isUnderline());					}else{												//using default font						re.setFontSize(defaultFont.getFontSize());						re.setFontName(defaultFont.getFontName());						re.setPDFFontName( defaultFont.getPDFFontName());						re.setPdfEncoding( defaultFont.getPdfEncoding());						re.setPdfEmbedded( defaultFont.isPdfEmbedded());						re.setBold(defaultFont.isBold()) ;						re.setItalic(defaultFont.isItalic());						re.setStrikeTrought(defaultFont.isStrikeTrought());						re.setUnderline(defaultFont.isUnderline());					}									}				if (subNodeAttributes.getNamedItem("fontName") != null)					re.setFontName(subNodeAttributes.getNamedItem("fontName").getNodeValue());				if (subNodeAttributes.getNamedItem("pdfFontName") != null)					re.setPDFFontName(subNodeAttributes.getNamedItem("pdfFontName").getNodeValue());				if (subNodeAttributes.getNamedItem("size") != null)					re.setFontSize( Integer.parseInt(""+subNodeAttributes.getNamedItem("size").getNodeValue()) );				if (subNodeAttributes.getNamedItem("isBold") != null)					re.setBold( (new String(""+subNodeAttributes.getNamedItem("isBold").getNodeValue())).equalsIgnoreCase("true") );				if (subNodeAttributes.getNamedItem("isItalic") != null)					re.setItalic( (new String(""+subNodeAttributes.getNamedItem("isItalic").getNodeValue())).equalsIgnoreCase("true") );				if (subNodeAttributes.getNamedItem("isUnderline") != null)					re.setUnderline( (new String(""+subNodeAttributes.getNamedItem("isUnderline").getNodeValue())).equalsIgnoreCase("true") );				if (subNodeAttributes.getNamedItem("isStrikeThrough") != null)					re.setStrikeTrought( (new String(""+subNodeAttributes.getNamedItem("isStrikeThrough").getNodeValue())).equalsIgnoreCase("true") );				if (subNodeAttributes.getNamedItem("isPdfEmbedded") != null)					re.setPdfEmbedded((new String(""+subNodeAttributes.getNamedItem("isPdfEmbedded").getNodeValue())).equalsIgnoreCase("true") );				if (subNodeAttributes.getNamedItem("pdfEncoding") != null)					re.setPdfEncoding( ""+subNodeAttributes.getNamedItem("pdfEncoding").getNodeValue() );				re.setFont(null);			}		}	}		private Node findNextNode(Node node) {		int type = node.getNodeType();		if (type == Node.ELEMENT_NODE)			return node;		NodeList children = node.getChildNodes();		if (children != null) {			for (int i=0; i< children.getLength(); i++)				return findNextNode  (children.item(i));		}				return null;	}			/** Getter for property bands.	 * @return Value of property bands.	 *	 */	public java.util.Vector getBands() {		return bands;	}		/** Setter for property bands.	 * @param bands New value of property bands.	 *	 */	public void setBands(java.util.Vector bands) {		this.bands = bands;	}		/** Getter for property bottomMargin.	 * @return Value of property bottomMargin.	 *	 */	public int getBottomMargin() {		return bottomMargin;	}		/** Setter for property bottomMargin.	 * @param bottomMargin New value of property bottomMargin.	 *	 */	public void setBottomMargin(int bottomMargin) {		this.bottomMargin = bottomMargin;	}		/** Getter for property columnCount.	 * @return Value of property columnCount.	 *	 */	public int getColumnCount() {		return columnCount;	}		/** Setter for property columnCount.	 * @param columnCount New value of property columnCount.	 *	 */	public void setColumnCount(int columnCount) {		this.columnCount = columnCount;	}		/** Getter for property columnSpacing.	 * @return Value of property columnSpacing.	 *	 */	public int getColumnSpacing() {		return columnSpacing;	}		/** Setter for property columnSpacing.	 * @param columnSpacing New value of property columnSpacing.	 *	 */	public void setColumnSpacing(int columnSpacing) {		this.columnSpacing = columnSpacing;	}		/** Getter for property columnWidth.	 * @return Value of property columnWidth.	 *	 */	public int getColumnWidth() {		return columnWidth;	}		/** Setter for property columnWidth.	 * @param columnWidth New value of property columnWidth.	 *	 */	public void setColumnWidth(int columnWidth) {		this.columnWidth = columnWidth;	}		/** Getter for property elements.	 * @return Value of property elements.	 *	 */	public java.util.Vector getElements() {		return elements;	}		/** Setter for property elements.	 * @param elements New value of property elements.	 *	 */	public void setElements(java.util.Vector elements) {		this.elements = elements;	}		/** Getter for property encoding.	 * @return Value of property encoding.	 *	 */	public java.lang.String getEncoding() {		return encoding;	}		/** Setter for property encoding.	 * @param encoding New value of property encoding.	 *	 */	public void setEncoding(java.lang.String encoding) {		this.encoding = encoding;	}		public KeywordLookupIF getKeywordLookup() {		return keywordLookup;	}		/** Getter for property fields.	 * @return Value of property fields.	 *	 */	public java.util.Vector getFields() {		return fields;	}		public void addField(JRField field) {		this.fields.add(field);		keywordLookup.addKeyword("$F{"  + field.getName() + "}");	}		public void addJRProperty(JRProperty property) {		this.JRproperties.add(property);	}		public void removeField(JRField field) {		this.fields.remove(field);		keywordLookup.removeKeyword("$F{" + field.getName() + "}");	}		public void removeJRProperty(JRProperty property) {		this.JRproperties.remove(property);	}		/** Setter for property fields.	 * @param fields New value of property fields.	 *	 */	public void setFields(java.util.Vector fields) {		this.fields = fields;	}		/** Getter for property filename.	 * @return Value of property filename.	 *	 */	public java.lang.String getFilename() {		return filename;	}		/** Setter for property filename.	 * @param filename New value of property filename.	 *	 */	public void setFilename(java.lang.String filename) {		this.filename = filename;	}		/** Getter for property fonts.	 * @return Value of property fonts.	 *	 */	public java.util.Vector getFonts() {		return fonts;	}		/** Setter for property fonts.	 * @param fonts New value of property fonts.	 *	 */	public void setFonts(java.util.Vector fonts) {		this.fonts = fonts;	}		/** Getter for property groups.	 * @return Value of property groups.	 *	 */	public java.util.Vector getGroups() {		return groups;	}		/** Setter for property groups.	 * @param groups New value of property groups.	 *	 */	public void setGroups(java.util.Vector groups) {		this.groups = groups;	}		/** Getter for property height.	 * @return Value of property height.	 *	 */	public int getHeight() {		return height;	}		/** Setter for property height.	 * @param height New value of property height.	 *	 */	public void setHeight(int height) {		this.height = height;	}		/** Getter for property isSummaryNewPage.	 * @return Value of property isSummaryNewPage.	 *	 */	public boolean isIsSummaryNewPage() {		return isSummaryNewPage;	}		/** Setter for property isSummaryNewPage.	 * @param isSummaryNewPage New value of property isSummaryNewPage.	 *	 */	public void setIsSummaryNewPage(boolean isSummaryNewPage) {		this.isSummaryNewPage = isSummaryNewPage;	}		/** Getter for property i

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?