Codota Logo
TabPanel
Code IndexAdd Codota to your IDE (free)

How to use
TabPanel
in
com.google.gwt.user.client.ui

Best Java code snippets using com.google.gwt.user.client.ui.TabPanel (Showing top 20 results out of 315)

  • Common ways to obtain TabPanel
private void myMethod () {
TabPanel t =
  • Codota Iconnew TabPanel()
  • Smart code suggestions by Codota
}
origin: com.google.gwt/gwt-servlet

/**
 * Convenience overload to allow {@link IsWidget} to be used directly.
 */
public void add(IsWidget w, IsWidget tabWidget) {
 add(asWidgetOrNull(w), asWidgetOrNull(tabWidget));
}
origin: com.google.gwt/gwt-servlet

/**
 * Programmatically selects the specified tab and fires events.
 *
 * @param index the index of the tab to be selected
 */
public void selectTab(int index) {
 selectTab(index, true);
}
origin: com.google.gwt/gwt-servlet

/**
 * Adds a widget to the tab panel. If the Widget is already attached to the
 * TabPanel, it will be moved to the right-most index.
 *
 * @param w the widget to be added
 * @param tabText the text to be shown on its tab
 */
public void add(Widget w, String tabText) {
 insert(w, tabText, getWidgetCount());
}
origin: com.google.gwt/gwt-servlet

@Override
public void clear() {
 while (getWidgetCount() > 0) {
  remove(getWidget(0));
 }
}
origin: org.picketlink/picketlink-console-extensions

private void createDetailsSection(VerticalPanel vpanel) {
  // adds the title for the details section
  vpanel.add(new ContentGroupLabel("Details"));
  // adds the tabs for the details section
  bottomTabs = new TabPanel();
  bottomTabs.setStyleName("default-tabpanel");
  bottomTabs.addStyleName("master_detail-detail");
  wizard = doCreateWizard();
  doCreateAttributesTab(bottomTabs);
  addDetailsSectionTabs(bottomTabs);
  vpanel.add(bottomTabs);
  bottomTabs.selectTab(0);
}
origin: org.switchyard.console.wildfly/switchyard-console-wildfly-extension

/**
 * @return this editor as a Widget.
 */
public Widget asWidget() {
  VerticalPanel panel = new VerticalPanel();
  panel.add(new ContentGroupLabel(Singleton.MESSAGES.label_serviceDetails()));
  panel.add(new ContentDescription(Singleton.MESSAGES.description_serviceDetails()));
  panel.add(createImplementationDetailsPanel());
  TabPanel tabs = new TabPanel();
  tabs.setStyleName("default-tabpanel"); //$NON-NLS-1$
  tabs.getElement().setAttribute("style", "margin-top:15px;"); //$NON-NLS-1$ //$NON-NLS-2$
  tabs.add(createGatewayDetailsPanel(), Singleton.MESSAGES.label_gateways());
  tabs.add(createThrottlingDetailsPanel(), Singleton.MESSAGES.label_throttling());
  tabs.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
    @Override
    public void onBeforeSelection(BeforeSelectionEvent<Integer> event) {
      _toolstrip.doCancel();
    }
  });
  panel.add(tabs);
  tabs.selectTab(0);
  return panel;
}
origin: org.metawidget.modules/metawidget-all

  tabPanel = new TabPanel();
tabPanel.add( newPanel, localizedSection );
  tabPanel.selectTab( 0 );
origin: net.sf.javaprinciples.client/client-presentation

@Override
public void add(View view)
{
  int index = tabPanel.getWidgetCount();
  InstanceView instanceView = new InstanceView(Integer.toString(index));
  tabPanel.add(view.getWidget(), instanceView.makeTab(tabLabel(index)));
  if (index == 0)
  {
    tabPanel.selectTab(0);
  }
}
origin: kaaproject/kaa

 @Override
 public void onSuccessImpl(SchemaInfoDto result) {
  endpointProfile = result;
  endpointProfileRecordPanel.setValue(result.getSchemaForm());
  endpointProfileRecordPanel.setTitle(result.getSchemaName());
  profileRecordsPanel.add(
    endpointProfileRecordPanel, Utils.constants.endpointProfile());
  processLoad();
 }
});
origin: stackoverflow.com

 TabPanel panel = new TabPanel();
panel.add(new Page2(), "Page 2");
origin: kaaproject/kaa

profileRecordsPanel = new TabPanel();
table.setWidget(++row, 0, profileRecordsPanel);
origin: com.google.gwt/gwt-servlet

public static void add(TabPanel source, TabListener listener) {
 WrappedTabListener t = new WrappedTabListener(listener);
 source.addBeforeSelectionHandler(t);
 source.addSelectionHandler(t);
}
origin: com.google.gwt/gwt-servlet

/**
 * Creates an empty tab panel.
 */
