| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| |
| <head> |
| |
| <title>Writing POV-Ray Support for NetBeans X—Conclusion</title> |
| <link rel="stylesheet" type="text/css" href="https://netbeans.org/netbeans.css"/> |
| <meta name="AUDIENCE" content="NBUSER"/> |
| <meta name="TYPE" content="ARTICLE"/> |
| <meta name="EXPIRES" content="N"/> |
| <meta name="developer" content="geertjan.wielenga@oracle.com"/> |
| <meta name="indexed" content="y"/> |
| <meta name="description" |
| content="NetBeans POV-Ray Support Tutorial Part X—UI Tuning and Miscellanea"/> |
| <!-- Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. --> |
| <!-- Use is subject to license terms.--> |
| |
| </head> |
| |
| <body> |
| |
| <h1>Writing POV-Ray Support for NetBeans X—Conclusion</h1> |
| |
| <p>This is a continuation of the tutorial for building POV-Ray support for |
| NetBeans. If you have not read the <a href="nbm-povray-1.html">first</a>, |
| <a href="nbm-povray-2.html">second</a>, <a href="nbm-povray-3.html">third</a>, |
| <a href="nbm-povray-4.html">fourth</a>, <a href="nbm-povray-5.html">fifth</a>, |
| <a href="nbm-povray-6.html">sixth</a>, <a href="nbm-povray-7.html">seventh</a>, |
| <a href="nbm-povray-8.html">eighth</a>, and <a href="nbm-povray-9.html">ninth</a> |
| parts of this tutorial, you may want to start there.</p> |
| <p>At this stage, you have completed the application, which should look like this:</p> |
| <p><a href="../images/tutorials/povray/71/ch7/pic1.png"><img alt="" src="../images/tutorials/povray/71/ch7/pic2.png"/></a></p> |
| <p>Additional steps to take to improve and enhance the application:</p> |
| <ul> |
| <li>Test your application. (See the <a href="https://platform.netbeans.org/tutorials/nbm-test.html">Test Infrastructure Tutorial</a>.)</li> |
| <li>Hide the menus and toolbar buttons that you don't need in your application.</li> |
| <li>Add a Plugin Manager so that users can install new features at runtime.</li> |
| <li>Localize the application.</li> |
| <li>Customize the display text in the title bar.</li> |
| <li>Customize the splash screen, icons, and NetBeans Platform display texts.</li> |
| <li>Create an installer.</li> |
| </ul> |
| |
| <h2 class="tutorial"><a name="key"></a>Key Points</h2> |
| |
| <p>We now have our POV-Ray rendering application working exactly as we want. During the course |
| of this tutorial, many NetBeans Platform topics have been covered. Here they |
| are listed, per part:</p> |
| |
| <ul class="toc"> |
| <li>Part 1: <a href="nbm-povray-1.html">Application Structure & File Support</a>—Here |
| you learn how to set up a NetBeans Platform application, how to create modules, |
| and how the NetBeans Platform distinguishes between different types of files.</li> |
| <li>Part 2: <a href="nbm-povray-2.html">Project Type Design</a>—Before beginning to |
| code, you spend some time examining the requirements of the application and how you will |
| implement those requirements.</li> |
| <li>Part 3: <a href="nbm-povray-3.html">Implementing a Project Type</a>—Here you learn |
| how the NetBeans Platform is able to recognize a set of folders and files on disk as being |
| POV-Ray projects. By the end of this section, you're able to open POV-Ray projects into your |
| application.</li> |
| <li>Part 4: <a href="nbm-povray-4.html">Providing Project Templates</a>—You install |
| your POV-Ray Project module into NetBeans IDE, so that the IDE is able to |
| recognize POV-Ray projects. You then create some POV-Ray projects and create |
| project template wizards, registering them in the module so that they're |
| available to your users via the New Project dialog.</li> |
| <li>Part 5: <a href="nbm-povray-5.html">Creating an API</a>—Here you create a provider |
| of main files, a rendering service, and a viewing service. You are shown how to encapsulate |
| these interfaces in a separate module, how to load that module on demand, and how to share |
| it with the other two modules in the application. A first usage of one of the APIs is |
| described—the <tt>Node</tt> of a POV-Ray file will be bold-faced if the |
| main file provider indicates that the <tt>Node</tt> represents the main file of the project.</li> |
| <li>Part 6: <a href="nbm-povray-6.html">Implementing the API</a>—In this section, you |
| learn how implement the APIs created in the previous part, you add <tt>Actions</tt> to the <tt>Node</tt> |
| for setting the main file and for rendering POV-Ray files, and you add some plumbing code for |
| locating the POV-Ray executable.</li> |
| <li>Part 7: <a href="nbm-povray-7.html">Support For Running POV-Ray</a>—For the first time, |
| you actually begin working directly with the POV-Ray executable. By the end of this section, |
| you're able to actually render POV-Ray files and display the rendered images.</li> |
| <li>Part 8: <a href="nbm-povray-8.html">Implementing ViewService and its Actions</a>—An <tt>Action</tt> |
| for opening images, and rendering them if they don't already exist, is added. You're also introduced |
| to the topic of icon badging, which you use to distinguish between <tt>Nodes</tt> representing files |
| that have been rendered and those that represent files that haven't been rendered.</li> |
| <li>Part 9: <a href="nbm-povray-9.html">Build Support</a>—You now move away from working with the <tt>Node</tt> |
| representing POV-Ray files. Instead, you work on the project node and add new project actions, for rendering |
| the main file of the POV-Ray project, for setting the main file if it has not been set, and for closing |
| the project.</li> |
| </ul> |
| |
| <h2 class="tutorial"><a name="next"></a>Next Steps</h2> |
| |
| <p>Now that you have completed the POV-Ray tutorial, what should |
| you do next?</p> |
| |
| <ul> |
| <li>With the concepts you've learned and applied in this tutorial, |
| take another look at the <b><a href="http://wiki.netbeans.org/NbmIdioms">Introduction |
| to NetBeans Idioms and Infrastructure</a></b>, which reinforces |
| a lot of the concepts you have encountered in this tutorial. |
| </li> |
| <li>Explore the <a href="http://wiki.netbeans.org/NetBeansDeveloperFAQ">NetBeans Developer FAQ</a>, |
| focusing on the specific topics you're interested in. |
| </li> |
| <li>Gain some more practical experiences by joining one |
| of the many NetBeans Platform open |
| source projects: <a href="http://java.net/projects/netbeans">http://java.net/projects/netbeans</a> |
| </li> |
| <li> |
| Stay in tune with the latest NetBeans API changes, |
| by looking through this page now and again: |
| <a href="http://bits.netbeans.org/dev/javadoc/apichanges.html">http://bits.netbeans.org/dev/javadoc/apichanges.html</a> |
| </li> |
| <li>As you learn more about the NetBeans Platform, blog about |
| your experiences. You can publish or republish your |
| blog entries, articles, tips, or any other thoughts |
| here on NetBeans Zone: <a href="http://netbeans.dzone.com/">http://netbeans.dzone.com/</a> |
| <li>When you have an application ready, ask for it to be |
| added to the <a href="https://platform.netbeans.org/screenshots.html">NetBeans Platform Showcase</a>, |
| which is a great page to look through when beginning your project, since more |
| than likely a similar project that you can learn from, possibly in the open source community, |
| already exists. |
| </li> |
| <li>Read and work through |
| the <a href="https://platform.netbeans.org/tutorials/nbm-porting-basic.html">NetBeans Platform Porting Tutorial</a> and |
| apply its principles to your own existing applications.</a> |
| </ul> |
| |
| <h2 class="tutorial"><a name="appendix"></a>Appendix: Setting Up POV-Ray</h2> |
| |
| <p>Mac users may find |
| <a href="http://darwinports.opendarwin.org/">DarwinPorts</a> the easiest |
| way—simply install DarwinPorts and then run |
| <code>sudo port install povray</code>.</p> |
| |
| <p>Linux and other Unix users should be |
| fine with the downloads available from <a href="http://povray.org/">povray.org</a>. |
| Everything should work out of the box for these users, without any tweaks |
| or post-install configurations. Make sure, however, that the POV-Ray |
| launcher has the correct permissions, otherwise it will not execute. Run it from |
| the command line to check that it executes.</p> |
| |
| <p>Under Windows, life is slightly more complicated. Take |
| the following steps to set up POV-Ray:</p> |
| |
| <ol> |
| |
| <li>Download the newest stable version of POV-Ray for Windows: |
| <a href="http://povray.org/download">http://povray.org/download</a> |
| </li> |
| |
| <li><p>Run the downloaded file and install into "C:\POVRay" or some |
| other directory, while making sure that the path has no spaces, even |
| though the installer will prompt you to install in a directory |
| with spaces. For example, change the suggested destination directory to "C:\POVRay", |
| as shown here:</p> |
| |
| <p><img alt="" src="../images/tutorials/povray/71/ch10/pov-windows-1.png"/></p> |
| |
| <p class="notes"><b>Note:</b> Do not let the installer install the application |
| into the destination directory "C:\Program Files" or into |
| any of that directory's subfolders. |
| |
| </p><p class="tips"><b>Note:</b> Read the above note again. |
| |
| </p><p></p></li><li>Open the POV-Ray application. Do the following: |
| |
| <ul> |
| <li><p>Disable I/O restrictions to avoid input and output warnings on |
| each render: Options | Script I/O Restrictions | No Restrictions.</p> |
| <p><img alt="" src="../images/tutorials/povray/71/ch10/pov-windows-2.png" /></p> |
| </li> |
| <li><p>To facilitate smooth interoperability with the plugin that |
| you will create, ensure that POV-Ray will exit when rendering |
| completes: Render | On Completion | Exit POV-Ray for Windows.</p> |
| <p><img alt="" src="../images/tutorials/povray/71/ch10/pov-windows-3.png" /></p> |
| </li> |
| </ul> |
| |
| </li> |
| |
| </ol> |
| |
| <p class="notes"><b>Note:</b> POV-Ray for Windows cannot process paths with spaces. When |
| you use the application that you will create to create POV-Ray projects, make |
| sure that you create them in directories without spaces in their paths. The |
| name of the project must not have any spaces either.</p> |
| |
| </body> |
| |
| </html> |