文件名称:clockgood
介绍说明--下载内容均来自于网络,请自行研究使用
比较实用的,绘制表盘的外观、绘制表盘上的小刻度和大刻度也是值得参考的,表盘分割成60份,将分割点处的坐标存放在数组中,每当小程序重新开始时,首先消灭线程,然后重新开始创建线程。12点各个时针的位置坐标(按新坐标系的坐标)。
Thread 时针=null, 分针=null,秒针=null //用来表示时针、分针和秒针的线程。
//表示时针、分针、秒针端点的整型变量:
int hour_a,hour_b,munite_a,munite_b,second_a,second_b
//用来获取当前时间的整型变量:
int hour=0,munite=0,second=0
//用来绘制时针、分针和秒针的Grapghics对象:
Graphics g_second=null,g_munite=null,g_hour=null
//用来存放表盘刻度的数组,供指针走动时使用:
double point_x[]=new double[61],point_y[]=new double[61]
//用来存放表盘刻度的数组,供绘制表盘使用:
double scaled_x[]=new double[61],scaled_y[]=new double[61]
//用来判断小程序是否重新开始的变量-More practical , drawing dial appearance, small-scale and large- scale drawn on the dial is also worth noting, and the dial is divided into 60 parts , the dividing point coordinates stored in the array, whenever the applet to start again, first eliminate thread, and then re- start the creation of threads . 12:00 position coordinates of each of the hour hand ( by the new coordinate system coordinates ) .
Thread hour = null, minute = null, seconds = null // used to indicate the hour, minute and second hand threads.
//Represents the hour, minute , second hand endpoint integer variables :
int hour_a, hour_b, munite_a, munite_b, second_a, second_b
//Used to get the current time integer variables :
int hour = 0, munite = 0, second = 0
//Used to draw the hour, minute and second hands Grapghics object :
Graphics g_second = null, g_munite = null, g_hour = null
//Used to store an array of dial scale , move the pointer used for :
double point_x [] = new double [61], point_y [] = new d
Thread 时针=null, 分针=null,秒针=null //用来表示时针、分针和秒针的线程。
//表示时针、分针、秒针端点的整型变量:
int hour_a,hour_b,munite_a,munite_b,second_a,second_b
//用来获取当前时间的整型变量:
int hour=0,munite=0,second=0
//用来绘制时针、分针和秒针的Grapghics对象:
Graphics g_second=null,g_munite=null,g_hour=null
//用来存放表盘刻度的数组,供指针走动时使用:
double point_x[]=new double[61],point_y[]=new double[61]
//用来存放表盘刻度的数组,供绘制表盘使用:
double scaled_x[]=new double[61],scaled_y[]=new double[61]
//用来判断小程序是否重新开始的变量-More practical , drawing dial appearance, small-scale and large- scale drawn on the dial is also worth noting, and the dial is divided into 60 parts , the dividing point coordinates stored in the array, whenever the applet to start again, first eliminate thread, and then re- start the creation of threads . 12:00 position coordinates of each of the hour hand ( by the new coordinate system coordinates ) .
Thread hour = null, minute = null, seconds = null // used to indicate the hour, minute and second hand threads.
//Represents the hour, minute , second hand endpoint integer variables :
int hour_a, hour_b, munite_a, munite_b, second_a, second_b
//Used to get the current time integer variables :
int hour = 0, munite = 0, second = 0
//Used to draw the hour, minute and second hands Grapghics object :
Graphics g_second = null, g_munite = null, g_hour = null
//Used to store an array of dial scale , move the pointer used for :
double point_x [] = new double [61], point_y [] = new d
(系统自动生成,下载前可以参看下载内容)
下载文件列表
java时钟小程序\Clock_good.java
java时钟小程序