Styling CellList?

160 views
Skip to first unread message

nacho

unread,
Sep 21, 2011, 3:15:52 PM9/21/11
to google-we...@googlegroups.com
I am trying to apply styles to a CellList, and I have this in my Java:

interface MyCellListResources extends CellList.Resources {
      @Source({"CellList.css"})
      MyCellListStyle cellTableStyle();
    }

    interface MyCellListStyle extends CellList.Style {
       
    }

cellList = new CellList<InboxModel>(contactCell, resources);

And my CellList.css is a copy of the GWT original where I online changed some colors.

I have no error at all... but I am not seing my defined styles in my app.

I am missing something?

Sudhakar Abraham

unread,
Sep 22, 2011, 2:57:04 AM9/22/11
to Google Web Toolkit
Override the cellListStyle() inside MyCellListResources. I have
added a sample CSS to test it out.

S. Abraham
www.DataStoreGwt.com
Persist objects directly in GAE

//corrected code.

interface MyCellListResources extends CellList.Resources {
@Source({"CellList.css"})
@Override
public Style cellListStyle();
}

cellList = new CellList<InboxModel>(contactCell,
GWT.<MyCellListResources> create(MyCellListResources.class));

//CellList.css
.cellListWidget {

}

.cellListEvenItem {
cursor: pointer;
zoom: 1;
background:red;
}

.cellListOddItem {
cursor: pointer;
zoom: 1;
background:blue;
}

.cellListKeyboardSelectedItem {
background: #ffc;
}

@sprite .cellListSelectedItem {
gwt-image: 'cellListSelectedBackground';
background-color: green;
color: white;
height: auto;
overflow: visible;

nacho

unread,
Sep 22, 2011, 11:15:46 AM9/22/11
to google-we...@googlegroups.com
thankssssssssssssssssssss :)
Reply all
Reply to author
Forward
0 new messages