|
文本编辑器源文件(java语言)(10) g.setColor(Color.darkGray); g.drawRect(0,0,sz.width-2,sz.height-2);
g.setColor(Color.white); g.drawLine(1,1,1,sz.height-3); g.drawLine(1,1,sz.width-3,1);
g.drawLine(0,sz.height-1,sz.width-1,sz.height-1); g.drawLine(sz.width-1,0,sz.width-1,sz.height-1);
draw_downlines(g,15,10,sz.width-30,sz.height-20); g.clipRect(16,11,sz.width-31,sz.height-21); g.setColor(Color.black); g.setFont(ff.bf); g.drawString(test,20,sz.height-21); } }
class D_font extends Dialog { public Font bf; private Button OK,Cancel; private Label l1,l2,l3; private String items1[]={"Helvetica","Courier","TimesRoman","Dialog"}; private String items2[]={"PLAIN","BOLD","PLAIN+BOLD","ITALIC","BOLD+ITALIC"}; private int[] style= new int[5]; private String items3[]={"8","9","10","11","12","14","16","18","20","22","24","26","28","36","48","72"}; private TextField f1,f2,f3; private List ll1,ll2,ll3; private ptest test; private I_Method im;
public void init() { style[0]= Font.PLAIN; style[1]= Font.BOLD; style[2]= Font.PLAIN+Font.BOLD; style[3]= Font.ITALIC; style[4]= Font.BOLD+Font.ITALIC; }
public D_font(Frame fr,I_Method qm,int x,int y) {
|