Version 1.0.8

Preview 1 of version 1.0.8 is on the server.

Preview 1 includes the new tab mechanism: except the tabs of BasicTheme, all tabs are now based on the same code and have similar capabilities. The location and size of the tabs are now controlled by a “TabLayoutManager”. Currently there are two TabLayoutManagers present and they mimic the behavior that was present in version 1.0.7.

Other new features include:
[li] DockableDisplayers are observed through a DockableDisplayerListener and can be exchanged any time.
[/li][li] Single tabs can be shown, the SingleTabDecider tells which Dockables should be single-tabbed. The SingleTabDecider can change its opinion any time and changes take immediate effect in the UI.
[/li][li] CDockables have a new property “singleTabShown”, which lets a single tab appear.
[/li][li] The EclipseThemeConnector is observed through a EclipseThemeConnectorListener, this allows the connector to change its behavior and the effects become immediatelly visible.
[/li][li] Common has the new CommonEclipseThemeConnector, this connector removes the tab a Dockable has in EclipseTheme if the “titleShown”-property of CDockable is set to false. The tab remains if the “showSingleTab”-property is set to true.
[/li][li] Workaround for bug 6797587: AWT components not painted properly if behind a glass-pane. The workaround was tested with JDK 1.6.0_14.
[/li][li] The FocusObserver calls the method “handleVeto” if a veto was spoken, this method consumes InputEvents, i.e. preventing mouse-pressed-events from beeing executed.
[/li][li] Bugfix: DockStations check whether dropping some Dockable would create an invalid Component-tree, and forbid such drag and drop operations

The attachement shows the new single-tab feature.

Preview 2 will allow to set tabs at any side of a Dockable. I plan to release p2 before August. If I promissed someone a feature/bugfix and forgot it in p1 please let me know, I’ll include it as fast as possible.

Preview 2 is on the server.

Tabs can now be placed on all sides of a Dockable. With help of the key “StackDockStation.TAB_PLACEMENT” one of four (top, bottom, left, right) tab-placements can be choosen. This placement is used for all tabs. Changing this property takes immediate effect in the UI.

Other new features include:
[li]DockProperties, the map storing properties for the whole framework, now supports priorities for its entries. Each entry can appear three times, with the priorities DEFAULT, THEME and CLIENT.
[/li][li]Bugfix: SimpleDockAction did not unbind itself properly, leading to a memory leak.
[/li][li]Bugfix: The button/title for showing a minimized Dockable can now be focused again, this did not work since preview 1.
[/li][li]Inconsistency: The methods of FocusVetoListener now return a FocusVeto instead of a boolean. The FocusVeto tells whether a veto was spoken against a focus-transfer, and whether the event responsible for the transfer should still be handled or dismissed.
For preview 3 I plan to rewrite the CStateManager and its ancestor classes. The CStateManager is responsible for handling the transition of CDockables from one ExtendedMode (minimized, maximized, …) into another. While the current version works it is a monolithic block which cannot be configured from the outside. The new version will be more generalized, working with modules. This is also in preparation for giving the children of ScreenDockStations the ability to be shown in fullscreen-mode.

I hope to release p3 within a month.

Preview 3 is on the server.

I think it’s ok to say, that this version contains the biggest change I ever made - chances are that you won’t even notice.

Extended modes
The CStateManager in Common got replaced with a new class called “CLocationModeManager”. Both classes have the same purpose: handle the transition between extended-modes, e.g. handle the operation “maximize a Dockable”. As you might guess this is a key functionality, Common would be worthless without it.
[li] The “CStateManager” was in Common since its first release. It did slowly grow and contained roughly 2500 lines of code (together with its super-class). Its tendrils were placed all over the framework, and it was one of the very few classes that made extensiv use of the keyword “instanceof”. In short: the CStateManager had grown into a non-object oriented monster. There was no possibility left to add extensions like a new kind of DockStation or a new kind of extended-mode.
[/li][li] The “CLocationModeManager” class is only half as big as its predecessor. The new design makes heavy use of interfaces, wrappers, layers and other nifty object oriented stuff. This design is more complex than the old one, but it also allows much more freedom in aranging and extending the extended-mode’s.

The “CLocationModeManager” tries to mimic the behavior of its predecessor, so clients should not notice the difference. Here are two warnings for anyone who would like to use 1.0.8p3:
[li] I tested the new design with some applications, but I was certainly not able to discover all bugs.
[/li][li] Configuration files written by older versions might not be loaded correctly.

The ongoing story about Dockables not being placed at the correct position has a new chapter.
In the center of all the trouble is always the SplitDockStation. The SplitDockStation internally has a tree which tells how its children are to be layed out. This tree has been modified: each node and leaf has a unique identifier assigned. Location information now includes these ids and allows the station to find a leaf/node that has changed its position in the tree again.

As always there are minor bugfixes and improvements. Some of them are:
[li] The minimum size of FlapDockStations can be set. A new method “CContentArea#setMinimumAreaSize” allows to make the empty border around the central component smaller or bigger.
[/li][li] The new CAction “CPanelPopup” allows to show any component in a popup-menu. This new action much behaves like the “select an icon”-action that is in the “Notes” demo.
[/li][li] AbstractDockable provides a method to add and remove KeyListeners. These KeyListeners are called whenever a KeyEvent is registered on the Dockable or on one of its representatives (like a title).

For 1.0.8p4 I plan to implement:
[li] Allow children of a ScreenDockStation (“externalized” dockables) to become full-screen. This will also test the CLocationModeManagers ability to support new modes.
[/li][li] I’m also playing with the idea of writing a new DockStation using Swogl (website). It would be a proof of concept that the framework really is able to handle “alien” code.

Preview 3a is on the server.

Just fixes some annoying bugs.

[li] Bugfix: titles and tabs missing when using CDockable that is associated with CWorkingArea and EclipseTheme and perfoming a close operation on a StackDockStation (yes, chances to encounter this bug was not very high).
[/li][li] CVetoClosingListener: informs before a CDockable or a set of CDockables gets closed.

Preview 4 is on the server.

And of course I did not follow my plans…

… but I did something more important :slight_smile:

Warning: this release may be too early :o . But I believe many of you would like too see with your own eyes that the project is not dead.

When a Dockable was removed from some DockStation its location was stored as DockableProperty (in Core) or as CLocation (in Common). This location information was accurate as long as Dockables were added in reverse order of their removal. But problems began as soon as the user started to remove and add Dockables in random order. Unfortunatelly users tend to do such irrational things all the time.

The solution to this issue are placeholders: if a Dockable is removed a placeholder remains on the station. With the help of the placeholder the station can act as if there would still be a Dockable. When the Dockable is later added again, it replaces the placeholder and acts as if it were never removed.

An example: removing all Dockables of a SplitDockStation no longer deletes the internal tree of the station. The tree remains, it is just not visible to the user. If the Dockables are added again to the station their old position in the tree can be found again, independent of the insertion order. Of course the SplitDockStation now also supports trees that are not filled completely.

[li] SplitDockStation, StackDockStation and FlapDockStation support placeholders - ScreenDockStation does not (yet).
[/li][li] The mapping between Dockables and placeholders is made by a PlaceholderStrategy. The strategy may decide not to assign a placeholder to a Dockable, or even to invalidate (and delete) existing placeholders. Clients can set their own strategy with the property key PlaceholderStrategy.PLACEHOLDER_STRATEGY.
[/li]The default strategy for Core is to use no placeholders at all, for Common to use placeholders for SingleCDockables only.
[li] Placeholders are stored and loaded persistently.
[/li][li] Placeholders are also supported for „missing Dockables“ (dockables whose locations need to be guessed).
[/li][li] The placeholder mechanism is built on top of the old location mechanisms. The framework may fall back to the old mechanism if it cannot find some placeholder.

[li] TabPanePainter now paints background and foreground (previously it could only paint the foreground)
[/li][li] The way DockTitles are created has been refactored. The new class DockTitleRequest allows more flexibility in creating and replacing titles.
[/li][li] The CVetoClosingListener allows to stop the user from closing CDockables.
[/li][li] The class AbstractCDockable has a new method „createCommonDockable“. Subclasses may override this method and use their custom implementation of Dockable to represent a CDockable.
[/li][li] Also fixed some annoying bugs.

For 1.0.8p4a I plan to:
[li] Continue testing and fixing bugs that are related to placeholders
[/li][li] Maybe implement some very small features

For 1.0.8p5 I plan to implement:
[li] Allow children of a ScreenDockStation („externalized“ dockables) to become full-screen. This will also test the CLocationModeManagers ability to support new modes.
[/li][li] I’m also playing with the idea of writing a new DockStation using Swogl (website). It would be a proof of concept that the framework really is able to handle „alien“ code.

I’ve just uploaded version 1.0.8p4a which fixes the two bugs that were found by Thomas in this thread.

Bug 1 was that the TabPlacement-property was not set early enough on newly created tabs.
Bug 2 was the StackDockStation filling up its TabPane in the wrong way (adding the same component twice).

Version 1.0.8p4b, fixing more bugs…

[li] Bugfix: Normalizing an externalized CDockable could throw an Exception
[/li][li] Bugfix: StackDockStation could not be moved around in Common even if children would allow it
[/li][li] Bugfix: Dragging a station away from another station did not store placeholders
[/li][li] Bugfix: During drag&drop, dragging the mouse over a tab of a StackDockStation could exchange the selected Dockable
[/li][li] Bugfix: dragging a Dockable over a child of a ScreenDockStation could throw an exception (in the Common framework).
[/li][li] Feature: If a StackDockStation is dragged over another StackDockStation both are merged automatically (the class StackMerger is responsible for this).

