I was thinking some time on the list of things that would need to be done. I’m not sure whether my predictions are realistic… and I don’t know how fast you usually work…
Step 0: Branch
We would create a branch where you can play around in any way you’d like. Since the project is on Git this will be done very fast.
Your project would be implemented as an “extension” (like the glass extension). This means that you do not edit the main library directly but an independent project (it could even have a custom licence). We’ll add “extension points” to the framework, for other developers your library will magically start working as soon as it is in the classpath.
Of course I would help if I can. I just have to warn you that I cannot spend much time, and I will be able to answer questions only in the evening.
Step 1: Prototype
The prototype does not look good, not does it support the advanced features. It’s just enough to drag and drop Toolbars.
- A Button is a child of a Toolbar. A Button can be moved around, hence a Button is a Dockable and a Toolbar is a DockStation
- A Toolbar is a child of a some other container; hence a Toolbar is a Dockable as well
- Ordinary (Default)Dockables can be a parent of a Toolbar; hence they are or contain a DockStation
Let’s assume you start with the Toolbar.
- Understand the interface Dockable
- Understand the interface DockStation
- Understand the listeners
- Copy some code from another station, e.g. from the ScreenDockStation
[Edit: I missed that Buttons are grouped. So a group is a Dockable and a DockStation as well. A group is very much the same thing as a toolbar.
Then implement the Button.
- There is not much to do here for a prototype
Finally a parent DockStation for Toolbars.
- Similar to Toolbar, you are doing things you already know
** Week 1: prototype
Step 2: Support for persistent storage
There are several mechanisms that are needed to persistently store and load the layout.
- Placeholders identify Dockables that are currently not available or somewhere else. They are optional.
- DockableProperty describes the location of a Dockable in relation to its parent.
- And there are factories to save the contents of a DockStations
If you want to use placeholders then you should add them early on.
- There are some classes that help a lot (PlaceholderList, PlaceholderMap).
DockableProperty would be the next step.
- All existing DockableProperties are very small (containing 2-3 fields)
- Also each DockableProperty is associated with a factory
- 1 day, propably more like 1 hour
Then the factories for DockStations follow
- Maybe need to store placeholder
- Must be able to deal with cases like “there is a Button/Toolbar missing”
- Otherwise much freedom, all you need to do is to convert the layout into xml.
Step 3: Support perspectives
That is a completely optional step. Perspectives would allow clients to specify the location of buttons/toolbars without the need to actually create them.
- really depends on how fast you understand the perspective API
- important work was done in the previous step
Step 4: Merge branches
That is work that I have to do.
** Week 2: all necessary features ready
Step 5: Supporting themes, properties, etc.
Finally you can spend as much time as you’d like on implementing additional features.
- Using DockActions as Buttons might be a good idea. You would get several buttons with different behavior for free, and they could easily change their look depending on the current theme.
- FontManager, ColorManager and TextManager could be used to change the look and content of the Buttons at any time.
** Week 3: making the thing look good