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

正文內(nèi)容

軟件工程課程設(shè)計(jì)記事本課程設(shè)計(jì)-文庫(kù)吧資料

2024-11-18 09:21本頁(yè)面
  

【正文】 w MenuItem(替換( R) )。 (new MenuShortcut(, false))。 (finditem)。 MenuItem finditem = new MenuItem(查找( F) )。 (deleteitem)。 MenuItem deleteitem = new MenuItem(刪除( L) )。 (new MenuShortcut(, false))。 (copyitem)。 MenuItem copyitem = new MenuItem(復(fù)制( C) )。 (new MenuShortcut(, false))。 (undoitem)。 // 創(chuàng)建編輯菜單上的各個(gè)菜單項(xiàng)并添加到菜單上 MenuItem undoitem = new MenuItem(撤銷( U) )。 if (option == ) { (0)。 // 退出菜單項(xiàng)的功能實(shí)現(xiàn) (new ActionListener() { public void actionPerformed(ActionEvent e) { Object[] options = { 是的,我要退出 , 不好意思,點(diǎn)錯(cuò)了 }。 // 頁(yè)面設(shè)置菜單項(xiàng)的功能實(shí)現(xiàn) (new ActionListener() { public void actionPerformed(ActionEvent e) { } 19 })。// 關(guān)閉輸出流 } catch (IOException ex) { (()).log( , null, ex)。// 向文件寫(xiě)出數(shù)據(jù) ()。 filePath = ().getAbsolutePath()。// 用于選擇保存路徑的文件名 int bcf = (jf)。 } } } })。 ()。 (())。// 關(guān)閉輸出流 } catch (IOException ex) { (()).log( , null, ex)。// 向文件寫(xiě)出數(shù)據(jù) ()。 filePath = ().getAbsolutePath()。// 用于選擇保存路徑的文件名 int bcf = (jf)。 filePath = () + ()。 // } // } // } FileDialog dialog = new FileDialog(new JFrame(), 保存 ...., )。 // } // finally{ // if(bw != null){ // try{ // ()。 // } // catch(FileNotFoundException e1){ // ()。 // try{ // bw = new BufferedWriter(new FileWriter(file))。 // File file = new File(filePath)。 17 // (true)。 } } } } })。 } finally { if (br != null) { try { ()。 } catch (FileNotFoundException e1) { ()。 while ((str = ()) != null) { (str).append(\n)。 try { br = new BufferedReader(new FileReader(file))。 BufferedReader br = null。 (filePath)。 (true)。 // (())。 // int returnval = (jfile)。 // (filter)。 16 // 打開(kāi)菜單項(xiàng)的功能實(shí)現(xiàn) (new ActionListener() { public void actionPerformed(ActionEvent e) { // JFileChooser jfile = new JFileChooser()。 } new notebook()。 ()。// 獲取文件保存的路徑 (con)。 if (bcf == ) { try { // 保存文件 BufferedWriter bfw = new BufferedWriter( new FileWriter(new File(jfc .getSelectedFile() .getAbsolutePath() + .txt)))。 } else if (result == ) {// 取消新建 } else if (result == )// 選擇保存 { JFileChooser jfc = new JFileChooser()。 if (!()) {// 文本域里文本不為空 int result = (null, (是否要保存? ), (保存文件 ...), )。 (exititem)。 MenuItem exititem = new MenuItem(退出( X) )。 (false)。 (new MenuShortcut(, false))。 (false)。 (new MenuShortcut(, false))。 (saveasitem)。 MenuItem saveasitem = new MenuItem(另存為( A) )。 (new MenuShortcut(, false))。 (openitem)。 MenuItem openitem = new MenuItem(打開(kāi)( O) )。 (new MenuShortcut(, false))。 (helpmenu)。 (formatmenu)。 (filemenu)。 Menu viewmenu = new Menu(查看( V) )。 Menu editmenu = new Menu(編輯( E) )。 ()。 (content)。 (menu)。 (true)。 (100, 100, 500, 500)。 public notebook() { // 創(chuàng)建一個(gè) JFrame對(duì)象;并設(shè)置相關(guān)屬性 14 final JFrame jf = new JFrame(我的記事本 )。 Toolkit toolKit = ()。 private String filePath = 。 public class notebook { // 記事本的具體實(shí)現(xiàn)類 private static final long serialVersionUID = 1L。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 13 import 。 import 。 import 。 import 。 import 。 刪除模塊的詳細(xì)設(shè)計(jì) 運(yùn)行程序,打開(kāi)一個(gè)文本文檔,在菜單欄上選中編輯菜單或者在文檔中右鍵鼠標(biāo)菜單選中“刪除”,程序判斷文本文檔是否有已選中的內(nèi)容,如果有就將選中的內(nèi)容刪除掉,沒(méi)有就執(zhí)行其他操作。 復(fù)制模塊的詳細(xì)設(shè)計(jì) 打開(kāi)一個(gè)文本文檔,當(dāng)用戶選擇編輯菜單或右鍵彈出菜單中的復(fù)制操作后,判斷一個(gè)文本是否被選中,若已選中,將選中的文字傳輸?shù)较到y(tǒng)剪切板中,否則不進(jìn)行任何操作。 編輯模塊的詳細(xì)設(shè)計(jì) 撤銷模塊的詳細(xì)設(shè)計(jì) 打開(kāi)一個(gè)文本文檔,當(dāng)用戶選擇編輯或右鍵彈出菜單中的撤消操作后,判斷一個(gè)文本是否已被修改,若已修改,撤消上一步的操作,否則不進(jìn)行任何操作。如果選擇“是”,先保存文檔,再退出程序。如果修改過(guò),保存對(duì)文檔的修改。如果選擇“否”,則直接打開(kāi)文件。如果未修改過(guò),則打開(kāi)選擇的文本文件。如果選擇“否”,則直接新 建一個(gè)空文本文檔。如果未修改過(guò),則新建一個(gè)空文本文檔。 功能 需求 新建、 打開(kāi)、保存、另存為、剪切、復(fù)制、粘貼、刪除等記事本常規(guī)操作 其他需求 除了常規(guī)操作以外,我們還有些東西需要添加進(jìn)去,這里面我們包括字體顏色,還有查找方面的操作,對(duì)于整個(gè)記事本,我們還會(huì)添加我們記事本的作者,和相關(guān)信息。 本次課程設(shè)計(jì)的實(shí)例雖然比較簡(jiǎn)單,程序設(shè)計(jì)也不是很復(fù)雜,但在此程序的設(shè)計(jì)過(guò)程也是一個(gè)學(xué)習(xí)過(guò)程,更是對(duì)復(fù)雜程序的一個(gè)學(xué)習(xí)過(guò)程,還能培養(yǎng)我們的數(shù)抽象能力。為了適應(yīng)時(shí)代潮流,我們應(yīng)該加強(qiáng)對(duì) Java 的學(xué)習(xí),更好的掌握這門課程。1 軟件工程課程設(shè)計(jì) 報(bào)告 題 目 : 模擬記事本程序 專業(yè)班級(jí) : 計(jì)科 10102 班 姓 名
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1