Ok, I did that and it's still showing the default styles.

To be clear, here is what I did:

SystemStatusResources.java
-----------------------------
// import statements
...

public interface SystemStatusResources extends CellTable.Resources
{
   @Source ({CellTable.Style.DEFAULT_CSS, "systemStatus.css"})
   CellTable.Style getStyle();
}
-----------------------------

The 'systemStatus.css' file sits in the same package as the
SystemStatusResources.java and looks like this:
-----------------------------
.cellTableEvenRow {
   background: #ffffff;
}

.cellTableOddRow {
   background: #ffffff;
}

.cellTableOddRowCell {
   border: selectionBorderWidth solid #ffffff;
}

.cellTableEvenRowCell {
    border: selectionBorderWidth solid #ffffff;
}
-----------------------------

Inside the SystemStatusListView.java:
-----------------------------
...
...
CellTable.Resources resources = GWT.create(SystemStatusResources.class);
CellTable<List<String>> dataTable = new CellTable<List<String>>(0, resources);
...
-----------------------------

The end result is that the same default color shows up for the odd rows.

Any ideas what I am doing wrong?

Thanks,
Yaakov.


On Wed, Mar 16, 2011 at 1:24 PM, Jeff Larsen <larse...@gmail.com> wrote:
> You'll notice in CellTable there are some inner classes. One of those
> classes is Style and the other is Resources.
> Style is the class that has the styles which are used, Resources maps that
> class to its css value.
> Inside Style you'll notice two methods called cellTableEvenRow and
> cellTableOddRow. Those are the two classes you're going to care about.
> If you want completely different styles, you can implement your own style
> sheet (just copy the Style.css from com.google.gwt.cellview.client package
> and change the values inside the classes). Or if you just want to override
> the alternating views you can do something like.
>
> public interface MyResources extends CellTable.Resources{
>     @Source({CellTable.Style.DEFAULT_CSS, "MyCssFile.css"})
>     CellTable.Style getStyle();
> }
>
> and in MyCssFile.css just implement .cellTableEvenRow and cellTableOddRow.
> Then make sure to pass in MyResources into the constructor of the CellTable
> and you should have the styles you're looking for.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to