Announcement

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

    new style for a new component

    Hi there,

    I am using SmartGWT 2.4, and I have two types of TabSet(s), each one has a different look and feel, and I am facing a problem implementing that.

    The new TabSet has been implemented as the following :

    Code:
    public class MainTabSet extends TabSet{
        public MainTabSet(){
            super.setStylePrimaryName("MainTabSet");
            build();
        }
    
        private void build(){
            setMargin(6);
            setWidth100();
            setHeight100();  
            setStyleName("nt-main-tabset");
            Tab inboxTab = new Tab("Inbox");
            inboxTab.setPane(new InboxPane().get());
         }
    }
    based on the last paragraph (Multiple looks for the same component type) here : http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/Skinning.html

    I've defined a new class that holds the same primary name I used above :

    Code:
    isc.defineClass("MainTabSet", "TabSet");
    and then I've added some properties to it :

    Code:
            isc.MainTabSet.addProperties({
                tabBarThickness:100,
                scrollerButtonSize:100,
                pickerButtonSize:100,
    
                symmetricScroller:false,
                symmetricPickerButton:false,
    
                scrollerSrc:"nothing",
                pickerButtonSrc:"nothingg",
    
                closeTabIconSize:100
            })

    The code above has been written at the top of section 6 (TabSet) in load_skin.js file.


    Now, I am still getting the same old TabSet look and feel in MainTabSet.
    my Questions now are :

    1- did I follow the right steps to achieve my goal ?
    2- how could I consider new classes to some sub elements of TabSet -like TabBar- but only for the new component (MainTabSet)?

    Thank you guys.
    Firas
Working...
X