| View previous topic :: View next topic |
| Author |
Message |
snake-john
Joined: 20 Dec 2009 Posts: 104
|
Posted: Wed Sep 26, 2012 12:34 pm Post subject: on migrating from 6.8 to 7.2 little problem with windowing system |
|
|
hello,
I am migrating from netbeans 6.8 to 7.2
Now in 7.2 the headers of my windows for example in the navigation pane look like
this:
| Code: |
|---------|---------------|
| Title | - |
|---------|---------------|
| |
| Content |
| |
|-------------------------|
|
They all have an extra header tab with a close - icon on the right.
My topcomponents have all
putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.TRUE);
putClientProperty(TopComponent.PROP_DRAGGING_DISABLED, Boolean.TRUE);
putClientProperty(TopComponent.PROP_UNDOCKING_DISABLED, Boolean.TRUE);
putClientProperty(TopComponent.PROP_MAXIMIZATION_DISABLED, Boolean.TRUE);
putClientProperty(TopComponent.PROP_SLIDING_DISABLED, Boolean.TRUE);
The Nebeans IDE 7.2 also has these extra empty header Tabs in its
navigation pane. What's their purpose and how can I get rid of these extra headers?
many Greetings
John
|
|
| Back to top |
|
 |
mienamoo
Joined: 12 Nov 2010 Posts: 340 Location: South Africa
|
|
| Back to top |
|
 |
snake-john
Joined: 20 Dec 2009 Posts: 104
|
Posted: Wed Sep 26, 2012 1:10 pm Post subject: |
|
|
sorry but that is not what I need!
I want to keep the title tab.
| Code: |
|---------------------------|
| Title |
|---------------------------|
| |
| Content |
|---------------------------|
|
Like it was in 6.8.....
|
|
| Back to top |
|
 |
mienamoo
Joined: 12 Nov 2010 Posts: 340 Location: South Africa
|
Posted: Wed Sep 26, 2012 1:35 pm Post subject: [platform-dev] Re: on migrating from 6.8 to 7.2 little problem with windowing system |
|
|
Ah I think now I know what you are looking for. Those are controls for
a group of windows. Have a look at the Branding properties of the
suite, on the Window System tab. You can disable the group features
there. Particularly, Sliding Window Groups might be of use. :)
Best wishes,
Hermien PELLISSIER
On Wed, Sep 26, 2012 at 3:10 PM, snake-john <address-removed> wrote:
| Quote: |
sorry but that is not what I need!
I want to keep thet title tab.
Code:
|---------------------------|
| Title |
|---------------------------|
| |
| Content |
|---------------------------|
Like it was in 6.8.....
|
|
|
| Back to top |
|
 |
snake-john
Joined: 20 Dec 2009 Posts: 104
|
Posted: Wed Sep 26, 2012 2:03 pm Post subject: |
|
|
Great yes that was it!
even found the new netbeans branding editor in the ide.....
I have another little problem. In windows 7 my application topmenu looks
kind o broken.
code]
+-------------+--------------------------------+
+ File View --- Unwanted 3d shade
+-------------+--------------------------------+
[/code]
I have a kind of 3d shade beside my menu items.
I would like this shade to disappear or maybe to continue showing underderneath my menu items.... do you know how I can achive this?
|
|
| Back to top |
|
 |
mienamoo
Joined: 12 Nov 2010 Posts: 340 Location: South Africa
|
Posted: Wed Sep 26, 2012 2:07 pm Post subject: [platform-dev] Re: on migrating from 6.8 to 7.2 little problem with windowing system |
|
|
| Quote: | I have another little problem. In windows 7 my application topmenu looks
kind o broken.
code]
+-------------+--------------------------------+
+ File View --- Unwanted 3d shade
+-------------+--------------------------------+
[/code]
I have a kind of 3d shade beside my menu items.
I would like this shade to disappear or maybe to continue showing underderneath my menu items.... do you know how I can achive this?
|
Do you by any chance add any menus dynamically at runtime? And do all
the menus look the same, or do some of them also have a different
background?
|
|
| Back to top |
|
 |
snake-john
Joined: 20 Dec 2009 Posts: 104
|
Posted: Wed Sep 26, 2012 2:14 pm Post subject: |
|
|
yes I create the menu entries dynamically at runtime....
does this cause the problem? what can I do to fix the appearance?
|
|
| Back to top |
|
 |
mienamoo
Joined: 12 Nov 2010 Posts: 340 Location: South Africa
|
Posted: Wed Sep 26, 2012 2:21 pm Post subject: [platform-dev] Re: on migrating from 6.8 to 7.2 little problem with windowing system |
|
|
On Wed, Sep 26, 2012 at 4:14 PM, snake-john <address-removed> wrote:
| Quote: | yes I create the menu entries dynamicly....
does this cause the problem?
|
It does seem so in our application - timing issue with the GUI
creation by the looks of it. But there is luckily a workaround which
works almost always. :)
After creating your menus (replacing the look and feel name as you
wish of course - the windows one is the one with the shading, and note
some error checking removed for clarity):
Frame main = WindowManager.getDefault().getMainWindow();
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception ex) {
Exceptions.printStackTrace(ex);
}
SwingUtilities.updateComponentTreeUI(((JFrame) main).getJMenuBar());
Best wishes,
Hermien PELLISSIER
|
|
| Back to top |
|
 |
