Here is an example:
Take a look at the structure (attachment).
Inside the grid.css (your own css file) you can have such an entry:
-
.db_icon
-
{
-
background-image: url(../js/ext/resources/icons/database.gif) !important;
-
padding-right: 5px;
-
margin: 0 !important;
-
}
And in your module, you need to call your css file as well for example like this:
-
<module>
-
-
<!– Inherit the core Web Toolkit stuff. –>
-
<inherits name='com.google.gwt.user.User'/>
-
<!– Inherit the GWTExt Toolkit library configuration. –>
-
<inherits name='com.gwtext.GwtExt' />
-
-
<!– Set our own css file –>
-
<stylesheet src="css/grid.css" />
-
-
-
<stylesheet src="js/ext/resources/css/ext-all.css" />
-
<script src="js/ext/adapter/ext/ext-base.js" />
-
<script src="js/ext/ext-all.js" />
-
-
</module>
Finally, you can start using it in your backend:
For example in your grid:
GridPanel grid = new GridPanel();
-
grid.setIconCls( "db_icon" );
I hope this helps.