| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html><head></head><script charset="utf-8" id="injection_graph_func" src="nbm_interview_toni-1_bestanden/injection_graph_func.js"></script><link href="nbm_interview_toni-1_bestanden/injection_graph.css" type="text/css" rel="stylesheet" charset="utf-8" id="injection_graph_css"><body> |
| <h1>Meet a NetBeans Module Writer: Tonny Kohar</h1> |
| <table class="ltblue" align="right" border="1" cellpadding="5" cellspacing="0" width="190"> |
| <tbody> |
| <tr> |
| <td align="center"><img border="1" src="nbm_interviews/tonny/tonny2.png" alt="Tonny's picture" align="middle"> |
| |
| <br><b>Tonny Kohar</b></td> |
| </tr> |
| <td>Tonny's Hot Links: |
| <ul> |
| <li><a href="http://blogs.kiyut.com/tonny/category/java/netbeans/">My Blog with NetBeans Platform Tricks</a> |
| </ul> |
| |
| |
| </tbody> |
| </table> |
| |
| |
| <p>Citra FX is a filter effects tool for digital photos or images. It |
| allows anyone, regardless of experience, to give unique artisitic looks |
| to their digital images. In other words, it is a dark room for |
| digital photos. |
| |
| <p>Since Citra FX is not a general purpose photo editing software, like |
| industry leader Adobe Photosho or the GIMP open source graphics package, |
| the user interface flow is totally different. It does not have |
| a complex layer tool, brush, and so on. Instead it tries to simplify the user |
| experience radically. This simplistic user interface experience allows anyone, |
| with or without graphics expertise, to use Citra FX to produce |
| impressive photo effects. |
| |
| <p><img src="nbm_interviews/tonny/citra.png" alt="citra pic" align="middle"> |
| |
| <p>Using the <a href="https://platform.netbeans.org">NetBeans Platform</a> for the |
| base framework, |
| <a href="http://www.jhlabs.com/ip/filters/index.html">JHLabs</a> |
| for the image filter math, and JDK 6, Tonny Kohar and his team have been able able to produce |
| Citra FX as a cross platform tool, making it easy to develop and extend via |
| plugins, with advanced graphics filtering capabilities. |
| |
| |
| <h3>First, Tonny, what has been your role on this project?</h3> |
| |
| <p>I am the product manager for Citra FX. I have been with the project since the |
| beginning of April 2007. |
| |
| <h3>And what are the new features in this release?</h3> |
| |
| <ul> |
| <li>New background -> plain or checkerboard |
| <li>New Boolean Selection, shift key (union) ctrl key (subtract) |
| <li>New Filter Blur -> Smart Blur |
| <li>New Filter Blur -> Unsharp Mask |
| <li>New Filter Mask -> Mask Effects |
| <li>New command line open options |
| <li>Migration to NetBeans Platform 6 RC1 |
| </ul> |
| |
| <p>This is also the first of our products that utilizes NetBeans Platform 6 features, |
| such as the new <a href="http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/NbPreferences.html">NbPreferences</a> class |
| in the <a href="http://bits.netbeans.org/dev/javadoc/org-openide-util/overview-summary.html">Utilities API</a>, |
| the <a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-sendopts/overview-summary.html">Command Line Parsing API</a>, |
| and the new positioning attribute in the <tt>layer.xml</tt> file. |
| |
| <h3>What are some things you've learned while working on this release, |
| in terms of project management as well as in terms of coding?</h3> |
| |
| <p>If you still remember <a href="https://platform.netbeans.org/articles/nbm_interview_tonny.html">our |
| last interview</a>, at that time I was learning and appreciating |
| the NetBeans Platform <a href="http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/lookup/package-summary.html">Lookup</a> |
| package, which is part of the <a href="http://bits.netbeans.org/dev/javadoc/org-openide-util/overview-summary.html">Utilities API</a>. |
| This time I've learned a lot about NetBeans Platform branding. We |
| can now totally brand our application, from the splash screen, |
| to the About dialog, even all the way down to the updater splash screen. |
| So, now we can comply completely with our branding specification! |
| |
| <p>As I go along with our projects, I usually write blog entries about |
| things I've learned. The blog is here: |
| |
| |
| <p><a href="http://blogs.kiyut.com/tonny/category/java/netbeans/">http://blogs.kiyut.com/tonny/category/java/netbeans/</a> |
| |
| <p>I also really appreciate the NetBeans Platform backward |
| compatibility design, it is excellent and well thought through. |
| Initially, we developed Citra FX on top of NetBeans Platform 5.5.1, then in the |
| middle period we switched to NetBeans Platform 6 M10, NetBeans Platform 6 Beta 1, and |
| then NetBeans 6 RC1. Each time, the migration process ran very smoothly. Things |
| that surprised me was there were no errors at all, only warnings (which were |
| easy to fix), although |
| it is a migration from the NetBeans 5.5.1 to 6 series. This is a real |
| productivity boost in the project management area. |
| |
| <p>We also appreciate the NetBeans Platform 6 Command Line Parsing API and |
| the NbPreferences API. Only a few lines of code added and voila our application |
| suddenly has a new feature. |
| |
| <h3>Can you give us a code snippet or other technical Java tip that you would like to share, as a result of something learned on this project?</h3> |
| |
| <p>This is how we implement Command Line Parsing API to parse command line argument |
| to automatically open file when the application started. |
| |
| <pre> |
| citra myphoto.jpg |
| citra -open myphoto.jpg |
| citra -o myphoto.jpg |
| </pre> |
| |
| <pre> |
| |
| public class CitraOptionProcessor extends OptionProcessor { |
| |
| private Option openOption = Option.defaultArguments(); |
| private Option openOption2 = Option.additionalArguments('o', "open"); |
| |
| public Set<Option< getOptions() { |
| HashSet<Option> set = new HashSet<Option>(); |
| set.add(openOption); |
| set.add(openOption2); |
| return set; |
| } |
| |
| public void process(Env env, Map values) throws CommandException { |
| |
| List<String> filenameList = new ArrayList<String>(); |
| |
| Object obj = values.get(openOption); |
| if (obj != null) { |
| filenameList.addAll(Arrays.asList((String[]) obj)); |
| } |
| |
| obj = values.get(openOption2); |
| if (obj != null) { |
| filenameList.addAll(Arrays.asList((String[]) obj)); |
| } |
| |
| if (filenameList.isEmpty()) { |
| return; |
| } |
| |
| File file = new File(filenameList.get(0)); |
| if (!file.isAbsolute()) { |
| file = new File(env.getCurrentDirectory(), filenameList.get(0)); |
| } |
| |
| if (!file.exists() || !ImageUtilities.isFileImage(file)) { |
| return; |
| } |
| |
| try { |
| // replace the below line with your own, for example DataObject open cookie: |
| //FXContextManager.getInstance().open(file); |
| |
| } catch (OutOfMemoryError ex) { |
| String msg = Application.getMessage("MSG_OutOfMemoryError.Text"); |
| NotifyDescriptor nd = new NotifyDescriptor.Message(msg, NotifyDescriptor.ERROR_MESSAGE); |
| DialogDisplayer.getDefault().notify(nd); |
| } catch (Exception ex) { |
| NotifyDescriptor nd = new NotifyDescriptor.Message(ex.getMessage(), NotifyDescriptor.ERROR_MESSAGE); |
| DialogDisplayer.getDefault().notify(nd); |
| } |
| |
| } |
| } |
| |
| </pre> |
| |
| <p>To use the Command Line Parsing API, you basically need to do the following: |
| |
| <ol> |
| <li>Create a <tt>META-INF/services</tt> folder in the source folder. |
| <li>Put a file there with the name <tt>org.netbeans.spi.sendopts.OptionProcessor</tt>. |
| <li>Inside that file put the text <tt>kiyut.citra.CitraOptionProcessor</tt> on the first line. |
| <li>Then implement that class. |
| </ol> |
| |
| <h3>Can you show us some more screenshots?</h3> |
| |
| <p>Of course! Here are two: |
| |
| <p><img src="nbm_interviews/tonny/citra-02.jpg" border="1" alt="citra pic" align="middle"> |
| |
| <p><img src="nbm_interviews/tonny/citra-03.jpg" border="1" alt="citra pic" align="middle"> |
| |
| |
| <h3>So is this product free? Can anyone use it without restrictions?</h3> |
| |
| <p>Citra FX Photo Filter is shareware, so you are free to try it. However, if |
| you decide to keep the software, a payment is required. Note that |
| if you are a non-profit, non-commercial, or educational institution, you |
| can get a license for free, just contact our sales department (sales at kiyut dot com). |
| |
| <h3>What are the plans for the next release?</h3> |
| |
| <p>In the short term, we would like to upgrade Citra FX to NetBeans 6 Final |
| Release (currently it is using NetBeans 6 RC1) and add more image |
| filters. |
| |
| <h3>Where can I download the current release?</h3> |
| |
| <p>The latest release is available at |
| <a href="http://www.kiyut.com/products/citra/index.html">http://www.kiyut.com/products/citra/index.html</a> under the download |
| section. |
| |
| <h3>Any other final thoughts to share?</h3> |
| |
| <p>We are glad that we are using NetBeans Platform, it really helped us a |
| lot during the development and got us faster to market. The NetBeans Platform lets us focus on our application instead of wasting resources |
| on developing our own framework. |
| |
| |
| |
| </p></body></html> |