snake-john
Joined: 20 Dec 2009 Posts: 104
|
Posted: Wed Sep 26, 2012 2:36 pm Post subject: |
|
|
thank you for the tip!
I tried it but had no luck. maybe its something different. but never mind
|
|
| Back to top |
|
 |
mienamoo
Joined: 12 Nov 2010 Posts: 340 Location: South Africa
|
Posted: Wed Sep 26, 2012 2:38 pm Post subject: [platform-dev] Re: on migrating from 6.8 to 7.2 little problem with windowing system |
|
|
Try the setLookAndFeel before creating the items and the
updateComponentTreeUI after.
On Wed, Sep 26, 2012 at 4:36 PM, snake-john <address-removed> wrote:
| Quote: | thank you for the tip!
I tried it but had no luck. maybe its something different. but never mind |
|
|
| Back to top |
|
 |
snake-john
Joined: 20 Dec 2009 Posts: 104
|
Posted: Wed Sep 26, 2012 2:43 pm Post subject: |
|
|
| still no luck... but nevermind and thanx alot
|
|
| Back to top |
|
 |
snake-john
Joined: 20 Dec 2009 Posts: 104
|
Posted: Thu Sep 27, 2012 7:46 am Post subject: |
|
|
just for your info : this is how my menubar looks....
| Description: |
|
| Filesize: |
4.25 KB |
| Viewed: |
2804 Time(s) |

|
|
|
| Back to top |
|
 |
mienamoo
Joined: 12 Nov 2010 Posts: 340 Location: South Africa
|
Posted: Thu Sep 27, 2012 7:53 am Post subject: [platform-dev] Re: on migrating from 6.8 to 7.2 little problem with windowing system |
|
|
Yep, that looks all too familiar. :)
Did you by any chance use this [1] as your starting point? If so, then
I can give more details about where I added in my code.
[1] https://bitbucket.org/jglick/dynamicmenudemo/
Oh and you can also try to explicitly set the look and feel as early
in the startup process as you can.
On Thu, Sep 27, 2012 at 9:46 AM, snake-john <address-removed> wrote:
|
|
| Back to top |
|
 |
snake-john
Joined: 20 Dec 2009 Posts: 104
|
Posted: Thu Sep 27, 2012 8:10 am Post subject: |
|
|
maybe I am doing something similar.....
after the applications starts and the user has selected
selected= true or false
I do a
DynamicMenuFileSystem.INSTANCE.init(selected);
DynamicMenuFileSystem.INSTANCE.enable();
where DynamicMenuFileSystem is:
| Code: |
import java.util.Locale;
import org.openide.filesystems.MultiFileSystem;
import org.openide.filesystems.XMLFileSystem;
import org.openide.util.Exceptions;
import org.xml.sax.SAXException;
@org.openide.util.lookup.ServiceProvider(service = org.openide.filesystems.FileSystem.class)
public class DynamicMenuFileSystem extends MultiFileSystem {
public static DynamicMenuFileSystem INSTANCE;
private XMLFileSystem mLFileSystem;
private boolean extendedCatalogManagement;
public DynamicMenuFileSystem() {
// let's create the filesystem empty, because the user
// is not yet logged in
INSTANCE = this;
}
public void init(boolean extendedCatalogManagement) {
this.extendedCatalogManagement = extendedCatalogManagement;
if (extendedCatalogManagement) {
try {
mLFileSystem = new XMLFileSystem("nbresloc:/client/menu-extended.xml");
} catch (SAXException ex) {
Exceptions.printStackTrace(ex);
}
} else {
try {
mLFileSystem = new XMLFileSystem("nbresloc:/client/menu.xml");
} catch (SAXException ex) {
Exceptions.printStackTrace(ex);
}
}
}
public void enable() {
INSTANCE.setDelegates(mLFileSystem);
}
public void disable() {
super.setDelegates();
}
}
|
and for example menu is :
| 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="Menu">
<folder name="File">
<attr name="displayName" bundlevalue="client.Bundle#Menu/File"/>
<attr name="position" intvalue="1"/>
<file name="de-client-actions-NewAction.shadow">
<attr name="originalFile" stringvalue="Actions/Build/de-client-actions-NewAction.instance"/>
<attr name="position" intvalue="1127"/>
</file>
</folder>
</filesystem>
|
|
|
| Back to top |
|
 |
mienamoo
Joined: 12 Nov 2010 Posts: 340 Location: South Africa
|
Posted: Thu Sep 27, 2012 8:26 am Post subject: [platform-dev] Re: on migrating from 6.8 to 7.2 little problem with windowing system |
|
|
| Quote: | maybe I am doing something similar.....
|
Quite similar. Download the source code from the link I sent before if
you haven't yet. And then have a look at api\src\impl\DelegatingFS.
You will see in the resultChanged method there is a call to
ReheatMenus.launch(). I would suggest adding ReheatMenus to your
application. And my mod to that class is:
Before JMenuBar menuBar = ... set the LAF. And after the
RP.post(this); } add the
SwingUtilities.updateComponentTreeUI(menuBar); call.
|
|
| Back to top |
|
 |
|