Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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/ROP2Table.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.Color;
import java.awt.Composite;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
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.HwmfROP2Composite;
import org.apache.poi.hwmf.record.HwmfBinaryRasterOp;
import org.apache.poi.util.Units;
/**
* Generates an image table describing the various binary raster operations
*
* inspired from http://www.fengyuan.com/sample/samplech8.html
*/
public final class ROP2Table {
private static final Color[] COLORS = {
new Color(0,0,0),
new Color(128,0,0),
new Color(0,128,0),
new Color(128,128,0),
new Color(0,0,128),
new Color(128,0,128),
new Color(0,128,128),
new Color(192,192,192),
new Color(255,255,255),
new Color(128,128,128),
new Color(255,0,0),
new Color(0,255,0),
new Color(255,255,0),
new Color(0,0,255),
new Color(255,0,255),
new Color(0,255,255)
};
private ROP2Table() {
}
public static void main(String[] args) throws IOException {
int square = 800;
BufferedImage bi = new BufferedImage(square + 500, square, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = bi.createGraphics();
double space = 0.2;
double hbar = square / (COLORS.length + space);
double vbar = square / (COLORS.length + space);
double y = hbar * space;
double x = vbar * space;
double w = square - 2*x;
double h = square - 2*y;
Rectangle2D vrect = new Rectangle2D.Double(x, y, vbar * (1-space), h);
for (Color c : COLORS) {
g.setColor(c);
g.fill(vrect);
g.translate(vbar, 0);
}
g.setTransform(new AffineTransform());
g.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, (int) Units.pixelToPoints(hbar * 0.8)));
Composite comp = g.getComposite();
Rectangle2D hrect = new Rectangle2D.Double(x, y, w, hbar * (1-space));
int idx = 0;
for (HwmfBinaryRasterOp op : HwmfBinaryRasterOp.values()) {
g.setComposite(comp);
g.setColor(Color.BLACK);
g.drawString(op.name(), (int)(square+vbar), (int)(hbar*0.8));
g.setComposite(new HwmfROP2Composite(op));
g.setColor(Color.RED);
g.fill(hrect);
g.translate(0, hbar);
idx++;
}
g.dispose();
ImageIO.write(bi, "PNG", new File("rop2.png"));
}
}
⏎ org/apache/poi/examples/hwmf/ROP2Table.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, ≈43🔥, 0💬
Popular Posts:
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
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 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Jav...