<!-- <questionid="arch-what"> Whatisthisprojectgoodfor? <hint> Pleaseprovideherefewlinesdescribingthetheproject, whatproblemitshouldsolve,providelinkstodocumentation, specifications,etc. </hint> </question>
-->
<answer id="arch-what">
The plaf library consists primarily of code that used to be in core. What it does:
<ul>
<li>Installs a custom look and feel if a custom look and feel class is passed to it</li>
<li>Sets the correct fonts in the Swing UIDefaults if a custom fontsize is desired for the application's UI</li>
<li>Loads a UI theme if a URL for the theme file (no format changes since NetBeans 3.4) is passed to it</li>
<li>Installs custom UI keys and values used by other components of NetBeans, such as colors and UI delegate class names used by
other parts NetBeans. Examples of these:
<ul>
<li>Tab control UI delegate class name, depending on the look and feel, for the window system</li>
<li>Definitions of colors which the tab control, property sheet and output window will use, if present in
UIDefaults, to color themselves in accordance with the UI spec for them on a given look and feel</li>
<li>Custom border implementations NetBeans uses for scroll panes to reduce "border-buildup"</li>
<li>A custom implementation of ToolbarUI which NetBeans uses for its toolbars, and a custom UI for
toolbar buttons which sizes them correctly (GTK and Aqua only, currently)</li>
<li>Insets definition for the editor scrollbar, used to get the height of the upper and lower button of the scrollbar
for purposes of the Error Stripe. The appropriate key value is "Nb.Editor.ErrorStripe.ScrollBar.Insets".
</li>
</ul>
</li>
<li>Compensate for missing elements on some (GTK) look and feels, which standard Swing code expects to be
present, i.e. UIManager.getColor ("control"), to enable older code to run unmodified on newer
look and feels.</li>
</ul>
Its API consists of a single method, org.netbeans.swing.plaf.Startup.run (Class lookAndFeel, int fontSize, URL themeFile),
which should be called early in NetBeans startup sequence by core, to initialize UIDefaults values before any main window
GUI is constructed. It provides a minimal SPI in the form of the abstract class LFCustoms, which an alternate look and
feel could use to provide lists of keys and values which should be installed into UIDefaults, via the mechanism documented
in the documentation for LFCustoms.
<!-- <questionid="dep-nb"> WhatotherNetBeansprojectsdoesthisonedependon? <hint> Ifyouwant,describesuchprojectsasimportedAPIusing the<code><apiname="identification"type="importorexport"category="stable"url="whereisthedescription"/></code> </hint> </question>
-->
<answer id="dep-nb">
None, it is a standalone library that could be used in other
applications.
</answer>
<!-- <questionid="deploy-packages"> Arepackagesofyourmodulemadeinaccessiblebynotdeclaringthem public? <hint> NetBeansmodulesystemallowsrestrictionofaccessrightsto publicclassesofyourmodulefromothermodules.Thisprevents unwanteddependenciesofothersonyourcodeandshouldbeused wheneverpossible(<ahref="http://www.netbeans.org/download/apis/org/openide/doc-files/upgrade.html#3.4-public-packages"> publicpackages </a>). </hint> </question>
-->
<answer id="deploy-packages">
No. There is one root package containing the API, and several per-look-and-feel packages
containing implementations of standard Swing UI delegates (such as a custom toolbar UI for
Aqua and GTK look and feels), and custom implementations of Border and such. Swing's mechanism
for loading a UI delegate is by fetching the UI class name from UIDefaults and creating an
instance of that class, so the UI delegates must be publicly accessible for Swing to be able
to load them.
</answer>
<!-- <questionid="deploy-shared"> Doyouneedtobeinstalledinthesharedlocationonly,orintheuserdirectoryonly, orcanyourmodulebeinstalledanywhere? <hint> Installationlocationshallnotmatter,ifitdoesexplainwhy. Consideralsowhether<code>InstalledFileLocator</code>canhelp. </hint> </question>
-->
<answer id="deploy-shared">
It is a library, not a module, because its code must run very early in the startup sequence,
before other GUI is constructed, so that all GUIs will have the correct colors, borders, UI
delegates, etc. All of this was formerly done directly in core.
</answer>
<!-- <questionid="exec-component"> Isexecutionofyourcodeinfluencedbyany(string)property ofanyofyourcomponents? <hint> Often<code>JComponent.getClientProperty</code>,<code>Action.getValue</code> or<code>PropertyDescriptor.getValue</code>,etc.areusedtoinfluence abehaviourofsomecode.Thisofcourseformsaninterfacethatshould bedocumented.Alsoifonedependsonsomeinterfacethatanobject implements(<code>componentinstanceofRunnable</code>)thatformsan APIaswell. </hint> </question>
-->
<answer id="exec-component">
For testing purposes only, the system property "nb.forceui" can be used to
load NetBeans customizations for a different look and feel (such as loading the custom
Aqua UI delegates on Windows). The only purpose for this flag is to enable
development/bug fixing and minimal testing when a developer is working on a machine
that does not support the requested look and feel, and they want to be sure they
have not broken anything.
</answer>
<!-- <questionid="exec-privateaccess"> Areyouawareofanyotherpartsofthesystemcallingsomeof yourmethodsbyreflection? <hint> Ifso,describethe"contract"asanAPI.Likelyprivateorfriendone,but stillAPIandconsiderrewriteofit. </hint> </question>
-->
<answer id="exec-privateaccess">
Swing will resolve and load UI classes which are added to UIDefaults, which are defined in
this library, when a component needs a UI delegate.
</answer>
<!-- <questionid="exec-property"> Isexecutionofyourcodeinfluencedbyanyenvironmentor Javasystem(<code>System.getProperty</code>)property? <hint> Ifthereisapropertythatcanchangethebehaviourofyour code,somebodywilllikelyuseit.Youshoulddescribewhatitdoes andthestabilitycategoryofthisAPI.Youmayuse <pre> <propertyname="id"category="private"> descriptionoftheproperty,whereitisused,whatitinfluence,etc. </property> </pre> </hint> </question>
-->
<answer id="exec-property">
<api name="LookAndFeelClassName" category="devel" group="property"type="export">
The module initializes proper Look&Feel. The decision is done
based on various inputs including what has been specified on command
line. To allow easier branding for those who build applications
on top of NetBeans, there is key <code>LookAndFeelClassName</code>
in <code>org.netbeans.swing.plaf.Bundle</code>
bundle which can be branded to actual name of the L&F class.
The module will decide which sets of customizations to load based on
the chosen look and feel.
</api>
<api name="LookAndFeelCustomsClassName" category="devel" group="property"type="export">
The module adds some UIManager keys and values to provide e.g. special
border for main window toolbar or UI classes for tab control headers.
By default the proper subclass of LFCustoms is derived from current
Look and Feel name. Applications building on top of NetBeans can provide
their own look and feel customizations by branding <code>LookAndFeelCustomsClassName</code>
key in <code>org.netbeans.swing.plaf.Bundle</code>
bundle.
</api>
</answer>
<!-- <questionid="exec-reflection"> DoesyourcodeuseJavaReflectiontoexecuteothercode? <hint> ThisusuallyindicatesamissingorunsufficientAPIintheother partofthesystem.Iftheothersideisnotawareofyourdependency thiscontractcanbeeasilybroken. </hint> </question>
-->
<answer id="exec-reflection">
If org.openide.util.Utilities is not resolvable, it will use ImageIO.read() to
load images.
</answer>
<!-- <questionid="format-types"> Whichfileformats(ifany)doesyourcodereadorwriteondisk? </question>
-->
<answer id="format-types">
NetBeans theme support (formerly core.NbTheme) has been moved into this library,
so it will read Metal LF special theme files.
</answer>
<!-- <questionid="perf-mem"> Howmuchmemorydoesyourcomponentconsume?Estimate witharelationtothenumberofwindows,etc. </question>
-->
<answer id="perf-mem">
A marginal amount of memory for String, Border, Insets and Color objects added to UIDefaults.
For components which install a very large number of these, the keys and values are bootstrapped
into UIDefaults the first time the component's UI class is requested, by using a subclass
of UIDefaults.LazyValue
</answer>
<answer id="arch-quality">
Some unit tests may be provided in the future; the per-look-and-feel classes are simply
a mechanism to provide mainly a list of strings to put into UIDefaults - they could (and may be
eventually) be replaced by XML theme files.
</answer>
<answer id="arch-usecases">
Used by NetBeans to customize the UI to conform to UI design specifications; can be used by
third parties who are employing parts of the NetBeans platform in their applications, such as
the windowing system.
</answer>
<answer id="deploy-dependencies">
Components such as the window system, which use values defined here, will behave in a reasonable
way if those values are not defined. However, it is preferable that they declare a runtime
dependency on the plaf library.
</answer>
<answer id="exec-threading">
First come first served - the single API method is meant to be called once (this is enforced) by
an application on startup. It does not matter on which thread; what is important is that the
application do so before constructing its main GUI.
</answer>
<answer id="perf-spi">
N/A
</answer>
<answer id="security-grant">
No.
</answer>
<answer id="security-policy">
No.
</answer>
</api-answers>
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.