com.google.gwt.user.client.ui.TabBar Java Examples

The following examples show how to use com.google.gwt.user.client.ui.TabBar. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TabWorkspaceExample.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setTab(TabBar tabBar, int tabIndex) {
	// TODO Auto-generated method stub

}
 
Example #2
Source File: TabWorkspace.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setTab(TabBar tabBar, int tabIndex) {
	this.tabBar = tabBar;
	this.tabIndex = tabIndex;
}
 
Example #3
Source File: TabWorkspace.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Tab Workspace
 */
public TabWorkspace() {
	widgetExtensionList = new ArrayList<TabWorkspaceExtension>();
	workHandlerExtensionList = new ArrayList<WorkspaceHandlerExtension>();
	tabBar = new TabBar();
	tabBar.addSelectionHandler(new SelectionHandler<Integer>() {
		@Override
		public void onSelection(SelectionEvent<Integer> event) {
			int index = indexCorrectedChangeViewIndex(event.getSelectedItem().intValue());

			switch (index) {
				case UIDockPanelConstants.DESKTOP:
					Main.get().mainPanel.setView(UIDockPanelConstants.DESKTOP);
					if (Main.get().activeFolderTree != null) { // On start up is null
						Main.get().activeFolderTree.centerActulItemOnScroll(); // Center the actual item every time
					}
					break;

				case UIDockPanelConstants.SEARCH:
					Main.get().mainPanel.setView(UIDockPanelConstants.SEARCH);
					break;

				case UIDockPanelConstants.DASHBOARD:
					Main.get().mainPanel.setView(UIDockPanelConstants.DASHBOARD);
					break;

				case UIDockPanelConstants.ADMINISTRATION:
					Main.get().mainPanel.setView(UIDockPanelConstants.ADMINISTRATION);
					break;

				default:
					Main.get().mainPanel.setView(index);
					break;
			}

			fireEvent(HasWorkspaceEvent.STACK_CHANGED);
			tabVisited[index] = true;
		}
	});

	initWidget(tabBar);
}
 
Example #4
Source File: Pages.java    From core with GNU Lesser General Public License v2.1 2 votes vote down vote up
/**
 * Gets the tab bar within this tab panel. Adding or removing tabs from from
 * the TabBar is not supported and will throw UnsupportedOperationExceptions.
 *
 * @return the tab bar
 */
public TabBar getTabBar() {
    return tabBar;
}
 
Example #5
Source File: HasWorkspaceExtension.java    From document-management-system with GNU General Public License v2.0 votes vote down vote up
public abstract void setTab(TabBar tabBar, int tabIndex);