资源简介
java文档中的The Java™ Tutorials ,离线的资源,下载下来方便无网络时看,打开文档中的index.html即可查看
代码片段和文件信息
/*
* Copyright (c) 1995 2008 Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle or the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS
* IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL
* EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowAdapter;
import java.awt.image.BufferedImage;
import java.net.URL;
/**
* Animated clipping of an image & shapes with alpha.
*/
public class ClipImage extends Japplet implements Runnable {
private Image img;
private final double OINC[] = {5.0 3.0};
private final double SINC[] = {5.0 5.0};
private double x y;
private double ix = OINC[0];
private double iy = OINC[1];
private double iw = SINC[0];
private double ih = SINC[1];
private double ew eh; // ellipse width & height
private GeneralPath p = new GeneralPath();
private AffineTransform at = new AffineTransform();
private BasicStroke bs = new BasicStroke(20.0f);
private Arc2D arc = new Arc2D.Float();
private Ellipse2D ellipse = new Ellipse2D.Float();
private RoundRectangle2D roundRect = new RoundRectangle2D.Float();
private Rectangle2D rect = new Rectangle2D.Float();
private Color redBlend = new Color(255 0 0 120);
private Color greenBlend = new Color(0 255 0 120);
private Thread thread;
private BufferedImage offImg;
private int w h;
private boolean newBufferedImage;
public void init() {
setBackground(Color.white);
img = getImage(getURL(“i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-15 20:29 tutorial\
目录 0 2017-11-15 20:29 tutorial\2d\
目录 0 2017-11-15 20:29 tutorial\2d\advanced\
文件 12840 2017-11-15 20:21 tutorial\2d\advanced\ClipImage.html
文件 21377 2017-09-19 02:18 tutorial\2d\advanced\clipping.html
文件 19401 2017-09-19 02:18 tutorial\2d\advanced\complexshapes.html
文件 12840 2017-11-15 20:21 tutorial\2d\advanced\Composite.html
文件 21834 2017-09-19 02:18 tutorial\2d\advanced\compositing.html
目录 0 2017-11-15 20:29 tutorial\2d\advanced\examples\
文件 8299 2017-09-19 02:18 tutorial\2d\advanced\examples\ClipImage.java
文件 7660 2017-09-19 02:18 tutorial\2d\advanced\examples\Composite.java
文件 7390 2017-09-19 02:18 tutorial\2d\advanced\examples\HitTestSample.java
目录 0 2017-11-15 20:29 tutorial\2d\advanced\examples\images\
文件 5116 2017-09-19 02:18 tutorial\2d\advanced\examples\images\clouds.jpg
文件 50708 2017-09-19 02:18 tutorial\2d\advanced\examples\images\Starry.gif
目录 0 2017-11-15 20:29 tutorial\2d\advanced\examples\lib\
文件 14960 2017-09-19 02:18 tutorial\2d\advanced\examples\lib\ClipImageap
文件 8922 2017-09-19 02:18 tutorial\2d\advanced\examples\lib\Compositeap
文件 9578 2017-09-19 02:18 tutorial\2d\advanced\examples\lib\HitTestSampleap
文件 7323 2017-09-19 02:18 tutorial\2d\advanced\examples\lib\Pearap
文件 8853 2017-09-19 02:18 tutorial\2d\advanced\examples\lib\ShapeMoverap
文件 57348 2017-09-19 02:18 tutorial\2d\advanced\examples\lib\Starryap
文件 10607 2017-09-19 02:18 tutorial\2d\advanced\examples\lib\Transformap
文件 4392 2017-09-19 02:18 tutorial\2d\advanced\examples\Pear.java
文件 7529 2017-09-19 02:18 tutorial\2d\advanced\examples\ShapeMover.java
文件 4175 2017-09-19 02:18 tutorial\2d\advanced\examples\Starry.java
文件 8785 2017-09-19 02:18 tutorial\2d\advanced\examples\SwingShapeMover.java
文件 11579 2017-09-19 02:18 tutorial\2d\advanced\examples\Transform.java
文件 12840 2017-11-15 20:21 tutorial\2d\advanced\HitTestSample.html
文件 17491 2017-09-19 02:18 tutorial\2d\advanced\index.html
文件 12840 2017-11-15 20:21 tutorial\2d\advanced\Pear.html
............此处省略4956个文件信息
相关资源
- mysql数据处理,java用户登录处理
- 法律咨询信息系统(java+jsp+sqlserver)
- Java快速开发平台源码(renren-fast)
- 锐聘学院QST青软JavaWeb十二个打包
- 3.3.6微信支付JAVA版demo
- javaweb网上购物系统源码(附数据库脚
- javaweb校园宿舍系统(附数据库脚本)
- JavaWeb书城项目(附数据库脚本)
- 基于JAVA_JSP电子书系统(源码+数据库
- Java网络编程知识点总结.xmind
- 一站式Java网络编程 BIO-NIO-AIO资料源码
- jsp讲解
- 基于SSH框架的JavaWeb项目—人员信息管
- javaweb实现的邮件收发系统(附数据库
- Java 仿QQ(附客户端以及服务端源码)
- Java TCP IP Socket
- java定时发送邮件(基于quartz)
- Java Swing开发的《星际争霸》游戏
- java+数据库商品交易管理系统(附数据
- 使用java语言编译一个计算器
- java swing工资管理系统(源码+数据库
- JAVALibrary
- 微信企业号回调模式Java版
- 顺丰丰桥接口开发详细教程源码含下
- Java博客概要设计文档
- 药品进销存管理系统(论文范文_JSP
- 奖学金管理系统java+jsp+mysql
- 毕设参考——基于java酒店管理
- Java写的一个简单的字体更改程序
- java8学习教程之lambda表达式的使用方法
评论
共有 条评论