If you are interested I've already done this for my table branch in
the incubator. It's a little bit outdated - I need to port the branch
to 2.0... :-(
The only show stopper I see right is that Messages/Contacts are not
yet part of the ClientBundle, so I came up with something like this
(copy&paste from branch source):
/**
* An {...@link ImageBundle} that provides images for {...@link
AbstractScrollTable}
* .
*/
public static interface Css extends CssResource {
/**
* Widget style name.
*
* @return the widget's style name
*/
@ClassName("gwt-ScrollTable")
String defaultStyleName();
String headerTable();
String dataTable();
String footerTable();
String headerWrapper();
String dataWrapper();
String footerWrapper();
}
/**
* Resources used.
*/
public interface ScrollTableStyle extends ClientBundle {
/**
* The css file.
*/
@Source("com/google/gwt/gen2/widgetbase/public/ScrollTable.css")
@NotStrict
Css css();
/**
* An image used to fill the available width.
*
* @return an image resource of this image
*/
@Source("scrollTableFillWidth.gif")
ImageResource scrollTableFillWidth();
/**
* An image indicating that a column is sorted in ascending order.
*
* @return an image resource of this image
*/
@Source("scrollTableAscending.gif")
ImageResource scrollTableAscending();
/**
* An image indicating a column is sorted in descending order.
*
* @return an image resource of this image
*/
@Source("scrollTableDescending.gif")
ImageResource scrollTableDescending();
@Source("headerBackground.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource headerBackground();
}
public interface ScrollTableMessages extends Messages {
@DefaultMessage("Shrink/Expand to fill visible area")
String shrinkExpandTooltip();
@DefaultMessage("Shows only dates that are equal")
String dateOperatorEqualTooltip();
@DefaultMessage("Shows only dates that not equal")
String dateOperatorUnequalTooltip();
@DefaultMessage("Show only dates before the given date")
String dateOperatorBeforeTooltip();
@DefaultMessage("Show only dates after the given date")
String dateOperatorAfterTooltip();
@DefaultMessage("Show only dates between the given dates")
String dateOperatorBetweenTooltip();
}
public interface ScrollTableResources {
ScrollTableStyle getStyle();
ScrollTableMessages getMessages();
}
On Jan 4, 4:28 pm, Joel Webber <[email protected]> wrote:
> What John said. There are a few difficult design problems in doing this
> properly -- i.e., with no overhead for those just using plain CSS, nor for
> those using CssResource/ClientBundle "themes". I am confident the problem is
> soluble, though.
>
>
>
> On Mon, Jan 4, 2010 at 10:21 AM, John LaBanca <[email protected]> wrote:
> > We definitely plan to use ClientBundles to provide default stylings for all
> > widgets, but we haven't really talked about how to go about doing that yet.
> > Ideally, we want to use ClientBundles without breaking apps that are
> > already using the existing CSS style themes.
>
> > We could add ClientBundles to all widgets to serve as a default style, and
> > we can also provide a DeferredBinding to an "Unstyled" ClientBundle for each
> > widget. If a user inherits one of the existing CSS style themes, the
> > Standard/Chrome/Dark.gwt.xml files will inherit the Unstyled deferred
> > binding, thus disabling the ClientBundles for backway compatibility.
>
> > Thanks,
> > John LaBanca
> > [email protected]
>
> > On Mon, Jan 4, 2010 at 10:04 AM, BobV <[email protected]> wrote:
>
> >> On Sun, Jan 3, 2010 at 6:10 AM, dflorey <[email protected]> wrote:
> >> > It would be great if the new ClientBundle would be used to style all
> >> > gwt widgets.
>
> >> I think John probably has some ideas here.
>
> >> > (btw: Why is it called ClientBundle and not ResourceBundle as it
> >> > bundles up different resources...)
>
> >> To avoid the conflict with java.util.ResourceBundle.
>
> >> --
> >> Bob Vawter
> >> Google Web Toolkit Team
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors