Issue Details (XML | Word | Printable)

Key: RCP-421
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Mathias Broekelmann
Reporter: Rogan Dawes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Rich Client Project

Initial implementation of support for VLDocking framework

Created: 16/Oct/06 03:01 PM   Updated: 30/Oct/08 02:16 PM   Resolved: 15/Jan/07 05:00 PM
Component/s: Core
Affects Version/s: 1.0.0
Fix Version/s: 1.0.0

Time Tracking:
Not Specified

File Attachments: 1. Java Source File ViewDescriptorDockable.java (3 kB)
2. Java Source File VLDockingApplicationPage.java (11 kB)
3. Java Source File VLDockingApplicationPage.java (7 kB)
4. Java Source File VLDockingApplicationPageFactory.java (0.9 kB)
5. Java Source File VLDockingApplicationPageFactory.java (1 kB)
6. Java Source File VLDockingLayoutBuilder.java (0.4 kB)
7. Java Source File VLDockingLayoutManager.java (0.4 kB)
8. Java Source File VLDockingPageDescriptor.java (1 kB)
9. Java Source File VLDockingPageDescriptor.java (0.6 kB)
10. Java Source File VLDockingViewDescriptor.java (2 kB)
11. Java Source File VLDockingViewDescriptor.java (2 kB)

Environment: Windows XP SP2, JDK 1.5.0_06


 Description  « Hide

Attached please find supporting classes providing integration support for the VLDocking framework.

VLDocking provides similar features to FlexDock, but appears to be a lot more actively developed. It is available under a dual license - CeCILL (French GPL compatible) and a commercial licence.

I found it to be very easy to implement basic support, using the mdi DesktopPage classes as a template. I put them under org.springframework.richclient.application.vldocking, in parallel with the flexdock package.

At this stage, there is no support for persisting a layout to disk and reloading it. I am a little concerned that the Docking framework would end up knowing about PageComponents that the ApplicationPage doesn't know about.

The approach is as follows:

Define and reference an instance of VLDockingApplicationPageFactory as the applicationPageFactoryId in ApplicationServices.

e.g.

<bean id="applicationPageFactory" depends-on="serviceLocator"
class="org.springframework.richclient.application.vldocking.VLDockingApplicationPageFactory" lazy-init="false">
</bean>

<bean id="applicationServices"
class="org.springframework.richclient.application.support.DefaultApplicationServices">
<property name="applicationPageFactoryId"><idref bean="applicationPageFactory" /></property>
</bean>

Define your views using VLDockingViewDescriptor's, which allow you to control closability, etc of your docked views.

e.g.

<bean id="initialView-2"
class="org.springframework.richclient.application.vldocking.VLDockingViewDescriptor">
<property name="viewClass">
<value>net.za.dawes.InitialView</value>
</property>
<property name="autoHideEnabled"><value>true</value></property>
</bean>

As one would use mdi.DesktopApplicationPage to define a number of PageComponents (Views) that should be displayed on startup, one can do exactly the same for VLDockingApplicationPage:

<bean id="initialPage"
class="org.springframework.richclient.application.mdi.DesktopPageDescriptor">
<property name="viewDescriptors">
<list>
<value>initialView</value>
<value>initialView-1</value>
<value>initialView-2</value>
</list>
</property>
</bean>

And then refer to the initialPage in your LifecycleAdvisor as usual.

This will use a default VLDockingLayoutBuilder strategy that simply adds each View into a JTabbedPane. Most people will want to implement something more userfriendly, and can do so by implementing VLDOckingLayoutBuilder, which defines the following methods:

void addDockable(DockingDesktop desktop, Dockable dockable);

void layoutDockables(DockingDesktop desktop);

Implementations can decide exactly where each Dockable should be added to the DockingDesktop, relative to any other Dockables that have already been added, at the time they are added. A useful implementation would be able to save the positions of Dockables in a Desktop to a file, and put the Dockables back into approximately the same positions that they were in previously. This could be tricky, however, since a lot would depend on the order in which components are restored.

Similarly, by providing an implementation of layoutDockables(DockingDesktop desktop), the user can rearrange the existing Dockables in the DockingDesktop according to a previously saved schema (or using a definition created by the VLDocking Layout Manager tool)



Sort Order: Ascending order - Click to sort in descending order
Rogan Dawes made changes - 16/Oct/06 03:03 PM
Field Original Value New Value
Attachment VLDockingApplicationPageFactory.java [ 12028 ]
Attachment VLDockingApplicationPage.java [ 12027 ]
Attachment VLDockingViewDescriptor.java [ 12029 ]
Rogan Dawes made changes - 16/Oct/06 03:04 PM
Attachment VLDockingLayoutBuilder.java [ 12030 ]
Attachment VLDockingPageDescriptor.java [ 12031 ]
Rogan Dawes made changes - 11/Jan/07 09:07 AM
Attachment ViewDescriptorDockable.java [ 12326 ]
Rogan Dawes made changes - 11/Jan/07 09:08 AM
Attachment VLDockingApplicationPage.java [ 12327 ]
Rogan Dawes made changes - 11/Jan/07 09:10 AM
Rogan Dawes made changes - 11/Jan/07 09:11 AM
Attachment VLDockingLayoutManager.java [ 12329 ]
Rogan Dawes made changes - 11/Jan/07 09:12 AM
Attachment VLDockingPageDescriptor.java [ 12330 ]
Rogan Dawes made changes - 11/Jan/07 09:13 AM
Attachment VLDockingViewDescriptor.java [ 12331 ]
Mathias Broekelmann made changes - 15/Jan/07 05:00 PM
Fix Version/s 0.3.0 [ 10521 ]
Assignee Mathias Broekelmann [ mbroekelmann ]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Lieven Doclo made changes - 30/Oct/08 02:16 PM
Component/s Core [ 10631 ]
Component/s Application Framework [ 10123 ]