On Thursday, October 3, 2013 7:16:24 PM UTC+2, Saad S wrote:
>
> I just posted this on question on
> SO<http://stackoverflow.com/questions/19164823/any-other-way-to-style-celltables-in-gwt-other-than-clientbundle>,
>
> though asking here may be more appropriate and fruitful.
>
> 1) Nothing against
> ClientBundle<http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html>;
> it's great (minification, obfuscation, etc, of the developer's input CSS),
> but I'm wondering, is there is another way to style a CellTable? The
> obfuscated (generated) class names are used to style the table. Is there a
> way (hack, or not) to turn this use of generated CSS off, and override the
> class names in a more direct way (say through a reference in theindex.html
> file
> to a CSS file with the ".cellTable*" class names), without using
> ClientBundle?
>
CellTable.Resources and CellTable.Style are interfaces, that you can
implement your way and return constant strings (and 'null' for
ImageResources, as they're only used by the styles AFAICT)
Or you could use the "style override" approach (as below) using empty rules
and listing each class as @external so it's not obfuscated.
2) Going with the ClientBundle route, I see that the CSS file that
> overrides/replaces the default GWT CSS classes has to be referenced in code
> like this :
>
> public interface TableResources extends CellTable.Resources {
>
> interface TableStyle extends CellTable.Style {
> }
>
> @Override
> @Source({ CellTable.Style.DEFAULT_CSS, "/CellTableStyle.css" })
> TableStyle cellTableStyle();}
>
> ...where "/CellTableStyle.css" is under the same package as TableResources.
> Is there a way to reference a CSS file that is not in the same package as
> the interface, and say is in a different source directory than the base
> src dir of the project? Would "../../dir/file.css" work?
>
../foo.css will work and /com/example/foo.css should too. The CSS has to be
in the classpath though, and is read at compile-time, not runtime.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.