This post is for IE only. The last line of the following code causes the problem.
int width = 200;
int height = 200;
int overHeight = 40;
AbsolutePanel absPanel = new AbsolutePanel();
absPanel.setSize(width + "px", height + "px");
SimplePanel underPanel = new SimplePanel();
underPanel.setWidth(width + "px");
underPanel.setHeight(height + "px");
underPanel.getElement().getStyle().setBackgroundColor("red");
SimplePanel overPanel = new SimplePanel();
overPanel.setWidth(width + "px");
overPanel.setHeight(overHeight + "px");
overPanel.getElement().getStyle().setBackgroundColor("black");
overPanel.getElement().getStyle().setProperty("filter", "alpha(opacity=20)");
absPanel.add(underPanel, 0, 0);
absPanel.add(overPanel, 0, 0);
RootPanel.get("test").add(absPanel);
absPanel.getElement().getStyle().setProperty("filter", "alpha(opacity=100)");
So, basically this code should display a 200px red square at 200px (see the sub-panel in the code), and on top of it a black 200px rectangle at 40px (see the overPanel in the code). However, the black rectangle is partially visible, because its transparency is set to 20%, so it should look red, but darker red than the rectangle sitting under it, since it is actually a faded black element.
- , AbsolutePanel 100% ( ). , , , , ! , , , ...
?
GWT 2.0 IE7.