com.google.gwt.user.client.ui.TabLayoutPanel Java Examples
The following examples show how to use
com.google.gwt.user.client.ui.TabLayoutPanel.
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: GwtOLPlayground.java From gwt-ol with Apache License 2.0 | 6 votes |
@Override public void onModuleLoad() { Map<String, Integer> exampleIndexMap = new HashMap<>(); // choose your example TabLayoutPanel tabs = new TabLayoutPanel(27, Style.Unit.PX); int index = 0; for (OLExampleType example : OLExampleType.values()) { tabs.add(new LazyExampleWidget(example), example.name().replace("Example", "")); exampleIndexMap.put(example.name(), index); index++; } RootLayoutPanel.get().add(tabs); String token = History.getToken(); if (token != null && exampleIndexMap.containsKey(token)) { tabs.selectTab(exampleIndexMap.get(token)); } }
Example #2
Source File: PreviewPopupPanel.java From EasyML with Apache License 2.0 | 4 votes |
public TabLayoutPanel getTabPanel() { return tabPanel; }
Example #3
Source File: PreviewPopupPanel.java From EasyML with Apache License 2.0 | 4 votes |
public void setTabPanel(TabLayoutPanel tabPanel) { this.tabPanel = tabPanel; }
Example #4
Source File: TabDocument.java From document-management-system with GNU General Public License v2.0 | 4 votes |
/** * The Document tab */ public TabDocument() { doc = new GWTDocument(); propertyGroupHandlerExtensionList = new ArrayList<PropertyGroupHandlerExtension>(); tabPanel = new TabLayoutPanel(TAB_HEIGHT, Unit.PX); document = new Document(); notes = new Notes(Notes.DOCUMENT_NOTE); version = new VersionScrollTable(); security = new SecurityScrollTable(); preview = new Preview(null); panel = new VerticalPanel(); propertyGroup = new ArrayList<PropertyGroup>(); widgetExtensionList = new ArrayList<TabDocumentExtension>(); docHandlerExtensionList = new ArrayList<DocumentHandlerExtension>(); tabPanel.addSelectionHandler(new SelectionHandler<Integer>() { @Override public void onSelection(SelectionEvent<Integer> event) { final int tabIndex = event.getSelectedItem().intValue(); Main.get().mainPanel.topPanel.toolBar.evaluateRemovePropertyGroup(isRemovePropertyGroupEnabled(tabIndex)); selectedTab = tabIndex; if (tabIndex == SECURITY_TAB) { Timer timer = new Timer() { @Override public void run() { security.fillWidth(); // Always when shows fires fill width } }; timer.schedule(500); // Fill width must be done after really it'll be visible } preview.cleanPreview(); // Always clean preview tab if (tabIndex == PREVIEW_TAB) { Timer previewTimer = new Timer() { @Override public void run() { previewDocument(false); } }; previewTimer.schedule(500); } fireEvent(HasDocumentEvent.TAB_CHANGED); } }); panel.add(tabPanel); tabPanel.setWidth("100%"); document.setSize("100%", "100%"); notes.setSize("100%", "100%"); panel.setSize("100%", "100%"); tabPanel.setStyleName("okm-DisableSelect"); initWidget(panel); }
Example #5
Source File: TabMail.java From document-management-system with GNU General Public License v2.0 | 4 votes |
/** * The Document tab */ public TabMail() { widgetExtensionList = new ArrayList<TabMailExtension>(); mailHandlerExtensionList = new ArrayList<MailHandlerExtension>(); propertyGroupHandlerExtensionList = new ArrayList<PropertyGroupHandlerExtension>(); tabPanel = new TabLayoutPanel(TAB_HEIGHT, Unit.PX); mail = new Mail(); notes = new Notes(Notes.MAIL_NOTE); mailViewer = new MailViewer(); security = new SecurityScrollTable(); panel = new VerticalPanel(); propertyGroup = new ArrayList<PropertyGroup>(); tabPanel.addSelectionHandler(new SelectionHandler<Integer>() { @Override public void onSelection(SelectionEvent<Integer> event) { int tabIndex = event.getSelectedItem().intValue(); Main.get().mainPanel.topPanel.toolBar.evaluateRemovePropertyGroup(isRemovePropertyGroupEnabled(tabIndex)); selectedTab = tabIndex; if (tabIndex == SECURITY_TAB) { Timer timer = new Timer() { @Override public void run() { security.fillWidth(); // Always when shows fires fill width } }; timer.schedule(500); // Fill width must be done after really it'll be visible } fireEvent(HasMailEvent.TAB_CHANGED); } }); panel.add(tabPanel); tabPanel.setWidth("100%"); mail.setSize("100%", "100%"); notes.setSize("100%", "100%"); mailViewer.setSize("100%", "100%"); panel.setSize("100%", "100%"); tabPanel.setStyleName("okm-DisableSelect"); initWidget(panel); }
Example #6
Source File: TabFolder.java From document-management-system with GNU General Public License v2.0 | 4 votes |
/** * TabFolder */ public TabFolder() { widgetExtensionList = new ArrayList<TabFolderExtension>(); folderHandlerExtensionList = new ArrayList<FolderHandlerExtension>(); propertyGroupHandlerExtensionList = new ArrayList<PropertyGroupHandlerExtension>(); tabPanel = new TabLayoutPanel(TAB_HEIGHT, Unit.PX); folder = new Folder(); security = new SecurityScrollTable(); notes = new Notes(Notes.FOLDER_NOTE); panel = new VerticalPanel(); propertyGroup = new ArrayList<PropertyGroup>(); tabPanel.addSelectionHandler(new SelectionHandler<Integer>() { @Override public void onSelection(SelectionEvent<Integer> event) { int tabIndex = event.getSelectedItem().intValue(); Main.get().mainPanel.topPanel.toolBar.evaluateRemovePropertyGroup(isRemovePropertyGroupEnabled(tabIndex)); selectedTab = tabIndex; if (tabIndex == SECURITY_TAB) { Timer timer = new Timer() { @Override public void run() { security.fillWidth(); // Always when shows fires fill width } }; timer.schedule(500); // Fill width must be done after really it'll be visible } fireEvent(HasFolderEvent.TAB_CHANGED); } }); panel.add(tabPanel); tabPanel.setWidth("100%"); folder.setSize("100%", "100%"); notes.setSize("100%", "100%"); panel.setSize("100%", "100%"); tabPanel.setStyleName("okm-DisableSelect"); initWidget(panel); }