open source java office, day 15: files handling in the netbeans application framework

11

Click here to load reader

Upload: anthony-goubard

Post on 03-Jul-2015

743 views

Category:

Technology


1 download

DESCRIPTION

Day 15 of writing an open source office suite in Java. Today the files handling in the NetBeans Application Framework (new, open, save, save as, close)

TRANSCRIPT

Page 1: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

Joeffice

Files(New, Open, Save,

Save As, Close)

Day 1

5

Page 2: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

New File

➢ Templates works only if a project is created– Thanks to Sam Harwell to fit it in http://netbeans.org/bugzilla/show_bug.cgi?id=186943

➢ findDataObject("Templates/Other");

Page 3: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

New File

Page 4: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

New File

Page 5: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

Open

➢ OpenCookie➢ OpenSupport➢ DataObject : getCookieSet().add(OfficeOpenSupport.class, this);

Page 6: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

Open

● CookieSet.Factory

Page 7: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

Close

● CloseCookie that does nothing● Implement closeLast of CloneableTopComponent

Page 8: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

Save

● SaveCookie

Page 9: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

Save As

● Implement SaveAsCapable interface

Page 10: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

Page 11: Open source Java office, day 15: files handling in the NetBeans Application Framework

http://www.joeffice.org © Copyright 2013 - Japplis

Joeffice

● Java Office Suite● Open Source (Apache licence 2.0)● Offline & Online● Tabs and docking editors● Works on Windows, MacOS X, Linux