I have a class that extends Composite and contains a DisclosurePanel at the top-level of the associated UiBinder file.
In DisclosurePanel, the HTML looks like this:
<table class="gwt-DisclosurePanel gwt-DisclosurePanel-closed>
<tr>
<td>
<a href="javascript:void(0);" style="display: block;" class="header">
<div class=""> <!-- an HTMLPanel I've shoved in to a <gwt:customHeader> block -->
...
</div>
</a>
...
In my UiBinder file I can use addStyleNames="{style.???}" and style some things, like I can style the DisclosurePanel itself and I can style my HTMLPanel inside the , but I can't style the
<a>
except by doing this:
disclosurePanel.getHeader().getParent().getElement().getStyle().setTextDecoration(TextDecoration.NONE);
disclosurePanel.getHeader().getParent().getElement().getStyle().setColor("black");
in the code, but that's ugly and the style is now in two places, the code and the UiBinder file.
The reason I'm doing that is to get rid of the underlining and blue color that the has by default. Another alternative is to do something like this:
.gwt-DisclosurePanel a {
text-decoration: none;
text: black;
}
but then I would need to reference that CSS file from my home page (Client.html) or reference from the gwt.xml file, but both of those ways of doing things are deprecated.
How do I do this in a better way, or is it not possible?