| <!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>What's New in NetBeans Platform 7.1?</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="gwielenga@netbeans.org"/> |
| <meta name="indexed" content="y"/> |
| <meta name="description" content="Overview of new features in NetBeans Platform 6.9"/> |
| </head> |
| <body> |
| <h1>What's New in NetBeans Platform 7.1?</h1> |
| <p>An overview of changes relating to |
| <a href="https://platform.netbeans.org/">NetBeans Platform 7.1</a>, which is the |
| Swing framework that underpins applications such as NetBeans IDE.</p> |
| <p><b>Note:</b> <a href="70.html">Click here</a> for the previous |
| release of this document.</p> |
| <p>The most important new features & enhancements provided in the 7.1 release |
| are as follows: |
| <div class="indent"> |
| <ol> |
| <li><b>Window System API.</b> |
| <p></p> |
| <ul> |
| <li><p><b>Roles.</b> Multiple window layouts are supported. The |
| TopComponent registration annotation has been enhanced to |
| include a new "roles" attribute, so that each TopComponent |
| can optionally be assigned to one or more roles. It is |
| possible to programmatically switch between different roles |
| and then the window layout is automatically updated to |
| support the newly selected role.</p> |
| <p>Javadoc: |
| <ul> |
| <li><tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.Registration.html#roles%28%29">roles</a></tt></li> |
| <li><tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowManager.html#setRole%28java.lang.String%29">WindowManager.setRole</a></tt></li> |
| <li><tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowManager.html#getRole%28%29">WindowManager.getRole</a></tt></li> |
| </ul> |
| </p> |
| </li> |
| <li><b>Enriched Group Behavior.</b> |
| <ul> |
| <li>TopComponents |
| in "View" modes can now be undocked |
| moved, minimized/maximized together.</li> |
| <li>TopComponents |
| in "View" modes can now be dropped into |
| "Editor" modes and vice versa. </li> |
| <li>There is |
| a new mode, named "topSlidingSide" for |
| docking TopComponents in a minimized state |
| in the upper side of the application.</li> |
| </ul> |
| <li><p><b>Window Layout Designer.</b> In the New File dialog, there is |
| now a Window Layout designer:</p> |
| <p><img src="images/71/layout-wizard-1.png"/></p> |
| <p>It starts up a new instance |
| of your application, |
| then shows all the modes defined in your application, and |
| lets you reposition and rename existing modes while also letting |
| you create new ones. When you close the designer, you can save |
| changed and new mode definition files into your module, and |
| they will automatically be registered in the module's layer file.</p> |
| <p>The new "Redefine" button in the Window wizard lets you do the same:</p> |
| <p><img src="images/71/layout-wizard-2.png"/></p> |
| </li> |
| </ul> |
| </li> |
| <li><b>MultiView Windows API.</b> |
| <ul> |
| <li><b>MultiView Registration Annotation.</b> The new |
| annotation <a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-core-multiview/org/netbeans/core/spi/multiview/MultiViewElement.Registration.html"><tt>@MultiViewElement.Registration</tt></a> registers |
| a <tt><a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-core-multiview/org/netbeans/core/spi/multiview/MultiViewElement.html">MultiViewElement</a></tt> for a MIME type.</li> |
| <li><p><b>File Type Wizard With MultiView Component.</b> In the |
| New File Type dialog, there is a new "Use MultiView" checkbox. |
| When the checkbox is checked, the wizard generates a <tt>JPanel</tt> |
| that implements <tt><a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-core-multiview/org/netbeans/core/spi/multiview/MultiViewElement.html">MultiViewElement</a></tt> |
| and registers it in the <tt>DataObject</tt>, using the new annotation above:</p> |
| <p><img src="images/71/multiview-wizard.png"/></p> |
| </li> |
| </ul> |
| </li> |
| <li><b>File System API.</b> |
| <ul> |
| <li><b><tt>FileUtil.getConfigObject</tt>.</b> In addition to <tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-filesystems/org/openide/filesystems/FileUtil.html#getConfigRoot%28%29">FileUtil.getConfigRoot</a></tt> |
| and <tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-filesystems/org/openide/filesystems/FileUtil.html#getConfigFile%28java.lang.String%29">FileUtil.getConfigFile</a></tt>, there is now also <tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-filesystems/org/openide/filesystems/FileUtil.html#getConfigObject%28java.lang.String,%20java.lang.Class%29">FileUtil.getConfigObject</a></tt>. |
| It returns an object from the filesystem |
| via the object's full path, together with its type, such as to |
| an Action or to your own type, for example: |
| <p><pre class="examplecode">Feed feed = FileUtil.getConfigObject("RssFeeds/sample.instance", Feed.class);</pre></p> |
| <p><pre class="examplecode">Action myAction = FileUtil.getConfigObject("Actions/MyFolder/MyAction.instance", Action.class);</pre></p> |
| <p class="notes"><b>Note:</b> In NetBeans Platform 7.2, the above will be superseded by <tt>Actions.forID("MyFolder", "MyAction")</tt>.</p> |
| </li> |
| <li><p><b>New Layer Wizard.</b> The New Module Project wizard does not let |
| you define a layer.xml file for your module anymore. Instead, there is |
| a new template in the New File dialog for creating a layer file:</p> |
| <p><img src="images/71/layerxml-wizard.png"/></p> |
| <p>The |
| template creates an empty layer file and registers it in the manifest.</p></li> |
| </ul> |
| </li> |
| <li><b>Datasystems API.</b> |
| <ul> |
| <li><p><b>Template Registration Annotation.</b> Registers a template in the filesystem. |
| May be placed on a class (with a default constructor) or |
| static method (with no arguments) to register |
| an <tt>WizardDescriptor.InstantiatingIterator</tt> for a |
| custom template or on a package to register a |
| plain-file template with no custom behavior.</p> |
| <p>Javadoc: |
| <ul> |
| <li><tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-loaders/org/netbeans/api/templates/TemplateRegistrations.html">TemplateRegistrations</a></tt></li> |
| <li><tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-loaders/org/netbeans/api/templates/TemplateRegistration.html">TemplateRegistration</a></tt></li> |
| </ul> |
| </p> |
| </li> |
| </ul> |
| </li> |
| <li><b>UI Utilities API.</b> |
| <ul> |
| <li><p><b><tt>SaveCookie</tt>.</b> The <tt>SaveCookie</tt> interface |
| is replaced by the <tt>Savable</tt> interface, with |
| a default implementation provided |
| by <tt>AbstractSavable</tt>. However, <tt>SaveCookie</tt> |
| can still be used exactly as before.</p> |
| <p>Javadoc: |
| <ul> |
| <li><tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/netbeans/api/actions/Savable.html">Savable</a></tt></li> |
| <li><tt><a href="http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/netbeans/spi/actions/AbstractSavable.html">AbstractSavable</a></tt></li> |
| </ul> |
| </p> |
| </li> |
| </ul> |
| </li> |
| <li><b>Explorer & Property Sheet API.</b> |
| <ul> |
| <li><b>Corrected <tt>PropertyPanel</tt> Component.</b> Prior to 7.1, it was not |
| possible to drag and drop a <tt>PropertyPanel</tt> from the Palette into a container |
| in the Matisse GUI Builder. That bug has been fixed and now, once you |
| have registered the <tt>PropertyPanel</tt> in |
| the palette, you can drag and drop it.</li> |
| </ul> |
| </li> |
| |
| </ol> |
| </div> |
| <p>For a list of all the changes, see <a href="http://bits.netbeans.org/7.1/javadoc/apichanges.html">http://bits.netbeans.org/7.1/javadoc/apichanges.html</a></p> |
| </body> |
| </html> |