-
15 Sep 2008 7:28 AM #1
More ExtGWT themes derived from ExtJS ones
More ExtGWT themes derived from ExtJS ones
Hi guys,
I have wrapped the ExtJS themes created by madrabaz so they can be used also in ExtGWT.
Themes:
- Black (http://extjs.com/forum/showthread.php?t=15504);
- DarkGray (http://extjs.com/forum/showthread.php?t=15341);
- Olive (http://extjs.com/forum/showthread.php?t=15505);
- Purple (http://extjs.com/forum/showthread.php?t=15377);
- Slickness (http://extjs.com/forum/showthread.php?t=28024);
Usage:
Insert this to your *.gwt.xml file:
Then add the theme JAR files to your classpath.Code:<inherits name='ext.ux.theme.black.Black'/> <inherits name='ext.ux.theme.darkgray.DarkGray'/> <inherits name='ext.ux.theme.purple.Purple'/> <inherits name='ext.ux.theme.olive.Olive'/> <inherits name='ext.ux.theme.slickness.Slickness'/>
Then add this to your ExtGWT Java code:
And then register the theme as follows:Code:import ext.ux.theme.black.client.Black; import ext.ux.theme.darkgray.client.DarkGray; import ext.ux.theme.purple.client.Purple; import ext.ux.theme.olive.client.Olive; import ext.ux.theme.slickness.client.Slickness;
Enjoy!Code:ThemeManager.register(Black.BLACK); ThemeManager.register(DarkGray.DARKGRAY); ThemeManager.register(Olive.OLIVE); ThemeManager.register(Purple.PURPLE); ThemeManager.register(Slickness.SLICKNESS);
Cypher
PS:
The attached ZIP files need to be renamed to JAR and then included in your ExtGWT project.
-
15 Sep 2008 11:12 PM #2
As a beginner I have a question concerning adding a theme to the project. I add the module inherited in the xml file, add the jar to the classpath, register the theme and nothing changes with the display..
I suppose I can be placing register line in the wrong place, I paste the line
in the first line of the onModuleLoad() method of my entry point. Is it right?Code:ThemeManager.register(Slickness.SLICKNESS);
regards,
bjLast edited by bjagodzinski; 15 Sep 2008 at 11:47 PM. Reason: misspelling
-
16 Sep 2008 12:08 AM #3
Ok, I found the solution. For those who might be interested in the future: Registering a theme is not enough, you have to also set the theme, to have it visible. To do this, you can use ThemeSelector combobox, or set the theme as default theme for the app, just by pasting this line into the onModuleLoad method:
Code:GXT.setDefaultTheme(Slickness.SLICKNESS, true);
-
16 Sep 2008 6:27 AM #4
Sorry, I forgot to mention that one has to either set the default theme or add a "Theme Selector" list-box GUI somewhere in the configuration section of the GWT application, something like this:
The screenshot of such "Theme Selector" panel is attached.Code:HorizontalPanel configPanel = new HorizontalPanel(); configPanel.setSpacing(10); ContentPanel themesPanel = new ContentPanel(); themesPanel.setHeading("Themes"); themesPanel.setFrame(true); themesPanel.setWidth(150); themesPanel.setLayout(new FillLayout()); themesPanel.add(new ThemeSelector()); configPanel.add(themesPanel); add(configPanel);
Thanks, bjagodzinski, for bringing this to my attention.
Cypher
-
18 Sep 2008 10:58 PM #5
The files inside the zips dont have the file extension .jar
Maybe correct that?
-
18 Sep 2008 11:16 PM #6
no, the files need to be renamed to .jar and then included in your project.
-
19 Sep 2008 4:57 AM #7
Exactly - the attached files are actually JAR files with ZIP extension. I had to do it this way because this forum doesn't allow attaching JAR files...
Cypher
-
22 Sep 2008 9:41 PM #8
I think it would be better then to just zip the jar files...
renaming the file extention is rather confusing
But nice work with all the themes
-
25 Sep 2008 1:52 AM #9
+1 to put jar files in a zip file.
By the way, what are the licenses of the themes ?
And also, thanks for the job, it is really helpful !Last edited by zaccret; 25 Sep 2008 at 1:53 AM. Reason: thanks
-
27 Sep 2008 3:12 PM #10
I'm glad you like those themes. I do like them too. Next time I'll zip the JAR files if it helps, no problem.
As for the license, please contact the original ExtJS theme author (in this case it's madrabaz). The GXT theme wrapper that I added to those themes is "public domain".Cypher


Reply With Quote