TabPanel With Style : TabPanel « GWT « Java






TabPanel With Style



package com.java2s.gwt.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.TabPanel;

public class GWTClient implements EntryPoint{
  public void onModuleLoad() {
    TabPanel tabs = new TabPanel();
    tabs.add(new HTML("1"), "Basic Panels");
    tabs.add(new HTML("2"), "Dock Panel");
    tabs.add(new HTML("3"), "Tables");
    tabs.setWidth("100%");
    tabs.selectTab(0);

    RootPanel.get().add(tabs);
  }
}
//////
.gwt-TabPanel {
  margin-top: 4px;
}

.gwt-TabPanelBottom {
  background-color: #E8E8E8;
}

.gwt-TabBar {
  padding-top: 2px;
  border-bottom: 4px solid #878787;
  background-color: #fff;
}

.gwt-TabBarItem {
  padding: 4px;
  cursor: pointer;
  background-color: #e8e8e8;
  border-bottom: 2px solid white;
  margin-right: 2px;
}

.gwt-TabBarItem-selected {
  padding: 4px;
  font-weight: bold;
  cursor: default;

  background-color: #878787;
  border-bottom: 2px solid #87ffff;
  margin-right: 2px;
}
           
       








GWT-tabPanelWithStyle.zip( 2 k)

Related examples in the same category