freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

小小畫圖板開發(fā)——java課程設(shè)計報告(編輯修改稿)

2025-04-03 17:08 本頁面
 

【文章內(nèi)容簡介】 vent e) { chooseColor()。 //如果被觸發(fā),則調(diào)用選擇顏色函數(shù)段 } } )。 (colorItem)。 (colorMenu)。 //設(shè)置線條粗細(xì)菜單條 JMenu strokeMenu=new JMenu(線條粗細(xì) )。 //設(shè)置線條粗細(xì)菜單項 JMenuItem strokeItem=new JMenuItem(設(shè)置線條粗細(xì) )。 ( new ActionListener(){ public void actionPerformed(ActionEvent e) { setStroke()。 } } )。 (strokeItem)。 (strokeMenu)。 //設(shè)置提示菜單條 JMenu helpMenu=new JMenu(幫助 )。 //設(shè)置提示菜單項 JMenuItem aboutItem=new JMenuItem(關(guān)于畫板 )。 ( new ActionListener(){ public void actionPerformed(ActionEvent e) { (null, 卿樂畫板 \n 作者:吳斌偉 \n 指導(dǎo)教師:郭成 \n 于 2021年 1 月 11 日,廈門理工學(xué)院 數(shù)理系 實驗樓 4416 , 畫圖板說明 , )。 } } )。 (aboutItem)。 (helpMenu)。 items=new ImageIcon[]。 //創(chuàng)建各種基本圖形的按鈕 drawingArea=new DrawPanel()。 choices=new JButton[]。 buttonPanel = new JToolBar( ) 。 buttonPanel = new JToolBar( ) 。 ButtonHandler handler=new ButtonHandler()。 ButtonHandler1 handler1=new ButtonHandler1()。 //導(dǎo)入我們需要的圖形圖標(biāo),這些圖標(biāo)都存放在與源文件相同的目錄下面 for(int i=0。i。i++) { items[i]=new ImageIcon(names[i] + .gif)。 choices[i]=new JButton(,items[i])。 choices[i].setToolTipText(tipText[i])。 (choices[i])。 } //將動作偵聽器加入按鈕里面 for(int i=3。i。i++) { choices[i].addActionListener(handler)。 } choices[0].addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent e) { newFile()。 } } )。 choices[1].addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent e) { loadFile()。 } } )。 choices[2].addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent e) { saveFile()。 } } )。 choices[].addActionListener(handler1)。 choices[].addActionListener(handler1)。 choices[].addActionListener(handler1)。 //字體風(fēng)格選擇 styles=new JComboBox(styleNames)。 (8)。 ( new ItemListener(){ public void itemStateChanged(ItemEvent e) { style1=styleNames[()]。 } } )。 //字體選擇 bold=new JCheckBox(粗體 )。 italic=new JCheckBox(斜體 )。 checkBoxHandler cHandler=new checkBoxHandler()。 (cHandler)。 (cHandler)。 JPanel wordPanel=new JPanel()。 (bold)。 (italic)。 (styles)。 ( new Dimension ( 50, 20 ) )。 (new Dimension ( 100, 20 ) )。 Container c=getContentPane()。 ( bar )。 (buttonPanel,)。 (drawingArea,)。 statusBar=new JLabel()。 (statusBar,)。 ( 歡迎使用卿樂繪圖畫板→ O(∩ _∩ )O 作者:吳斌偉→指導(dǎo)教師:郭成 )。 createNewItem()。 setSize(width,height)。 show()。 } //按鈕偵聽器 ButtonHanler 類,內(nèi)部類,用來偵聽基本按鈕的操作 public class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { for(int j=3。j。j++) { if(()==choices[j]) {currentChoice=j。 createNewItem()。 repaint()。} } } } //按鈕偵聽器 ButtonHanler1 類,用來偵聽顏色選擇、畫筆粗細(xì)設(shè)置、文字輸入按鈕的操作 public class ButtonHandler1 implements ActionListener { public void actionPerformed(ActionEvent e) { if(()==choices[]) {chooseColor()。} if(()==choices[]) {setStroke()。} if(()==choices[]) {(null, 請點擊繪圖板選擇輸入文本的位置 , 提示 , )。 currentChoice=14。 createNewItem()。 repaint()。 } } } //鼠標(biāo)事件 mouseA 類,繼承了 MouseAdapter,用來完成鼠標(biāo)相應(yīng)事件操作 class mouseA extends MouseAdapter { public void mousePressed(MouseEvent e) {( 作者:吳斌偉→廈門理工學(xué)院數(shù)理系 09 級信計 1 班→鼠標(biāo)按下位置 :[ + () + , + () + ])。//設(shè)置狀態(tài)提示 itemList[index].x1=itemList[index].x2=()。 itemList[index].y1=itemList[index].y2=()。 //如果當(dāng)前選擇的圖形是隨筆畫或者橡皮擦,則進(jìn)行下面的操作 if(currentChoice==3||currentChoice==13) { itemList[index].x1=itemList[index].x2=()。 itemList[index].y1=itemList[index].y2=()。 index++。 createNewItem()。 } //如果當(dāng) 前選擇的圖形式文字輸入,則進(jìn)行下面操作 if(currentChoice==14) { itemList[index].x1=()。 itemList[index].y1=()。 Strin
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1