Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    how to change skin

    I'm a completely newbie in Javascript. I use smartgwt-1.0b2 nightlybuild(12-18-2008)

    I'm trying to use Themen TreeFrog and i have:
    Code:
     	<inherits name="com.smartgwt.SmartGwtNoScript" />	
    	<inherits name='com.smartclient.theme.treefrog.TreeFrog'/>
    in my module, but i have no idea how can i inherit SmartClient in my module
    or add the JS and skin includes in my host html.

    somebody knows the solution ?

    thank you very much!
    Last edited by RWTH; 23 Jan 2009, 13:37.

    #2
    Try this

    <inherits name="com.smartgwt.SmartGwtNoScript" />
    <inherits name="com.smartclient.SmartClientDefault"/>
    <inherits name="com.smartclient.theme.treefrog.TreeFrog"/>


    KC

    Comment


      #3
      Thanks a lot

      Comment


        #4
        Originally posted by kccheng
        Try this

        <inherits name="com.smartgwt.SmartGwtNoScript" />
        <inherits name="com.smartclient.SmartClientDefault"/>
        <inherits name="com.smartclient.theme.treefrog.TreeFrog"/>

        KC

        I am a JavaScript newbie and having trouble with setting skin correctly for my simple test app using SmartGWT. When I followed your instructions I got errors like:

        Resource not found: sc/skins/standard/...

        Here is what my Application.gwt.xml file looks like following your instructions:

        Code:
        <module>
            <inherits name='com.google.gwt.user.User'/>
            <inherits name="com.google.gwt.core.Core"/>
            <inherits name="com.google.gwt.user.History"/>
        
            <inherits name="com.smartgwt.SmartGwtNoScript"/>
            <inherits name="com.smartclient.SmartClientDefault"/>
            <inherits name="com.smartclient.theme.silverwave.SilverWaveResources"/>
        
            <!-- Specify the app entry point class.                         -->
            <entry-point class='xxx.gui.gwt.client.Application'/>
            
            <!-- Specify the application specific style sheet.              -->
            <stylesheet src='Application.css' />
        	
        </module>
        Note that I am wanting to use SilverWave instead of TreeFrog.

        What am I missing?

        So when I changed my Application.gwt.xml to be as below:

        Code:
        <module>
            <inherits name='com.google.gwt.user.User'/>
            <inherits name="com.google.gwt.core.Core"/>
            <inherits name="com.google.gwt.user.History"/>
        
            <inherits name="com.smartgwt.SmartGwt"/>
            <inherits name="com.smartclient.SmartClientDefault"/>
            <inherits name="com.smartclient.theme.silverwave.SilverWaveResources"/>
        
            <!-- Specify the app entry point class.                         -->
            <entry-point class='xxx.gui.gwt.client.Application'/>
            
            <!-- Specify the application specific style sheet.              -->
            <stylesheet src='Application.css' />
        	
        </module>
        the errors go away but the result still looks like it is not being styled properly. Borders are missing around SectionStackSection titles as well as on Tab titles with a TabSet. The Tabs are also not displaying the image for the close button even though I have the following code:

        Code:
        mainTabs.setCloseTabIcon("[SKIN]/Window/close.png");
        How do I tell my Java code what skin to use? I am doing the following before I create any GUI components:

        Code:
        Cookies.setCookie("skin", "SilverWave");
        Finally, please help me understand how to inherit only what I need (and nothing less) in Application.gwt.xml file so I can have efficiency as well as correct styling.

        Please respond assuming I know nothing about JavaScript, CSS etc. as I am coming from a Swing background. Thanks.

        Update.....

        The problem is solved.

        It appears that problem was the last line in my APplication.gwt.xml file which specified an app specific style sheet. Removing that line makes my GUI look like the showcase.
        Thanks.
        Last edited by farrukh_najmi; 26 Jan 2009, 14:51.

        Comment


          #5
          silverwave is the default skin, so you only need
          Code:
             <inherits name="com.smartgwt.SmartGwt"/>
          To understand what "inherits" does ... simply do

          Code:
          jar xvf smartgwt.jar
          And see the content of the following XML files:

          Code:
          ./com/smartgwt/SmartGwt.gwt.xml
          ./com/smartgwt/SmartGwtNoScript.gwt.xml
          ./com/smartgwt/SmartGwtDebug.gwt.xml
          ./com/smartclient/SmartClientDebug.gwt.xml
          ./com/smartclient/SmartClientNoScript.gwt.xml
          ./com/smartclient/SmartClientDefault.gwt.xml
          ./com/smartclient/theme/treefrog/TreeFrogResources.gwt.xml
          I believe it's quite easy to understand.
          The "inherits" is similar to "include" which let you to include
          pre-defined JS code by GWT way.


          KC

          Comment


            #6
            Am using Smartgwt 4.0. After upgrading to new version i am having some issues with the skin. I was using Graphite theme,
            So decided to change the theme to Simplicity. But none of the images are getting loaded.
            Am testing my application on Chrome

            Below are the 2 lines i added and commenting the previous theme . The new images are not getting loaded. Every page and every corner is shown as broken images.

            '<inherits name="com.smartgwt.SmartGwtNoTheme" />
            <inherits name="com.smartclient.theme.simplicity.SimplicityResources" />
            <inherits name="com.smartclient.theme.simplicity.Simplicity" />
            <!-- <inherits name="com.smartclient.theme.enterprise.Enterprise" /> -->
            <!-- <inherits name="com.smartclient.theme.graphite.Graphite" /> -->'

            Am i doing something wrong or do i have do anything extra ?
            Last edited by jeslinedias; 1 Oct 2014, 07:44. Reason: template words removed

            Comment


              #7
              Simplicity

              Simplicity theme is in smartgwt-skins.jar (while Graphite is in smartgwt.jar).

              Comment

              Working...
              X