Version 1.0.8p5

New stuff

This version brings 3 new cool features:
[li]Thanks to Vlass ukrainian and russian translations.
[/li][li]Thanks to Thomas Hilbert an extension updating the look of the EclipseTheme. The extension is provided as separat download with separat license. To use it just make sure the two jar-files are in the classpath of the framework. The framework will then load and install the extension.
[/li][li]„Fullscreen“ support for externalized Dockables (= children of a ScreenDockStation). The exact meaning of „fullscreen“ is defined by a „ScreenDockFullscreenStrategy“.


There are also some minor bugfixes and improvements:
[li]Bugfix: Tabs with unequal height were positioned strangely
[/li][li]Bugfix: Popup menus are now enabled for tabs on a DefaultStackDockComponent
[/li][li]API: ScreenDockStation now also support placeholders.
[/li][li]API: A StackDockStation with only one child can still show a tab (But you will almost never see a StackDockStation with one child, normally they are removed by the framework).
[/li][li]Bugfix: If DockRegister was stalled and a DockStation was added/removed to the register and later Dockables added/removed from that station, then the DockRegister could miss these modifications and store too many/few Dockables.

The next version is 1.0.8, yes no preview but a stable version.

[li]There will not be any new features (unless they are necessary)
[/li][li]I’ll make some real testing of the new features, e.g. to find memory leaks in the placeholder mechanism. Feedback from you is still appreciated :wink:
[/li][li]The guides and the documentation need some updates.
[/li][li]And some of the icons need to be replaced.

I think with 1.0.8 all the important features one needs for a docking framework are implemented. After 1.0.8 I start doing some clean up. Much of the older stuff is hard to customize, I’d like to change that. These changes will then result in the final version 1.1.0.

Version 1.0.8p5a

Some important bugfixes:
[li] Bugfix: CActionSource did not fire events when removing or replacing actions
[/li][li] Bugfix: CLocationModeManager#setLocation(Dockable,ExtendedMode,CLocation) did not compare the correct objects and has always thrown an exception
[/li][li] Bugfix: Minimized CDockables did not appear at the correct location if corner components were used
[/li][li] Bugfix: Dragging a maximized CDockable could throw an exception

Version 1.0.8p5b

Minor bugfixes
[li]Repaired Exception when dragging a Dockable from a BasicStackDockComponent
[/li][li]Identifiers with spaces and other special characters should now be encoded correctly

Version 1.0.8p5b

Minor bugfixes
[li]Repaired Exception when dragging a Dockable from a BasicStackDockComponent
[/li][li]Identifiers with spaces and other special characters should now be encoded correctly

Version 1.0.8p5d

Bugfixes, changes:
[li] API: EclipseDockableDisplayer now also respects TabContentFilter
[/li][li] API: TabContentFilter has additional methods dealing with StackDockComponents. StackDockStationFilterListener renamed to TabContentFilter.
[/li][li] Bugfix: EclipseMenu did not update its icon automatically
[/li][li] Bugfix: StackDockStation.move(Dockable,DockableProperty) could throw exception if destination index was too big
[/li][li] Bugfix: AbstractScreenDockWindow.setDockable did call updateTitleIcon instead of updateTitleText
[/li][li] Bugfix: DockTitleTab caused exception when uninstalled
[/li][li] Bugfix: Instead of doing nothing, PropertyPreferences now load their default value if they cannot read any other value
[/li][li] Bugfix: When deploying a CGrid some Dockables did not appear: the tree of the SplitDockStation was cleaned up too early before all Dockables had been inserted, leading to a corrupted tree
[/li][li] Bugfix: SplitDockStation did assign leaf-id to node when using drop(SplitDockPathProperty). As a result unmaximizing a stack of CDockables could destroy the stack.
[/li][li] Bugfix: SplitDockStation does now always update the boundaries of its tree before dropping a dockable. Wrong boundaries did lead to Dockables dropped at the wrong location even if the used DockableProperty was correct.
[/li][li] Bugfix: Path now encodes its content when using “toString” and decodes contents on creation. Meaning inside a Path object the items are never encoded.[/ul]
Halfway through the documentation. At some places it really is horrible… I’ve also started writing a new application which uses the library. Thanks to this little project I discovered some unexpected bugs :o .

And it is really hot here… :twisted:

I just wanted to test the new preview 5d but I got an exception:

Caused by: java.lang.NoSuchMethodError: bibliothek.gui.dock.util.extension.ExtensionName.getName()Lbibliothek/extension/gui/dock/util/Path;

Probably you are using a new version of Preview 5 Glass Extension?

I downloaded the jars from

Sorry, my mistake. Must have been some refactoring… I’ve uploaded a freshly compiled version.

Version 1.0.8p5e

[li]- Bugfix: Path now encodes its content when using “toString” and decodes contents on creation. Meaning inside a Path object the items are never encoded.
[/li][li]- Bugfix: MouseFocusObserver no longer calls “component.requestFocusInWindow” if the component does not belong to a Dockable
[/li][li]- Bugfix: SplitDockStation is now much more strict when it comes to enforcing the uniqueness of placeholders
[/li][li]- Bugfix: CLocations returning null as root but have an ExtendedMode are (again) supported.
[/li][li]- Bugfix: When moving/dragging a Dockable from a SplitDockStation with size-locked Dockables, the locked Dockables got resized even if it was not necessary.

Version 1.0.8p5f

Some more bugfixes and small enhancements.

Thanks to Thomas, ilvisne, and all the others who spent quite some time finding and fixing these bugs.

[li] API: FlapDockStation supports factory for creating the window
[/li][li] Bugfix (by ilvisne, Beni): SimpleDockAction did not unregister itself completely, as a result there was a memory leak
[/li][li] Bugfix: DockUI now stalls all events rather than setting the SingleParentRemover to null when updating the DockTheme of a station
[/li][li] Bugfix: CLayoutChangeStrategy.replaceMultipleDockables could throw a NPE
[/li][li] Bugfix: CDockable.getBaseLocation did return null when a location was actually available
[/li][li] Bugfix (by Thomas): Glass Extension no longer throws Exception if width or height of tab is 0
[/li][li] Bugfix (by Thomas): Cursor should no longer remain arrow when moved away from a divider of a SplitDockStation
[/li][*] API: StackDockComponent now offers a method “createDefaultRepresentation”. This allows code to be executed when clicking on, or dragging of, an empty space arounds tabs. [/ul]

Version 1.0.8p5g

Some small bugfixes and features.

[li] API/Bugfix: Clicking on a child action of a DropDownMenu that is shown as submenu now changes the selection of the button as well
[/li][li] Bugfix: solved an issue where buttons on a Eclipse-Tab could not be pressed it the tab was not selected.
[/li][li] Bugfix: Removing all items of a CombinedStackDockComponent left them invisible
[/li][li] API: New SplitDockFullScreenProperty allows clients to point locations to the fullscreen dockable of a SplitDockStation
[/li][li] API: CMaximizedLocation now extends AbstractStackholdingLocation
[/li][li] API: New OrientationToRotationStrategy, allows clients to specify how to rotate text on a DockTitle

The guides are almost finished, only some API Doc remains to be updated.

Version 1.0.8p5h

This is the final preview version. If nothing catastrophic happens within the next days, I’ll upload stable 1.0.8 until 17.Oct.2010.

This version contains small bugfixes:

[li] Bugfix: repaired an issue where buttons on a FlapDockStation where not shown due to a race condition. Also repaired an issue where the button had a false size due to a missing border.
[/li][li] Bugfix: resolved an issue where the CDockableStateListener was not called when the mode changed.
[/li][li] Bugfix: hopefully removing a tab in the EclipseTheme now properly repaints the application (I could reproduce this bug only on a Windows machine)

Stable Version 1.0.8

Version 1.0.8 is available. A few bugfixes made their way into the stable release:

[li]Bugfix: NullPointerException could be thrown by SecureFlapWindow
[/li][li]Bugfix: Popup of CPanelPopup stays in screen

Version 1.1.0

I’ll soon start with 1.1.0 (there will be no version 1.0.9). The incomplete and unordered road-map for 1.1.0 includes:
[li]Update the guides using some of the suggestions of Andrei
[/li][li]Maybe make the project a bit more maven-compatible, Andrei had some complaints… :slight_smile:
[/li][li]Remove or rename methods and interfaces. If possible in a way that code using 1.0.8 remains compatible with 1.1.0.
[/li][li]Include an Italian translation.
[/li][li]1.1.0p1: Support for JInternalFrames
[/li][li]1.1.0p2: Update DockThemes such that clients can more easily customize the framework.
[/li][li]1.1.0p3: Add some mechanism to build „perspectives“, clients should be able to create all possible layout-configurations without the need to create a single Dockable.
[/li][li]1.1.0p4: Allow users to minimize whole stacks of Dockables and display these stacks nicely (not with a button that contains no text like now…)
[/li][li]1.1.0p5: Update mechanism to handle text and icons: clients should be able to replace them more easily
[/li][li]1.1.0p6: Removal of the „secure“ package, any element should switch between „normal“ and „secure“ mode automatically.
[/li][li]1.1.0: Fix what remains to be fixed.