Im trying to show a progress window with a progress indicator. So, here is window initialization code:
Window w = new Window("Progress...");
CustomLayout layout = new CustomLayout ( "ProgressWindowLayout");
w.setLayout(layout);
ProgressIndicator pi = new ProgressIndicator();
layout.addComponent ( pi, "progressIndicator");
w.setWidth(300);
w.setHeight(150);
And finally Im showing this window from main app’s window:
getApplication().getMainWindow().addWindow(w);
I do see new window correctly, moreover, I do see my custom layout
template there (thanks to border=“1” in a table definition), but there are no progress indicator there at all. %|
BTW: As a debugging tip, you can add &debug=1 to your application url and a debug window appears and shows changes server actually sends to client. In this case you can see that the progress indicator is properly sent to client and thus the bug is in ICustomLayout widget.
It should be possible to do the proper layout with layout components too, such as ExpandLayout, and probably easier than with CustomLayout, but the layout alignments do not work very well yet.
Looks like there’s also a problem that the ProgressIndicator can become zero width inside some layouts.
yep, I just wanted to try custom layout and as well to solve such problem that I was unable to place progress indicator and button in the center of the window, regardless of it’s size with standard layout managers. Eg I was able to center progress and button horizontally, but was not able to center vertically.
And just a question - I noticed, there are no more setSizeFull mehtod in layouts as well as Sizeable interface is deprecated. Any new methodology is planned for controlling component sizes ?
Yes. To make it easier for component developers to implement size for their components the Sizable interface is to be removed. Components that has a controllable size will implement HasSize interface and use Size object to store very general size information. Previously all Sizeable components had similar logic in them. Usage example of new component resizing below.
Yep, that method (getSize() in SplitPanel) was unintentianally left undone (always returns null), but it’s fixed now. The next nightly should have it fixed.
I guess this is the drawback of using IDE’s like Eclipse, which do most of the coding for you. Or maybe I should check my TODO list more often
Regarding IDEs- yes, that’s now almost terrible for me, when I sit to vi for quick fixes and begin expecting from it all those IDE featues like completion, suggestion, autoimorts, etc etc etc