当前位置: 首页>>代码示例>>Java>>正文


Java ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION属性代码示例

本文整理汇总了Java中org.geomajas.global.ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION属性的典型用法代码示例。如果您正苦于以下问题:Java ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION属性的具体用法?Java ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION怎么用?Java ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.geomajas.global.ExceptionCode的用法示例。


在下文中一共展示了ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeTextNode

public void writeTextNode(String text) throws RenderException {
	try {
		checkState(false);
		if (!elements.empty()) {
			ElementState previous = elements.peek();
			if (!previous.isOpened()) {
				writer.write(">");
				previous.setOpened(true);
			}
			previous.setNeedsCloseTag(true);
		}
		writer.write(WebSafeStringEncoder.escapeHTML(text));
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:16,代码来源:AbstractGraphicsDocument.java

示例2: closeElement

public void closeElement() throws RenderException {
	try {
		checkState(false);
		if (!elements.empty()) {
			ElementState current = elements.pop();
			if (current.needsCloseTag()) {
				if (!current.isOpened()) {
					writer.write(">");
				}
				writer.write("</" + current.getName() + ">");
			} else {
				writer.write("/>");
			}
			unwindId();
		}
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:19,代码来源:AbstractGraphicsDocument.java

示例3: writeAttribute

public void writeAttribute(String name, String value) throws RenderException {
	try {
		checkState(false);
		writer.write(" " + name + "=" + "\"" + safeHtml(value) + "\"");
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:8,代码来源:AbstractGraphicsDocument.java

示例4: writeAttributeEnd

public void writeAttributeEnd() throws RenderException {
	try {
		checkState(true);
		writer.write("\"");
		inAttribute = false;
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:9,代码来源:AbstractGraphicsDocument.java

示例5: writeAttributeStart

public void writeAttributeStart(String name) throws RenderException {
	try {
		checkState(false);
		writer.write(" " + name + "=\"");
		inAttribute = true;
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:9,代码来源:AbstractGraphicsDocument.java

示例6: writePathContent

public void writePathContent(Coordinate[] coords, char path, char point) throws RenderException {
	try {
		checkState(true);
		writer.write(path);

		Coordinate curr = roundCoordinate(coords[0]);
		writeCoordinate(curr);
		Coordinate prev = curr;

		int nCoords = coords.length;
		if (nCoords > 1) {
			writer.write(point);
			for (int i = 1; i < nCoords; i++) {
				curr = coords[i];
				Coordinate delta = new Coordinate(curr.x - prev.x, curr.y - prev.y);
				delta = roundCoordinate(delta);
				if (!delta.equals(NULL_COORDINATE) || i == 1) {
					writeCoordinate(delta);
					prev.x += delta.x;
					prev.y += delta.y;
					writer.write(' ');
				}

			}
		}
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:29,代码来源:AbstractGraphicsDocument.java

示例7: flush

public void flush() throws RenderException {
	try {
		while (!elements.empty()) {
			closeElement();
		}
		writer.flush();
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:10,代码来源:AbstractGraphicsDocument.java

示例8: writeClosedPathContent

public void writeClosedPathContent(Coordinate[] coords) throws RenderException {
	try {
		checkState(true);
		Coordinate[] openCoords = new Coordinate[coords.length - 1];
		System.arraycopy(coords, 0, openCoords, 0, coords.length - 1);
		writePathContent(openCoords);
		writer.write('x');
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:11,代码来源:DefaultVmlDocument.java

示例9: writeClosedPathContent

public void writeClosedPathContent(Coordinate[] coords) throws RenderException {
	try {
		checkState(true);
		writePathContent(coords);
		writer.write('Z');
	} catch (IOException ioe) {
		throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:9,代码来源:DefaultSvgDocument.java


注:本文中的org.geomajas.global.ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。