Skip to main content

Simple Tab In Ext GWT

Simple Tab In Ext Google Web Toolkit Sample Code

  1. package com.extjs.gxt.samples.client.examples.tabs;  
  3. import com.extjs.gxt.samples.resources.client.Resources;  
  4. import com.extjs.gxt.samples.resources.client.TestData;  
  5. import com.extjs.gxt.ui.client.Style.Scroll;  
  6. import com.extjs.gxt.ui.client.event.ComponentEvent;  
  7. import com.extjs.gxt.ui.client.event.Events;  
  8. import com.extjs.gxt.ui.client.event.Listener;  
  9. import com.extjs.gxt.ui.client.widget.LayoutContainer;  
  10. import com.extjs.gxt.ui.client.widget.TabItem;  
  11. import com.extjs.gxt.ui.client.widget.TabPanel;  
  12. import com.extjs.gxt.ui.client.widget.VerticalPanel;  
  13. import;  
  14. import;  
  15. import;  
  16. import;  
  18. public class BasicTabExample extends LayoutContainer {  
  20.   @Override  
  21.   protected void onRender(Element parent, int pos) {  
  22.     super.onRender(parent, pos);  
  23.     VerticalPanel vp = new VerticalPanel();  
  24.     vp.setSpacing(10);  
  26.     String txt = TestData.DUMMY_TEXT_SHORT;  
  28.     TabPanel folder = new TabPanel();  
  29.     folder.setWidth(450);  
  30.     folder.setAutoHeight(true);  
  32.     TabItem shortText = new TabItem("Short Text");  
  33.     shortText.addStyleName("pad-text");  
  34.     shortText.addText(txt);  
  35.     folder.add(shortText);  
  37.     TabItem longText = new TabItem("Long Text");  
  38.     longText.addStyleName("pad-text");  
  39.     longText.addText(txt + "<br>" + txt);  
  40.     folder.add(longText);  
  42.     TabPanel panel = new TabPanel();  
  43.     panel.setPlain(true);  
  44.     panel.setSize(450250);  
  46.     TabItem normal = new TabItem("Normal");  
  47.     normal.addStyleName("pad-text");  
  48.     normal.addText("Just a plain old tab");  
  49.     panel.add(normal);  
  51.     TabItem iconTab = new TabItem("Icon Tab");  
  52.     iconTab.setIcon(Resources.ICONS.table());  
  53.     iconTab.addStyleName("pad-text");  
  54.     iconTab.addText("Just a plain old tab with an icon");  
  55.     panel.add(iconTab);  
  57.     TabItem ajax1 = new TabItem("Ajax Tab");  
  58.     ajax1.setScrollMode(Scroll.AUTO);  
  59.     ajax1.addStyleName("pad-text");  
  60.     ajax1.setAutoLoad(new RequestBuilder(RequestBuilder.GET, GWT.getHostPageBaseURL() + "data/ajax1.html"));  
  61.     panel.add(ajax1);  
  63.     TabItem eventTab = new TabItem("Event Tab");  
  64.     eventTab.addListener(Events.Select, new Listener<ComponentEvent>() {  
  65.       public void handleEvent(ComponentEvent be) {  
  66.         Window.alert("Event Tab Was Selected");  
  67.       }  
  68.     });  
  69.     eventTab.addStyleName("pad-text");  
  70.     eventTab.addText("I am tab 4's content. I also have an event listener attached.");  
  71.     panel.add(eventTab);  
  73.     TabItem disabled = new TabItem("Disabled");  
  74.     disabled.setEnabled(false);  
  75.     panel.add(disabled);  
  77.     vp.add(folder);  
  78.     vp.add(panel);  
  79.     add(vp);  
  80.   }  
  82. }  


Popular posts from this blog

Connect To JioFi Device Without Knowing The Passwords Using WPS

If someone in your home or your friends are using Jiofi device and he/she is not sharing the password with you then i am going to share you a simple trick, so you can easily connect to the jiofi router without the need of password and start using the unlimited internet.

This trick can be achieved using the WPS technology (Wi-Fi Protected Setup; originally, Wi-Fi Simple Config) is a network security standard to create a secure wireless home network.

Follow the steps to get the internet for free using the "WPS Push Button Method"
Go to your Wifi Settings in your smartphone device like Android Turn on your Wifi Click the option button and select the  "WPS push button" and you will be seeing the popup window like this below picture.
Now take your JioFi Device and in the right side, you will seeing the WPS button  Hold the WPS button for few moments and see the Jiofi display, so the wifi icon will blink. After few seconds, your smartphone device would have shared the Wifi…

Five More Indian Languages - Google Translate

Google Translate add 5 more indian language translation like Bengali, Gujarati, Kannada, Tamil and Telugu.Till Today Google Translation supports 63 languages. As a indian bloggger its a happy to announce that all indic languages sites and blogs become internationalized one. All indic bloggers and sites owners have to attach the google translate widgets to their sites so that the internationalized reader can realize the value of your blog and may be a chance of becoming the readers.

How to Add The Google Translate Widgets on Blog or Sites

Just Add the Below code to internationalized your blog or site

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
</script><script src="//"></script>

If you want to customize the Goog…

Samsung Android 6.0 Marshmallow Supported Devices

Android Marshmallow is finally available. List of Samsung Device that can be upgraded to Android 6.0 Marshmallow.

Samsung Galaxy S6 edge+ Samsung Galaxy Note5Samsung Galaxy A8Samsung Galaxy A7Samsung Galaxy S6 edgeSamsung Galaxy S6Samsung Galaxy Note 4Samsung Galaxy AlphaSamsung Galaxy S5