I have module application. When I run it, the main window of that app has quite complex menu. How to remove some items from menu?
我有模块的应用程序。当我运行它时,这个应用程序的主窗口有非常复杂的菜单。如何从菜单中删除一些项目?
4 个解决方案
#1
11
You can remove menu items from the menu bar by adding entries to your project's layer.xml file.
通过向项目层添加条目,可以从菜单栏中删除菜单项。xml文件。
You should read through 'Tweaking the User Interface' from the 'NetBeans Platform HTML Editor' tutorial to get a rough idea of what you will need to do.
你应该从“NetBeans平台HTML编辑器”教程中“调整用户界面”,以大致了解你需要做什么。
There is another tutorial-ish description of using the layer file to hide items, too.
还有另一种类似tutorial的描述,描述了如何使用图层文件来隐藏项目。
#2
3
In netbeans 8.0 , the layer file is generated when ever a module contains 'configuration type' annonations in java code, for example a module with top component. The generated layer.xml is located at build directory classes/META-INF/generated-layer.xml. However, the generated-layer.xml is not editable. To hide/show menubar / tool bar, click on the module, click other and add XML layer file. Now under the important files you can see XML layer. Expand it. Now expand . Expand the "Menu Bar". Delete the menu bar which you don't want.
在netbeans 8.0中,当一个模块在java代码中包含“配置类型”的声明时,就会生成层文件,例如一个带有顶层组件的模块。生成的层。xml位于build directory类/META-INF/generate -layer.xml中。然而,generated-layer。xml不是编辑。要隐藏/显示菜单栏/工具栏,请单击模块,单击其他并添加XML层文件。现在,在重要的文件下面,您可以看到XML层。扩大它。现在扩大。扩大“菜单栏”。删除你不想要的菜单栏。
#3
2
The easier way appears to be, as Martin Krauskopf wrote:
就像马丁·克劳斯科普夫(Martin Krauskopf)写道:
Just go to:
只是去:
Projects view (Ctrl-1) >> your module >> Important Files >> XML Layer >> Menu Bar >> Help
项目视图(Ctrl-1) >>模块>>重要文件>> XML层>>菜单栏>>帮助
and delete what you want (it will actually generate appropriate content in layer.xml of the module).
删除你想要的(它实际上会在层中生成适当的内容。xml的模块)。
#4
0
You can remove it in layer.xml
您可以用lay .xml删除它
layer in context - Menu Bar
层在上下文-菜单栏
here's the link
这是链接
http://platform.netbeans.org/tutorials/nbm-htmleditor.html
http://platform.netbeans.org/tutorials/nbm-htmleditor.html
#1
11
You can remove menu items from the menu bar by adding entries to your project's layer.xml file.
通过向项目层添加条目,可以从菜单栏中删除菜单项。xml文件。
You should read through 'Tweaking the User Interface' from the 'NetBeans Platform HTML Editor' tutorial to get a rough idea of what you will need to do.
你应该从“NetBeans平台HTML编辑器”教程中“调整用户界面”,以大致了解你需要做什么。
There is another tutorial-ish description of using the layer file to hide items, too.
还有另一种类似tutorial的描述,描述了如何使用图层文件来隐藏项目。
#2
3
In netbeans 8.0 , the layer file is generated when ever a module contains 'configuration type' annonations in java code, for example a module with top component. The generated layer.xml is located at build directory classes/META-INF/generated-layer.xml. However, the generated-layer.xml is not editable. To hide/show menubar / tool bar, click on the module, click other and add XML layer file. Now under the important files you can see XML layer. Expand it. Now expand . Expand the "Menu Bar". Delete the menu bar which you don't want.
在netbeans 8.0中,当一个模块在java代码中包含“配置类型”的声明时,就会生成层文件,例如一个带有顶层组件的模块。生成的层。xml位于build directory类/META-INF/generate -layer.xml中。然而,generated-layer。xml不是编辑。要隐藏/显示菜单栏/工具栏,请单击模块,单击其他并添加XML层文件。现在,在重要的文件下面,您可以看到XML层。扩大它。现在扩大。扩大“菜单栏”。删除你不想要的菜单栏。
#3
2
The easier way appears to be, as Martin Krauskopf wrote:
就像马丁·克劳斯科普夫(Martin Krauskopf)写道:
Just go to:
只是去:
Projects view (Ctrl-1) >> your module >> Important Files >> XML Layer >> Menu Bar >> Help
项目视图(Ctrl-1) >>模块>>重要文件>> XML层>>菜单栏>>帮助
and delete what you want (it will actually generate appropriate content in layer.xml of the module).
删除你想要的(它实际上会在层中生成适当的内容。xml的模块)。
#4
0
You can remove it in layer.xml
您可以用lay .xml删除它
layer in context - Menu Bar
层在上下文-菜单栏
here's the link
这是链接
http://platform.netbeans.org/tutorials/nbm-htmleditor.html
http://platform.netbeans.org/tutorials/nbm-htmleditor.html