1. #1
    Sencha User
    Join Date
    Sep 2009
    Posts
    289
    Vote Rating
    0
    diegolovison is on a distinguished road

      0  

    Default radio group that allow remove radios or add news

    radio group that allow remove radios or add news


    Code:
        public class XRadioGroup extends RadioGroup {
    
            private static int autoId = 0;
    
            public XRadioGroup() {
                this("gxt.RadioGroup." + autoId++);
            }
    
            public XRadioGroup(final String name) {
                setGroupName(name);
                messages = new RadioGroupMessages();
                setSpacing(5);
            }
    
            public void addField(final Field<?> f) {
                addInternalField(f);
            }
    
            public void addField(final Radio radio) {
    
                setGroup(radio, this);
                radio.setName(getGroupName());
    
                addInternalField(radio);
            }
    
            private void addInternalField(final Field<?> f) {
    
                fields.add(f);
    
                final boolean vertical = orientation == Orientation.VERTICAL;
    
                TableData data = (TableData) ComponentHelper.getLayoutData(f);
                if (data == null) {
                    data = new TableData();
                }
                String style = "position: static;";
    
                if (vertical && spacing > 0) {
                    style += "paddingTop:" + spacing + "px;";
                } else if (!vertical && spacing > 0) {
                    style += "paddingLeft:" + spacing + "px;";
                }
                data.setStyle(style);
    
                lc.add(f, data);
                lc.layout();
            }
    
            private native String getGroupName() /*-{
                return this.@com.extjs.gxt.ui.client.widget.form.RadioGroup::groupName;
            }-*/;
    
            public boolean removeAllFields() {
                return lc.removeAll();
            }
    
            public void removeField(final Field<?> f) {
                lc.remove(f);
                lc.layout();
            }
    
            private native void setGroup(Radio radio, RadioGroup radioGroup) /*-{
                radio.@com.extjs.gxt.ui.client.widget.form.Radio::group = radioGroup;
            }-*/;
    
            private native void setGroupName(String groupName) /*-{
                this.@com.extjs.gxt.ui.client.widget.form.RadioGroup::groupName = groupName;
            }-*/;
        }

  2. #2
    Sencha User
    Join Date
    Sep 2009
    Posts
    289
    Vote Rating
    0
    diegolovison is on a distinguished road

      0  

    Default


    example

    Code:
        @Override
        public void onModuleLoad() {
    
            final Radio rd1 = new Radio();
            final Radio rd2 = new Radio();
            final Radio rd3 = new Radio();
            final Radio rd4 = new Radio();
    
            final XRadioGroup rg = new XRadioGroup();
            rg.add(rd1);
            rg.add(rd2);
            rg.add(rd3);
            rg.add(rd4);
    
            final Button btn1 = new Button("add field", new SelectionListener<ButtonEvent>() {
                @Override
                public void componentSelected(final ButtonEvent ce) {
                    rg.addField(new Radio());
                }
            });
    
            final Button btn2 = new Button("remove field", new SelectionListener<ButtonEvent>() {
                @Override
                public void componentSelected(final ButtonEvent ce) {
                    rg.removeField(rd1);
                }
            });
    
            final Button btn3 = new Button("remove all", new SelectionListener<ButtonEvent>() {
                @Override
                public void componentSelected(final ButtonEvent ce) {
                    rg.removeAllFields();
                }
            });
    
            RootPanel.get().add(rg);
            RootPanel.get().add(btn1);
            RootPanel.get().add(btn2);
            RootPanel.get().add(btn3);
        }

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi