Last week I made a new component, the
Toolbox . Please check it out! I guess it may come in handy in such projects where you need to have as much free space as possible for your working area.
There is still stuff to do, so please suggest what you think is missing.
Now I added “Click for folding in & out instead of the mouseOver only”. If I see I get many downloads (let’s say some 30 more), I’ll add the icon next. If the box is in “clickable mode”, the users should have an option of choosing between clicking the icon for folding, or then the whole component (+ icon) for folding.
Aha, now that it can appear when we click on it, it becomes usable for me (I hate toolboxes appearing when I accidentally put my mouse over their area!).
You can count one more download, as I was precisely looking for such component (hoping I can customize it a lot).
Note: you can get more downloads by adding (requested) features instead of waiting for downloads to add them: people are more eager to get the software if it does what they expect!
Of course, if you do that on your free time, I understand you try and manage this scarce resource… :dry: If needed, I will look and see if I can bring improvements myself (to be contributed back, of course!).
Hehe, that was a “selling” trick (we get food in exchange for components here ;)). I had no time to fix it at the moment, but now that one of my collegues promised to make some improvements to it (he needs it for a project), it really might get some boost. He will probably provide a patch that I’ll add when it’s completed.
Johan just released a new version (0.2.0) of the add-on that contains improvements implemented by me:
Support for icons (setIcon(Resource) / getIcon()). The icon can be used to close and open the toolbox.
Overflow size can be set to 0. When the value is 0, the icon is only visible.
Added “close on click only” mode (setCloseOnClickOnly(boolean)/isCloseOnClickOnly()). When the mode is on, the toolbox can be closed only by clicking the overlow area or icon.
Because a demo application tells more than thousand words, take a look at the
updated demo application
Is it possible to allow the orientation to be relative to the main window or layout that the toolbox is added to? Looks like the orientation only supports absolute positioning.
I add the toolbox to a vertical layout inside a panel. Then when the user click no a button, I replace the content of the panel with another laout but the toolbox statys on the page.
I tried to call
I think that in revision 0.2 the
Toolbox#getComponentIterator method is not implemented correctly because the
next -method always returns the same
currentComponent and the
hasNext -method will always return
true if
child was initially not
null .
With the implementation from the 0.2 version, the application will hang in an endless loop if you call the
requestRepaintAll method (e.g when clicking on Analyze Layouts (AL) button in the vaadin debug window.
I’d suggest the following fix:
public Iterator<Component> getComponentIterator() {
return new Iterator<Component>() {
...
public Component next() {
if (currentComponent == null) {
throw new NoSuchElementException();
}
final Component current = currentComponent;
currentComponent = null;
return current;
}
}
I have started using this add-on and thanks to Johan Anas and Henri Kerola.
I have posted a thread under UI Components to highlight a problem with Toolbox. Accordion tabs added to Toolbox are showing the tab captions as links (with underlines). I haven’t set any style names.
We are evaluating this nice addon but getting an error with our navigation.
If we include the Toolbox, component exchange (removing/adding new components) did not work anymore. We will get the following error in the debug console: