for (int i=0; i<v1.size();i++){ out.println("<input type=\"checkbox\"name=\"PC\" value=\"pc_id='"+st1[i]+"' or\">"+st2[i]+"<br><p>"); paper51.com } 内容来自www.paper51.com %> 内容来自www.paper51.com </form> 内容来自www.paper51.com
</body> 内容来自论文无忧网 www.paper51.com </html> 内容来自论文无忧网 www.paper51.com
4. 表格式显示数据画面 内容来自论文无忧网 www.paper51.com
内容来自www.paper51.com 本窗口是以表的格式来显示所要查看的数据的画面。 copyright paper51.com
6. 日报、月报画面 内容来自www.paper51.com
内容来自论文无忧网 www.paper51.com 本窗口是以曲线的形式来显示以日期、月期的电量数据的画面。 内容来自www.paper51.com
程序代码: 内容来自www.paper51.com
package quxian; copyright paper51.com import java.awt.*; 内容来自论文无忧网 www.paper51.com
import java.applet.*; copyright paper51.com public class quxian extendsApplet { copyright paper51.com static int Xo,Yo; //坐标原点(Xo,Yo) paper51.com static int X2,Y2; //X轴顶点坐标(Xo,Yo) http://www.paper51.com
static final int X1=50,Y1=30; //Y轴顶点坐标(Xo,Yo) 内容来自www.paper51.com static int Yunit,Xunit; 内容来自论文无忧网 www.paper51.com
static float[] Y=new float[5]; paper51.com static float Ymax,Ymin; 内容来自www.paper51.com static int[] Xvalue; 内容来自www.paper51.com
static int[][] Yvalue; 内容来自论文无忧网 www.paper51.com static int[][] Yval; copyright paper51.com static int N; copyright paper51.com static String[] Pcname; 内容来自www.paper51.com String date=new String(); 内容来自论文无忧网 www.paper51.com public void init() { paper51.com
N=Integer.parseInt(getParameter("ParamNumber")); http://www.paper51.com intwidth=this.getBounds().width; http://www.paper51.com int height=this.getBounds().height; http://www.paper51.com
setSize(width,height); 内容来自论文无忧网 www.paper51.com Xvalue=new int[24]; 内容来自www.paper51.com Yvalue=new int[N][24]; paper51.com Pcname=new String[N]; http://www.paper51.com
date=this.getParameter("year")+"年"+this.getParameter("month")+"月"+this.getParameter("day")+"日"; 内容来自www.paper51.com
for (int i=0; i<N; i++) http://www.paper51.com { paper51.com for (int j=0; j<24;j++) http://www.paper51.com { 内容来自论文无忧网 www.paper51.com Xvalue[j]=j; 内容来自www.paper51.com Yvalue[i][j]=Integer.parseInt(getParameter("yValue"+i+j)); 内容来自论文无忧网 www.paper51.com } 内容来自论文无忧网 www.paper51.com } copyright paper51.com for (int i=0; i<N; i++) http://www.paper51.com { paper51.com Pcname[i]=this.getParameter("pcName"+i); copyright paper51.com } 内容来自www.paper51.com
Xo=50; http://www.paper51.com
Yo=height-30; paper51.com X2=width-30; paper51.com Y2=Yo; http://www.paper51.com Yunit=(height-100)/4; 内容来自www.paper51.com
Xunit=(width-100)/23; 内容来自论文无忧网 www.paper51.com
Ymax=getMaxVal(Yvalue); 内容来自www.paper51.com Ymin=getMinVal(Yvalue); 内容来自www.paper51.com float tempy=((float)Ymax-(float)Ymin)/4; http://www.paper51.com
Y[0]=Ymin; //Y轴坐标刻度 paper51.com Y[1]=Ymin+tempy; 内容来自论文无忧网 www.paper51.com Y[2]=Ymin+tempy*2; 内容来自www.paper51.com Y[3]=Ymin+tempy*3; 内容来自论文无忧网 www.paper51.com Y[4]=Ymax; paper51.com Yval=new int[N][24]; paper51.com Yval=getY(Yunit,tempy,Ymin,Yvalue); 内容来自论文无忧网 www.paper51.com } copyright paper51.com public static int[][] getY(intyunit,float diff,float ymin,int[][] yvalue){ http://www.paper51.com
int I1=0; paper51.com int I2=0; //yunit=Yunit;diff=temp; ymin=Ymin; yvalue=Yvalue 内容来自论文无忧网 www.paper51.com int[][] result=newint[N][24]; 内容来自论文无忧网 www.paper51.com for(I1=0;I1<N;I1++) 内容来自论文无忧网 www.paper51.com { paper51.com for(I2=0;I2<24;I2++) http://www.paper51.com { paper51.com result[I1][I2]=(int)(Yo-((4*yunit)/(diff*4))*(yvalue[I1][I2]-ymin)); http://www.paper51.com } 内容来自www.paper51.com
} paper51.com
return result; paper51.com } copyright paper51.com public void paint(Graphics g){ 内容来自论文无忧网 www.paper51.com
this.setBackground(Color.white ); http://www.paper51.com
g.setColor(Color.black);//坐标原点(30,290) 内容来自论文无忧网 www.paper51.com
g.drawLine(Xo,Yo,X1,Y1); //Y轴 内容来自论文无忧网 www.paper51.com int I; http://www.paper51.com for(I=0;I<5;I++){ copyright paper51.com http://www.paper51.com |