CControl

[SIZE=2]Hi,

I have an application which contains a CContentArea. In the center station, I have a dockable that contains a button that opens a JDialog in blocking mode. Inside the blocking dialog, I have another CContentArea.

Is it safe to use the same CControl in order to create the CContentArea for the blocking dialog, or should I define another CControl?

Thank you
[/SIZE]

I suppose in your case a second CControl make more sense.

Put the choice really depends on your goals. If you use the same CControl then the user will be able to drag dockables from the dialog to the blocked application or to merge them with floating dockables. If you use another CControl then the user will not be able to do that.

Hi,

In my case, it is not possible to drag a dockable from the blocking dialog to the application.
My question: How could I create a CControl for a JDialog? the CControl take a JFrame?

Thank you

Wrap the dialog into a WindowProvider:

CControl control = new CControl( new DirectWindowProvider( dialog ));```

Hello Beni,

In the lifecycle of my application, the root panel of my application [ Which is a CContentArea] is created before the JDialog.

Is it possible to create the CControl with a NullWindowProvider, that after creating the JDialog passing it as a WindowProvider for the corresponding CControl?

Thank you

You can call “CControl.setRootWindow” at any time with a new window. All windows/dialogs/etc… created by the framework should then switch the owner to the new window.

Hi,

I’m getting the following exception. any idea?

[SIZE=2]
[LEFT][ERROR] Main - [/SIZE][U][SIZE=2]java.lang.NullPointerException[/U][/SIZE][SIZE=2] <[/SIZE][U][SIZE=2]java.lang.NullPointerException>java.lang.NullPointerException[/LEFT]
[/U][/SIZE][SIZE=2][LEFT]at bibliothek.gui.dock.themes.basic.BasicColorScheme.updateUI([/SIZE][U][SIZE=2]BasicColorScheme.java:62[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.themes.basic.BasicColorScheme.<init>([/SIZE][U][SIZE=2]BasicColorScheme.java:43[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.themes.BasicTheme$1.getDefault([/SIZE][U][SIZE=2]BasicTheme.java:109[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.themes.BasicTheme$1.getDefault([/SIZE][U][SIZE=2]BasicTheme.java:107[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.util.PropertyKey.getDefault([/SIZE][U][SIZE=2]PropertyKey.java:137[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.util.DockProperties$Entry.getDefault([/SIZE][U][SIZE=2]DockProperties.java:369[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.util.DockProperties$Entry.getValue([/SIZE][U][SIZE=2]DockProperties.java:349[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.util.DockProperties.get([/SIZE][U][SIZE=2]DockProperties.java:152[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.util.PropertyValue.getValue([/SIZE][U][SIZE=2]PropertyValue.java:173[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.util.PropertyValue.setProperties([/SIZE][U][SIZE=2]PropertyValue.java:107[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.util.PropertyValue.setProperties([/SIZE][U][SIZE=2]PropertyValue.java:86[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.themes.BasicTheme.install([/SIZE][U][SIZE=2]BasicTheme.java:187[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.themes.BasicTheme.install([/SIZE][U][SIZE=2]BasicTheme.java:165[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.themes.ThemeManager.setTheme([/SIZE][U][SIZE=2]ThemeManager.java:268[/U][/SIZE][SIZE=2])
at bibliothek.gui.DockController.setTheme([/SIZE][U][SIZE=2]DockController.java:669[/U][/SIZE][SIZE=2])
at bibliothek.gui.DockController.initiate([/SIZE][U][SIZE=2]DockController.java:332[/U][/SIZE][SIZE=2])
at bibliothek.gui.DockController.<init>([/SIZE][U][SIZE=2]DockController.java:244[/U][/SIZE][SIZE=2])
at bibliothek.gui.DockController.<init>([/SIZE][U][SIZE=2]DockController.java:229[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.common.intern.EfficientControlFactory$1.<init>([/SIZE][U][SIZE=2]EfficientControlFactory.java:54[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.common.intern.EfficientControlFactory.createController([/SIZE][U][SIZE=2]EfficientControlFactory.java:54[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.common.CControl.init([/SIZE][U][SIZE=2]CControl.java:396[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.common.CControl.<init>([/SIZE][U][SIZE=2]CControl.java:374[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.common.CControl.<init>([/SIZE][U][SIZE=2]CControl.java:358[/U][/SIZE][SIZE=2])
at bibliothek.gui.dock.common.CControl.<init>([/SIZE][U][SIZE=2]CControl.java:333[/U][/SIZE][SIZE=2])[/LEFT]
at bibliothek.gui.dock.common.CControl.<init>([/SIZE][U][SIZE=2]CControl.java:282[/U][/SIZE][SIZE=2])
[/SIZE]

Thank you

Are you perhaps using NimbusLookAndFeel? I recently experienced the same error, a (partial) fix is already in the repository but not yet in the downloadable version.

Hi,

I’m using Synthetica look and feel and the following maven dependency:

[SIZE=2]
[LEFT]<[/SIZE][SIZE=2]dependency[/SIZE][SIZE=2]>
         [/SIZE][SIZE=2]<[/SIZE][SIZE=2]groupId[/SIZE][SIZE=2]>[/SIZE]org.dockingframes[SIZE=2]</[/SIZE][SIZE=2]groupId[/SIZE][SIZE=2]>[/SIZE] 
         [SIZE=2]<[/SIZE][SIZE=2]artifactId[/SIZE][SIZE=2]>[/SIZE]docking-frames-core[SIZE=2]</[/SIZE][SIZE=2]artifactId[/SIZE][SIZE=2]>[/SIZE] 
         [SIZE=2]<[/SIZE][SIZE=2]version[/SIZE][SIZE=2]>[/SIZE]1.1.0-SNAPSHOT[SIZE=2]</[/SIZE][SIZE=2]version[/SIZE][SIZE=2]>[/SIZE] [/LEFT]
[LEFT][SIZE=2]          </[/SIZE][SIZE=2]dependency[/SIZE][SIZE=2]>[/SIZE] 
 

[SIZE=2]          <[/SIZE][SIZE=2]dependency[/SIZE][SIZE=2]>[/LEFT]
[/SIZE][LEFT][SIZE=2]                    <[/SIZE][SIZE=2]artifactId[/SIZE][SIZE=2]>[/SIZE]docking-frames-common[SIZE=2]</[/SIZE][SIZE=2]artifactId[/SIZE][SIZE=2]>[/SIZE] 
[SIZE=2]                    <[/SIZE][SIZE=2]groupId[/SIZE][SIZE=2]>[/SIZE]org.dockingframes[SIZE=2]</[/SIZE][SIZE=2]groupId[/SIZE][SIZE=2]>[/SIZE] 
[SIZE=2]                   <[/SIZE][SIZE=2]version[/SIZE][SIZE=2]>[/SIZE]1.1.0-SNAPSHOT[SIZE=2]</[/SIZE][SIZE=2]version[/SIZE][SIZE=2]>[/SIZE] [/LEFT]
[SIZE=2]         </[/SIZE][SIZE=2]dependency[/SIZE][SIZE=2]>
[/SIZE]

What changes in my maven repositories should I do to get your updates? Does your update work even if I’m working with Synthetica look and feel?

Thank you

It might not yet work, there are some places where a NPE can still happen. I’ll fix these places in the evening. I don’t know when you last updated, but there were no dramatic API changes, you should not have trouble with a new version.