| // |
| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you under the Apache License, Version 2.0 (the |
| // "License"); you may not use this file except in compliance |
| // with the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, |
| // software distributed under the License is distributed on an |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| // KIND, either express or implied. See the License for the |
| // specific language governing permissions and limitations |
| // under the License. |
| // |
| |
| = DevFaqWindowsGeneral |
| :jbake-type: wiki |
| :jbake-tags: wiki, devfaq, needsreview |
| :jbake-status: published |
| :keywords: Apache NetBeans wiki DevFaqWindowsGeneral |
| :description: Apache NetBeans wiki DevFaqWindowsGeneral |
| :toc: left |
| :toc-title: |
| :syntax: true |
| |
| === What is the Window System? |
| |
| The windowing system is what creates the main application window, and makes it |
| possible to open components in the UI. The API for the windowing system is in the package |
| `org.openide.windows`. The implementation of the windowing system is in the module |
| `org.netbeans.core.windows` (core.windows in Mercurial repository, was core/windows in CVS). |
| |
| The window system defines link:DevFaqWindowsMode.asciidoc[Mode]s which are places in the main window |
| occupied by tabbed containers. link:DevFaqWindowsTopComponents.asciidoc[TopComponent]s are GUI |
| components (instances or subclasses of `org.openide.windows.TopComponent` which |
| can be put into these tabbed containers. |
| |
| There is a link:DevFaqModulesDeclarativeVsProgrammatic.asciidoc[programmatic API] for creating/opening |
| TopComponents - this is useful for testing components under development - just create an Action which |
| calls `new MyTopComponent().open()` to quickly try out GUI components. |
| |
| However, the main API modules use the link:DevFaqWindowsWstcrefAndFriends.asciidoc[declarative XML Window System API] to install their components, for the following reasons: |
| |
| * Scalability: Components do not need to be created/deserialized unless they really need to be opened |
| * Singletonization: You wouldn't want to have 5 Projects tabs in the IDE. Using the XML API correctly, you can easily refer to the singleton instance of your component once it's instantiated (almost) for free. |
| * Persistence: The window system associates components with unique IDs; to properly persist your component across sessions, you need to use the XML APIs |
| |
| === Apache Migration Information |
| |
| The content in this page was kindly donated by Oracle Corp. to the |
| Apache Software Foundation. |
| |
| This page was exported from link:http://wiki.netbeans.org/DevFaqWindowsGeneral[http://wiki.netbeans.org/DevFaqWindowsGeneral] , |
| that was last modified by NetBeans user Cvdenzen |
| on 2012-02-16T12:52:35Z. |
| |
| |
| *NOTE:* This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed. |