NetBeans Platform mandatory toolbar
"1sloba1" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
I figured out this puzzle.
I've missed to registered MyToolbarConfiguration as my default toolbar configuration, which needs to be done in Window Manager Properties file (windowManager.xml). At the end these files needs to be registered in layer.xml.
To make long story short:
1. Create /resources/MyToolbarConfiguration.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configuration PUBLIC "-//NetBeans IDE//DTD toolbar 1.1//EN"
"http://www.netbeans.org/dtds/toolbar1_1.dtd">
<Configuration>
<Row>
<Toolbar name="File" visible="false" draggable="false" align="right"/>
<Toolbar name="Clipboard" visible="false" draggable="false" align="right"/>
<Toolbar name="UndoRedo" visible="false" draggable="false" align="right"/>
<Toolbar name="Memory" visible="true" draggable="false" align="right"/>
<Toolbar name="Picture" visible="true" draggable="false" align="right"/>
</Row>
</Configuration>
2. Create /resources/windowManager.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE windowmanager PUBLIC
"-//NetBeans//DTD Window Manager Properties 2.1//EN"
"http://www.netbeans.org/dtds/windowmanager-properties2_1.dtd">
<windowmanager version="2.1">
<toolbar configuration="MyToolbarConfiguration" />
</windowmanager>
3. Register this files in layer.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem>
<folder name="Toolbars">
<file name="MyToolbarConfiguration.xml" url="/resources/MyToolbarConfiguration.xml">
<attr name="position" intvalue="100"/>
</file>
</folder>
<folder name="Windows2">
<file name="WindowManager.wswmgr" url="/resources/windowManager.xml" />
</folder>
</filesystem>
Thank you very much for suggestion links you've provided to me.