Example usage for com.google.gwt.user.client.ui Accessibility ROLE_TABLIST

List of usage examples for com.google.gwt.user.client.ui Accessibility ROLE_TABLIST

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui Accessibility ROLE_TABLIST.

Prototype

String ROLE_TABLIST

To view the source code for com.google.gwt.user.client.ui Accessibility ROLE_TABLIST.

Click Source Link

Usage

From source file:cc.alcina.framework.gwt.client.widget.FlowTabBar.java

License:Apache License

/**
 * Creates an empty tab bar.//  ww  w  .  ja v  a  2 s. co  m
 */
public FlowTabBar() {
    initWidget(panel2);
    sinkEvents(Event.ONCLICK);
    setStyleName("gwt-TabBar");
    // Add a11y role "tablist"
    Accessibility.setRole(panel2.getElement(), Accessibility.ROLE_TABLIST);
    // panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
    HTML first = new HTML(" ", true), rest = new HTML(" ", true);
    first.setStyleName("gwt-TabBarFirst");
    rest.setStyleName("gwt-TabBarRest");
    first.setHeight("100%");
    rest.setHeight("100%");
    first.setVisible(false);
    rest.setVisible(false);
    panel2.add(first);
    panel2.add(rest);
    first.setHeight("100%");
    // panel.setCellHeight(first, "100%");
    // panel.setCellWidth(rest, "100%");
}

From source file:com.google.gerrit.client.changes.DownloadCommandPanel.java

License:Apache License

DownloadCommandPanel() {
    setStyleName(Gerrit.RESOURCES.css().downloadLinkList());
    Accessibility.setRole(getElement(), Accessibility.ROLE_TABLIST);
}

From source file:com.google.gerrit.client.changes.DownloadUrlPanel.java

License:Apache License

DownloadUrlPanel(final DownloadCommandPanel commandPanel) {
    this.commandPanel = commandPanel;
    setStyleName(Gerrit.RESOURCES.css().downloadLinkList());
    Accessibility.setRole(getElement(), Accessibility.ROLE_TABLIST);
}

From source file:mat.client.shared.ui.MATTabBar.java

License:Apache License

/**
 * Creates an empty tab bar./*w  w w. ja  v  a2  s.  c  o m*/
 */
public MATTabBar() {
    panel.getElement().setId("panel_HorizontalPanel");
    initWidget(panel);
    sinkEvents(Event.ONCLICK);
    setStyleName("gwt-TabBar");

    // Add a11y role "tablist"
    Accessibility.setRole(panel.getElement(), Accessibility.ROLE_TABLIST);

    panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);

    HTML first = new HTML(" ", true), rest = new HTML(" ", true);
    first.setStyleName("gwt-TabBarFirst");
    rest.setStyleName("gwt-TabBarRest");
    first.setHeight("100%");
    rest.setHeight("100%");

    panel.add(first);
    panel.add(rest);
    first.setHeight("100%");
    panel.setCellHeight(first, "100%");
    panel.setCellWidth(rest, "100%");
    setStyleName(first.getElement().getParentElement(), "gwt-TabBarFirst-wrapper");
    setStyleName(rest.getElement().getParentElement(), "gwt-TabBarRest-wrapper");
}

From source file:org.cruxframework.crux.widgets.client.rollingtabs.RollingTabBar.java

License:Apache License

/**
 * Creates an empty tab bar./*from w w w .j  a v a  2s .com*/
 */
RollingTabBar() {
    panel = new CustomRollingPanel();

    initWidget(panel);
    sinkEvents(Event.ONCLICK);
    setStyleName("crux-TabBar");
    panel.setSpacing(0);
    panel.setScrollToAddedWidgets(true);

    // Add a11y role "tablist"
    Accessibility.setRole(panel.getElement(), Accessibility.ROLE_TABLIST);

    panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);

    HTML first = new HTML(" ", true), rest = new HTML(" ", true);
    first.setStyleName("crux-TabBarFirst");
    rest.setStyleName("crux-TabBarRest");
    first.setHeight("100%");
    rest.setHeight("100%");

    panel.add(first);
    panel.add(rest);
    first.setHeight("100%");
    panel.setCellHeight(first, "100%");
    panel.setCellWidth(rest, "100%");
    setStyleName(first.getElement().getParentElement(), "crux-TabBarFirst-wrapper");
    setStyleName(rest.getElement().getParentElement(), "crux-TabBarRest-wrapper");
}