blob: 17a68309739fc556584ea101541856bd3d105e37 [file] [log] [blame]
<!--
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.
-->
===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
<tt>org.openide.windows</tt>. The implementation of the windowing system is in the module
<tt>org.netbeans.core.windows</tt> (core.windows in Mercurial repository, was core/windows in CVS).
The window system defines [[DevFaqWindowsMode| Mode]]s which are places in the main window
occupied by tabbed containers. [[DevFaqWindowsTopComponents| TopComponent]]s are GUI
components (instances or subclasses of <tt>org.openide.windows.TopComponent</tt> which
can be put into these tabbed containers.
There is a [[DevFaqModulesDeclarativeVsProgrammatic| programmatic API]] for creating/opening
TopComponents - this is useful for testing components under development - just create an Action which
calls <tt>new MyTopComponent().open()</tt> to quickly try out GUI components.
However, the main API modules use the [[DevFaqWindowsWstcrefAndFriends| 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 http://wiki.netbeans.org/DevFaqWindowsGeneral ,
that was last modified by NetBeans user Cvdenzen
on 2012-02-16T12:52:35Z.