My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 10, 2008 by steam.fade
StylingMasterview  
This articles explains how to use default GWT-Masterview themes or create your own theme

Hot to use default GWT-Masterview themes or create your own

Using default themes

To use one of the default GWT-Masterview themes you need to include add line to your GWT Module xml file (don't forget to place masterview.jar on your project's classpath):

<stylesheet src="<<Theme name>>.css"/> 

where the `<<Theme name>>" is the name of the theme you wish to use. Currently there are 2 themes available:

Building your own theme

To build your own theme you need to write a css file and include it in your GWT module with above-mentioned command: stylesheet src="your-masterview-theme.css". Of couse you also need to specify certain css style rules:

.masterview-grid { the main style }
.masterview-grid-header-cell { the header cell style }
.masterview-grid-row-cell { the body cell style (in which item property is displayed) }
.masterview-grid-filter { the style of the row in which filter textboxes are displayed }
.masterview-grid-filter-textbox { the style of the textboxes in which filter expressions are typed }
.masterview-grid-header { the header row style }
.masterview-grid-sorted-asc { this style replaces .masterview-grid-header-cell style when the column with this header cell is sorted in ascending order }
.masterview-grid-sorted-desc { this style replaces .masterview-grid-header-cell style when the column with this header cell is sorted in descending order }
.masterview-grid-row-even { the style for even rows }
.masterview-grid-row-odd { the style for odd rows }
.masterview-grid-row-highlight { this style replaces styles for even or odd row when the row is hovered }
.masterview-pager { the style of pager widget - a container with navigation bar in which table is placed }
.masterview-pager-navigation { the navigation bar style }
.masterview-pager-status { the style of status label (in the navigation bar to the right }

Changing icons for navigation buttons is harder a bit, because these icons are combined by GWT in a bundle during compile-time, and so they are placed in a org.masterview.user.client.ui.bundle package. You can't replace them without modifying the sources and recompiling. But you can create your own java package, place your images there and create your own Image Bundle.

TODO: write how to create new bundle.


Comment by ahsanjamshaid, Jan 30, 2008

can we change the master-view themes dynamically without recompling?

Comment by renzo.stanley, Feb 01, 2008

Only for grids???


Sign in to add a comment
Hosted by Google Code