Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
What Is poi-examples-5.2.3.jar?
What Is poi-examples-5.2.3.jar?
✍: FYIcenter.com
poi-examples-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an API for Microsoft document files of Word, Excel, PowerPoint, and Visio.
poi-examples-5.2.3.jar provides examples for both poi.jar and poi-ooxml.jar components.
poi-examples-5.2.3.jar is distributed as part of the poi-bin-5.2.3-20220909.zip download file.
JAR File Size and Download Location:
JAR name: poi-examples-5.2.3.jar Target JDK version: 1.6 Dependency: poi.jar poi-ooxml.jar File name: poi-examples-5.2.3.jar File size: 388829 bytes Release date: 09-09-2022 Download: Apache POI Website
Here are Java Source Code files for poi-examples-5.2.3.jar:
⏎ org/apache/poi/examples/hwmf/ROP3Table.java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.examples.hwmf; import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.Shape; import java.awt.TexturePaint; import java.awt.font.TextLayout; import java.awt.geom.AffineTransform; import java.awt.geom.Ellipse2D; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import org.apache.poi.hwmf.draw.HwmfGraphics; import org.apache.poi.hwmf.draw.HwmfROP3Composite; import org.apache.poi.hwmf.record.HwmfTernaryRasterOp; /** * Generates an image table describing the various ternary raster operations * * inspired from http://www.evmsoft.net/en/roptest.html */ public final class ROP3Table { private ROP3Table() {} private static final long PATTERN = 0xAADDAA55AADDAA55L; private static final HwmfTernaryRasterOp[] OPS = HwmfTernaryRasterOp.values(); private static final int COLS = 16, BOX = 100; private static final double SCALE = 2, HEADER = 1.1; private static final Rectangle2D RECT = new Rectangle2D.Double(0.05*BOX, 0.05*BOX, 0.90*BOX, 0.90*BOX); private static final Shape CIRCLE_BIG = new Ellipse2D.Double(0.15*BOX, 0.15*BOX, 0.70*BOX, 0.70*BOX); private static final Shape CIRCLE_SMALL = new Ellipse2D.Double(0.40*BOX, 0.40*BOX, 0.20*BOX, 0.20*BOX); private static final Shape LABEL_BOX = new Rectangle.Double(0.06*BOX, 0.85*BOX, 0.88*BOX, 0.10*BOX); private static final AlphaComposite SRC_OVER = AlphaComposite.getInstance(AlphaComposite.SRC_OVER); private static final AffineTransform INIT_AT = AffineTransform.getScaleInstance(SCALE, SCALE); public static void main(String[] args) throws IOException { BufferedImage pattern = getPattern(); BufferedImage source = getSource(); BufferedImage dest = new BufferedImage( (int)(BOX * COLS * SCALE), (int)(BOX * (Math.max(OPS.length/COLS,1) + HEADER) * SCALE), BufferedImage.TYPE_INT_ARGB); Graphics2D g = dest.createGraphics(); g.setTransform(INIT_AT); g.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 10)); g.translate(BOX * (COLS-5) / 2., 0); g.setColor(Color.BLACK); fillDest(g); fillLabel(g, "Dest"); g.translate(2*BOX, 0); g.drawImage(source, 0, 0, null); fillLabel(g, "Source"); g.translate(2*BOX, 0); g.setPaint(new TexturePaint(pattern, RECT)); g.fill(RECT); fillLabel(g, "Pattern"); int idx=0; for (HwmfTernaryRasterOp op : OPS) { g.setTransform(INIT_AT); g.translate(0, HEADER * BOX); g.translate(BOX*(idx%COLS), BOX*(idx/COLS)); fillDest(g); fillPattern(g, op, pattern, source); fillLabel(g, op.name()); idx++; } g.dispose(); ImageIO.write(dest, "PNG", new File("rop3.png")); } private static BufferedImage getPattern() { return HwmfGraphics.getPatternFromLong(PATTERN, Color.BLACK, Color.WHITE, false); } private static BufferedImage getSource() { BufferedImage checker = new BufferedImage(BOX, BOX, BufferedImage.TYPE_INT_ARGB); Graphics2D cg = checker.createGraphics(); cg.setColor(Color.PINK); cg.fill(RECT); cg.setColor(new Color(0xE6E6FA, false)); cg.fill(new Rectangle2D.Double(0.05*BOX, 0.05*BOX, 0.45*BOX, 0.45*BOX)); cg.fill(new Rectangle2D.Double(0.50*BOX, 0.50*BOX, 0.45*BOX, 0.45*BOX)); cg.dispose(); return checker; } private static void fillDest(Graphics2D g) { g.setComposite(SRC_OVER); g.setColor(Color.LIGHT_GRAY); g.fill(RECT); g.setColor(new Color(0xDAA520, false)); g.fill(CIRCLE_BIG); g.setColor(Color.RED); g.fill(CIRCLE_SMALL); } private static void fillPattern(Graphics2D g, HwmfTernaryRasterOp op, BufferedImage pattern, BufferedImage source) { g.setComposite(new HwmfROP3Composite(g.getTransform(), RECT, op, pattern, Color.YELLOW, Color.BLUE)); g.setClip(RECT); g.drawImage(source, 0, 0, null); g.setClip(null); g.setComposite(SRC_OVER); } private static void fillLabel(Graphics2D g, String str) { g.setColor(Color.WHITE); g.fill(LABEL_BOX); g.setColor(Color.BLACK); TextLayout t = new TextLayout(str, g.getFont(), g.getFontRenderContext()); Rectangle2D b = t.getBounds(); g.drawString(str, (float)((BOX -b.getWidth())/2.), (float)(0.94*BOX)); } }
⏎ org/apache/poi/examples/hwmf/ROP3Table.java
Or download all of them as a single archive file:
File name: poi-examples-5.2.3-src.zip File size: 396538 bytes Release date: 2022-09-09 Download
⇒ Download and Install poi-bin-3.15-20160924.zip
⇐ What Is poi-scratchpad-5.2.3.jar?
2017-03-22, 11589👍, 0💬
Popular Posts:
What Is commons-io-2.11.jar? commons-io-2.11.jar is the JAR file for Commons IO 2.5, which is a libr...
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...
Apache Log4j SLF4J Binding allows applications coded to the SLF4J API to use Log4j 2 as the implemen...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JRE 5 sunjce_provider.jar is the JAR file for JRE 5 Sun JCE Provider, which provides implementations...