public TabPanel() {
 VerticalPanel panel = new VerticalPanel();
 panel.add(tabBar);
 panel.add(deck);
 panel.setCellHeight(deck, "100%");
 tabBar.setWidth("100%");
 tabBar.addTabListener(this);
 initWidget(panel);
 setStyleName("gwt-TabPanel");
 deck.setStyleName("gwt-TabPanelBottom");
 // Add a11y role "tabpanel"
 Roles.getTabpanelRole().set(deck.getElement());
}
origin: com.googlecode.gwt-test-utils/gwt-test-utils

/**
 * Verifies that the actual {@link TabPanel} child widget count is equal to the given one.
 *
 * @param expected the expected widget count.
 * @return this assertion object.
 * @throws AssertionError if the actual widget count is not equal to the given one.
 * @see TabPanel#getWidgetCount()
 */
public S widgetCountEquals(int expected) {
  int widgetCount = actual.getWidgetCount();
  if (areEqual(widgetCount, expected))
    return myself;
  throw propertyComparisonFailed("WidgetCount", widgetCount, expected);
}
origin: stackoverflow.com

 TabPanel panel = ...;

panel.addSelectionHandler(new SelectionHandler<Integer>()
{
  @Override
  public void onSelection(SelectionEvent<Integer> event)
  {

  }
});
origin: net.sf.javaprinciples.client/client-presentation

@Override
public void remove(View view)
{
  tabPanel.remove(view.getWidget());
}
origin: org.picketlink/picketlink-console-extensions

@Override
public Widget asWidget() {
  this.tabPanel = new TabPanel();
  tabPanel.setStyleName("default-tabpanel");
  tabPanel.addStyleName("master_detail-detail");
  VerticalPanel layout = new VerticalPanel();
  final TextItem aliasItem = new TextItem("name", uiConstants.common_label_federationName());
  form.setFields(aliasItem);
  form.setEnabled(false);
  layout.add(new FormLayout().setTools(null).setForm(form).build());
  tabPanel.add(layout, "Attributes");
  
  this.samlConfigurationDetails = new SAMLConfigurationDetails(this.presenter);
  tabPanel.add(this.samlConfigurationDetails.asWidget(), "SAML Configuration");
  tabPanel.selectTab(0);
  return tabPanel;
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

TabPanel tPanel = new TabPanel();
codePanel.add( codeTable );
tPanel.add( codePanel,
      "Custom Code" );
functionPanel.add( functionTable );
tPanel.add( functionPanel,
      "Function" );
ChangeHandler changehandler = new ChangeHandler() {
tPanel.selectTab( useFunction ? 1 : 0 );
origin: kaaproject/kaa

 @Override
 public void onSuccessImpl(SchemaInfoDto result) {
  serverProfile = result;
  serverProfileRecordPanel.setValue(result.getSchemaForm());
  serverProfileRecordPanel.setTitle(result.getSchemaName());
  profileRecordsPanel.add(
    serverProfileRecordPanel, Utils.constants.serverProfile());
  processLoad();
 }
});
origin: stackoverflow.com

final TabPanel infoTabPanel = new TabPanel();
infoTabPanel.add(new TextButton("moo"), "moo");
infoTabPanel.add(new TextButton("boo"), "boo");
infoPanel.add(infoTabPanel);
infoPanel.hide();
com.google.gwt.user.client.uiTabPanel

Javadoc

A panel that represents a tabbed set of pages, each of which contains another widget. Its child widgets are shown as the user selects the various tabs associated with them. The tabs can contain arbitrary HTML.

This widget will only work in quirks mode. If your application is in Standards Mode, use TabLayoutPanel instead.

Note that this widget is not a panel per se, but rather a com.google.gwt.user.client.ui.Composite that aggregates a com.google.gwt.user.client.ui.TabBar and a com.google.gwt.user.client.ui.DeckPanel. It does, however, implement com.google.gwt.user.client.ui.HasWidgets.

CSS Style Rules

  • .gwt-TabPanel { the tab panel itself }
  • .gwt-TabPanelBottom { the bottom section of the tab panel (the deck containing the widget) }

Example

com.google.gwt.examples.TabPanelExample

Most used methods

  • add
    Adds a widget to the tab panel. If the Widget is already attached to the TabPanel, it will be moved
  • selectTab
    Programmatically selects the specified tab.
  • <init>
    Creates an empty tab panel.
  • getWidgetCount
  • setStyleName
  • addBeforeSelectionHandler
  • addSelectionHandler
  • remove
    Removes the given widget, and its associated tab.
  • addHandler
  • asWidgetOrNull
  • createTabTextWrapper
    Create a SimplePanel that will wrap the contents in a tab. Subclasses can use this method to wrap ta
  • getWidget
  • createTabTextWrapper,
  • getWidget,
  • getWidgetIndex,
  • initWidget,
  • insert,
  • addStyleName,
  • getElement,
  • isAnimationEnabled,
  • setVisible

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • Path (java.nio.file)
  • Reference (javax.naming)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now