i have a panel (A), which contains 3 other panels (AA, AB, AC). Each of the subpanels contains Label and Button. The label has a style. How can i remove all styles from all labels over A. My idea was to make something like A.getChilds().removeStyleName();…
edit: the number of the subpanels is variable…from 2 to 1000. Each subpanel has the same css-class.
You should only need to add the style to A.
(Note that GWT Labels automatically have the styleName “gwt-Label” specified)
Then when you want to remove this style from everything beneath panel A, it’s as easy as
panelA.removeStyleName("someStyle");which will make the above rules no longer apply.Removing someStyle from panel A will remove it from all nodes beneath it. This is why they’re called Cascading Style Sheets.