91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 11KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-12
  • 語言: Java
  • 標簽:

資源簡介

大學時候的畢業設計,在eclipse中使用java語言實現的一個界面版的畫圖工具

資源截圖

代碼片段和文件信息

import?java.applet.*;?
import?java.awt.*;?
import?java.awt.event.*;?
import?java.util.*;?
import?javax.swing.*;?
import?java.awt.geom.*;?
import?java.io.*;?

class?Point?implements?Serializable?
{?
int?xy;?
Color?col;?
int?tool;?
int?boarder;?

Point(int?x?int?y?Color?col?int?tool?int?boarder)?
{?
this.x?=?x;?
this.y?=?y;?
this.col?=?col;?
this.tool?=?tool;?
this.boarder?=?boarder;?
}?
}?


class?paintboard?extends?frame?implements?ActionListenerMouseMotionListenerMouseListenerItemListener?
{?
/**
?*?
?*/
private?static?final?long?serialVersionUID?=?1L;
int?x?=?-1?y?=?-1;?
int?con?=?1;//畫筆大小?
int?Econ?=?5;//橡皮大小?

int?toolFlag?=?0;//toolFlag:工具標記?
//toolFlag工具對應表:?
//(0--畫筆);(1--橡皮);(2--清除);?
//(3--直線);(4--圓);(5--矩形);?

Color?c?=?new?Color(000);?//畫筆顏色?
BasicStroke?size?=?new?BasicStroke(conBasicStroke.CAP_BUTTBasicStroke.JOIN_BEVEL);//畫筆粗細?
Point?cutflag?=?new?Point(-1?-1?c?6?con);//截斷標志?

Vector?paintInfo?=?null;//點信息向量組?
int?n?=?1;?

FileInputStream?picIn?=?null;?
FileOutputStream?picOut?=?null;?

objectInputStream?VIn?=?null;?
objectOutputStream?VOut?=?null;?


//?*工具面板--畫筆,直線,圓,矩形,多邊形橡皮,清除*/?
Panel?toolPanel;?
Button?eraser?drLinedrCircledrRect;?
Button?clear?pen;?
Choice?ColChoiceSizeChoiceEraserChoice;?
Button?colchooser;?
Label?顏色大小B大小E;?
//保存功能?
Button?openPicsavePic;?
FileDialog?openPicturesavePicture;?

paintboard(String?s)?
{?
super(s);?
addMouseMotionListener(this);?
addMouseListener(this);?

paintInfo?=?new?Vector();?

/*各工具按鈕及選擇項*/?
//顏色選擇?
ColChoice?=?new?Choice();?
ColChoice.add(“black“);?
ColChoice.add(“red“);?
ColChoice.add(“blue“);?
ColChoice.add(“green“);?
ColChoice.addItemListener(this);?
//畫筆大小選擇?

SizeChoice?=?new?Choice();?
SizeChoice.add(“1“);?
SizeChoice.add(“3“);?
SizeChoice.add(“5“);?
SizeChoice.add(“7“);?
SizeChoice.add(“9“);?
SizeChoice.addItemListener(this);?
//橡皮大小選擇?
EraserChoice?=?new?Choice();?
EraserChoice.add(“5“);?
EraserChoice.add(“9“);?
EraserChoice.add(“13“);?
EraserChoice.add(“17“);?
EraserChoice.addItemListener(this);?

toolPanel?=?new?Panel();?

clear?=?new?Button(“清除“);?
eraser?=?new?Button(“橡皮“);?
pen?=?new?Button(“畫筆“);?
drLine?=?new?Button(“畫直線“);?
drCircle?=?new?Button(“畫圓形“);?
drRect?=?new?Button(“畫矩形“);?

openPic?=?new?Button(“打開圖畫“);?
savePic?=?new?Button(“保存圖畫“);?

colchooser?=?new?Button(“顯示調色板“);?

//各組件事件監聽?
clear.addActionListener(this);?
eraser.addActionListener(this);?
pen.addActionListener(this);?
drLine.addActionListener(this);?
drCircle.addActionListener(this);?
drRect.addActionListener(this);?
openPic.addActionListener(this);?
savePic.addActionListener(this);?
colchooser.addActionListener(this);?


顏色?=?new?Label(“畫筆顏色“Label.CENTER);?
大小B?=?new?Label(“畫筆大小“Label.CENTER);?
大小E?=?new?Label(“橡皮大小“Label.CENTER);?
//面板添加組件?
toolPanel.add(openPic);?
toolPanel.add(savePic);?

toolPanel.add(pen);?
toolPanel.add(drL

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????598??2012-09-27?12:41??hu\.settings\org.eclipse.jdt.core.prefs

?????文件????????702??2012-10-10?09:18??hu\bin\paintboard$1.class

?????文件????????702??2012-10-10?09:18??hu\bin\paintboard$2.class

?????文件????????638??2012-10-10?09:18??hu\bin\paintboard$3.class

?????文件??????10596??2012-10-10?09:18??hu\bin\paintboard.class

?????文件????????425??2012-10-10?09:18??hu\bin\pb.class

?????文件????????536??2012-10-10?09:18??hu\bin\Point.class

?????文件??????10401??2012-10-10?09:18??hu\src\pb.java

?????文件????????301??2012-09-27?12:41??hu\.classpath

?????文件????????378??2012-09-27?12:41??hu\.project

?????目錄??????????0??2012-09-27?12:41??hu\.settings

?????目錄??????????0??2012-09-27?13:07??hu\bin

?????目錄??????????0??2012-09-27?13:07??hu\src

?????目錄??????????0??2015-05-06?22:37??hu

-----------?---------??----------?-----??----

????????????????25277????????????????????14


評論

共有 條評論

相關資源