List of usage examples for com.vaadin.ui TabSheet TabSheet
public TabSheet()
From source file:ru.codeinside.adm.ui.AdminApp.java
License:Mozilla Public License
@Override public void init() { setUser(Flash.login());//from ww w.j a va2 s .c o m setTheme("custom"); TabSheet t = new TabSheet(); t.addStyleName(Reindeer.TABSHEET_MINIMAL); t.setSizeFull(); t.setCloseHandler(new DelegateCloseHandler()); UserInfoPanel.addClosableToTabSheet(t, getUser().toString()); TreeTableOrganization treeTableOrganization = new TreeTableOrganization(); CrudNews showNews = new CrudNews(); table = treeTableOrganization.getTreeTable(); Tab orgsTab = t.addTab(treeTableOrganization, ""); t.setSelectedTab(orgsTab); t.addTab(new GroupTab(), ""); GwsSystemTab systemTab = new GwsSystemTab(); t.addTab(systemTab, " ??"); t.addListener(systemTab); GwsLazyTab gwsLazyTab = new GwsLazyTab(); t.addTab(gwsLazyTab, "? ??"); t.addListener(gwsLazyTab); t.addTab(createEmployeeWidget(), ""); RefreshableTab settings = createSettings(); t.addTab(settings, "??"); t.addListener(settings); Component businessCalendar = createBusinessCalendar(); t.addTab(businessCalendar, "? "); LogTab logTab = new LogTab(); t.addListener(logTab); t.addTab(logTab, ""); t.addTab(showNews, "??"); t.addTab(registryTab(), "?"); setMainWindow(new Window( getUser() + " | | -" + Activator.getContext().getBundle().getVersion(), t)); AdminServiceProvider.get().createLog(Flash.getActor(), "Admin application", (String) getUser(), "login", null, true); }
From source file:ru.codeinside.adm.ui.AdminApp.java
License:Mozilla Public License
private Component createEmployeeWidget() { final TabSheet tabSheet = new TabSheet(); tabSheet.addStyleName(Reindeer.TABSHEET_MINIMAL); tabSheet.setSizeFull();/* ww w . ja va 2 s . c o m*/ tabSheet.addTab(new EmployeeWidget(false, table), "?"); tabSheet.addTab(new EmployeeWidget(true, table), ""); tabSheet.addListener(new TabSheet.SelectedTabChangeListener() { @Override public void selectedTabChange(TabSheet.SelectedTabChangeEvent event) { EmployeeWidget currentTab = (EmployeeWidget) tabSheet.getSelectedTab(); currentTab.refreshList(); } }); return tabSheet; }
From source file:ru.codeinside.adm.ui.GroupTab.java
License:Mozilla Public License
public GroupTab() { setSizeFull();/* ww w . j a v a 2 s . c o m*/ setSpacing(true); TabSheet t = new TabSheet(); t.addStyleName(Reindeer.TABSHEET_MINIMAL); addComponent(t); t.setSizeFull(); showGroupTab(t, ORGANIZATION); showGroupTab(t, EMPLOYEE); }
From source file:ru.codeinside.adm.ui.LogTab.java
License:Mozilla Public License
public LogTab() { setSizeFull();// w ww. ja va 2s . c o m tabSheet = new TabSheet(); tabSheet.addStyleName(Reindeer.TABSHEET_MINIMAL); tabSheet.addStyleName(Reindeer.TABSHEET_BORDERLESS); tabSheet.addListener(this); tabSheet.setSizeFull(); addComponent(tabSheet); }
From source file:ru.codeinside.gses.webui.declarant.DeclarantFactory.java
License:Mozilla Public License
public static Component create() { // TODO: ?? ??! final ServiceQueryDefinition amSQ = new ServiceQueryDefinition(ProcedureType.Administrative); final LazyQueryContainer amSC = new LazyQueryContainer(amSQ, new ServiceQueryFactory(false)); final ProcedureQueryDefinition amPQ = new ProcedureQueryDefinition(ProcedureType.Administrative); final LazyQueryContainer amPC = new LazyQueryContainer(amPQ, new ProcedureQueryFactory(Flash.login(), false)); final ProcedureQueryDefinition mmQ = new ProcedureQueryDefinition(ProcedureType.Interdepartmental); final LazyQueryContainer mmC = new LazyQueryContainer(mmQ, new ProcedureQueryFactory(Flash.login(), false)); final VerticalLayout layout = new VerticalLayout(); layout.setSizeFull();//from ww w .j av a 2 s .co m layout.setMargin(true); final Label header = new Label( " ? ?? ?? ?"); header.addStyleName("h1"); layout.addComponent(header); final Select amS = new Select("", amPC); String selectWidth = "400px"; amS.setWidth(selectWidth); amS.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY); amS.setItemCaptionPropertyId("name"); amS.setFilteringMode(AbstractSelect.Filtering.FILTERINGMODE_CONTAINS); amS.setNullSelectionAllowed(true); amS.setNewItemsAllowed(false); amS.setImmediate(true); final Select amSS = new Select("?", amSC); amSS.setWidth(selectWidth); amSS.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY); amSS.setItemCaptionPropertyId("name"); amSS.setFilteringMode(AbstractSelect.Filtering.FILTERINGMODE_CONTAINS); amSS.setNullSelectionAllowed(true); amSS.setNewItemsAllowed(false); amSS.setImmediate(true); final FormLayout amLayout = new FormLayout(); final Panel amPanel = new Panel(); amLayout.addComponent(amSS); amLayout.addComponent(amS); amPanel.addComponent(amLayout); final Select mmS = new Select("", mmC); mmS.setFilteringMode(Select.FILTERINGMODE_OFF); mmS.setWidth(selectWidth); mmS.setItemCaptionPropertyId("name"); mmS.setFilteringMode(AbstractSelect.Filtering.FILTERINGMODE_CONTAINS); mmS.setNullSelectionAllowed(true); mmS.setNewItemsAllowed(false); mmS.setImmediate(true); final FormLayout mmLayout = new FormLayout(); final Panel mmPanel = new Panel(); // mmLayout.addComponent(mmSS); mmLayout.addComponent(mmS); mmPanel.addComponent(mmLayout); final VerticalLayout amWrapper = new VerticalLayout(); amWrapper.setSizeFull(); amWrapper.addComponent(amPanel); final VerticalLayout imWrapper = new VerticalLayout(); imWrapper.setSizeFull(); imWrapper.addComponent(mmPanel); final TabSheet typeSheet = new TabSheet(); typeSheet.setSizeFull(); typeSheet.addTab(amWrapper, "?? "); typeSheet.addTab(imWrapper, "? "); layout.addComponent(typeSheet); layout.setExpandRatio(typeSheet, 1); // amSS.addListener(new Property.ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { final Property prop = event.getProperty(); if (prop.getValue() == null) { amPQ.serviceId = -1; } else { amPQ.serviceId = (Long) amSC.getItem(prop.getValue()).getItemProperty("id").getValue(); } amS.select(null); amPC.refresh(); } }); final ProcedureSelectListener administrativeProcedureSelectListener = new ProcedureSelectListener() { private static final long serialVersionUID = 1L; @Override public void selectProcedure(long id) { if (amWrapper.getComponentCount() > 1) { amWrapper.removeComponent(amWrapper.getComponent(1)); } if (id > 0) { final Component cmp = createStartEventForm(id, this, layout); if (cmp != null) { amWrapper.addComponent(cmp); amWrapper.setExpandRatio(cmp, 1f); } else { amS.select(null); amPC.refresh(); amSC.refresh(); } } } }; final ProcedureSelectListener interdepartamentalProcedureSelectListener = new ProcedureSelectListener() { private static final long serialVersionUID = 1L; @Override public void selectProcedure(long id) { if (imWrapper.getComponentCount() > 1) { imWrapper.removeComponent(imWrapper.getComponent(1)); } if (id > 0) { final Component cmp = createStartEventForm(id, this, layout); if (cmp != null) { imWrapper.addComponent(cmp); imWrapper.setExpandRatio(cmp, 1f); } } } }; amS.addListener(new Property.ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { final Object itemId = event.getProperty().getValue(); final long procedureId = itemId == null ? -1 : (Long) amPC.getItem(itemId).getItemProperty("id").getValue(); administrativeProcedureSelectListener.selectProcedure(procedureId); } }); mmS.addListener(new Property.ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { final Object itemId = event.getProperty().getValue(); final long procedureId = itemId == null ? -1 : (Long) mmC.getItem(itemId).getItemProperty("id").getValue(); interdepartamentalProcedureSelectListener.selectProcedure(procedureId); } }); return layout; }
From source file:ru.codeinside.gses.webui.Workplace.java
License:Mozilla Public License
public Workplace(String login, Set<Role> roles, boolean production) { TabSheet tabSheet = new TabSheet(); tabSheet.setSizeFull();/*from w w w . j a va2s. c om*/ tabSheet.setStyleName(Reindeer.TABSHEET_BORDERLESS); tabSheet.setCloseHandler(new DelegateCloseHandler()); if (!production) { new MemoryUsage(tabSheet); } UserInfoPanel.addClosableToTabSheet(tabSheet, login); if (roles.contains(Role.Executor)) { TabChanger archiveChanger = new TabChanger(tabSheet); archiveChanger.set(ArchiveFactory.create(), "?"); TabChanger executorChanger = new TabChanger(tabSheet); executorChanger.set(ExecutorFactory.create(executorChanger, tabSheet), "?"); } if (roles.contains(Role.Declarant)) { new TabChanger(tabSheet).set(DeclarantFactory.create(), " ?"); } if (roles.contains(Role.Supervisor) || roles.contains(Role.SuperSupervisor)) { new TabChanger(tabSheet).set(new SupervisorWorkplace(), " ??"); } if (roles.contains(Role.SuperSupervisor)) { new TabChanger(tabSheet).set(new TaskManager(), "?? ??"); } if (roles.contains(Role.Manager)) { new TabChanger(tabSheet).set(new ManagerWorkplace(), " "); } if (roles.contains(Role.Executor) || roles.contains(Role.Declarant) || roles.contains(Role.Supervisor) || roles.contains(Role.SuperSupervisor)) { SmevTasksPanel smevTasksPanel = new SmevTasksPanel(); tabSheet.addTab(smevTasksPanel, " "); tabSheet.addListener(smevTasksPanel); } setCompositionRoot(tabSheet); setSizeFull(); }
From source file:steps.ConditionInstanceStep.java
License:Open Source License
/** * Create a new Condition Step for the wizard * //from w w w . j a va 2 s .c o m * @param options Set of different conditions available e.g. different species * @param optionName Title of the options selection e.g. Species * @param stepName Title of this step e.g. Extraction Conditions */ public ConditionInstanceStep(Set<String> options, String optionName, String stepName) { main = new VerticalLayout(); main.setSpacing(true); main.setMargin(true); instances = new TabSheet(); instances.setStyleName(ValoTheme.TABSHEET_FRAMED); main.addComponent(instances); preview = new Table(); preview.addContainerProperty("Factors", String.class, null); preview.addContainerProperty("Samples", TextField.class, null); preview.setStyleName(Styles.tableTheme); VerticalLayout frame = new VerticalLayout(); frame.setCaption("Preview of Combinations"); frame.addComponent(preview); previewFrame = new CustomVisibilityComponent(frame); previewFrame.setVisible(false); main.addComponent(Styles.questionize(previewFrame, "This table shows a preview of the number and type of samples " + "that will be created in the next step. You can change the number of samples for each " + "group of samples. For example, if one variable combination is not in the experiment at all, set it to 0.", "Preview")); this.options = options; this.optionName = optionName; this.stepName = stepName; factorInstances = new ArrayList<ConditionPropertyPanel>(); optionInstances = new ArrayList<FactorOptionBox>(); permutations = new LinkedHashMap<Object, Integer>(); }
From source file:steps.PoolingStep.java
License:Open Source License
public PoolingStep(Steps poolStep) { instances = new TabSheet(); instances.setStyleName(ValoTheme.TABSHEET_FRAMED); poolings = new ArrayList<DragDropPoolComponent>(); this.type = poolStep; main = new VerticalLayout(); main.setSpacing(true);/*from www . j a v a 2s . c o m*/ main.setMargin(true); pooling = new DragDropPoolComponent(getPoolPrefix(poolStep)); main.addComponent(instances); }
From source file:steps.PoolingStep.java
License:Open Source License
public void resetStep() { poolings = new ArrayList<DragDropPoolComponent>(); main.removeComponent(instances);//from ww w . j a va 2 s . co m instances = new TabSheet(); main.addComponent(instances); }
From source file:uicomponents.DragDropPoolComponent.java
License:Open Source License
public DragDropPoolComponent(String poolingPrefix) { this.name = poolingPrefix; usedTimes = new HashMap<Integer, Integer>(); left = new VerticalLayout(); left.setSpacing(true);//from w w w . j a v a 2s. co m left.setWidth("500px"); tableLayout = new TabSheet(); tableLayout.setWidth("100%"); tableLayout.setStyleName(ValoTheme.TABSHEET_FRAMED); tables = new ArrayList<PoolingTable>(); add = new Button("Add Pool"); remove = new Button("Remove Last Pool"); initButtons(); addComponent(left); left.addComponent(Styles.questionize(tableLayout, "Here you can add pools and fill them with the samples " + "from earlier steps (found on the right). One sample can be in multiple pools.", "Target Pools")); left.addComponent(add); left.addComponent(remove); samples = new TabSheet(); initSelectionTables(); addComponent(Styles.questionize(samples, "These are the samples you prepared in the earlier steps. For convenience they are separated in unused samples " + "and samples that are already in at least one pool.", "Target Pools")); }