List of usage examples for com.vaadin.ui Accordion Accordion
public Accordion()
From source file:annis.gui.CorpusBrowserPanel.java
License:Apache License
public CorpusBrowserPanel(final AnnisCorpus corpus, QueryController controller) { super("Available annotations"); this.corpus = corpus; this.controller = controller; setSizeFull();/*from w ww. j a v a2 s . c om*/ Accordion accordion = new Accordion(); setContent(accordion); accordion.setSizeFull(); containerNodeAnno = new BeanItemContainer<>(CorpusBrowserEntry.class); containerNodeAnno.setItemSorter(new ExampleSorter()); containerEdgeType = new BeanItemContainer<>(CorpusBrowserEntry.class); containerEdgeType.setItemSorter(new ExampleSorter()); containerEdgeAnno = new BeanItemContainer<>(CorpusBrowserEntry.class); containerEdgeAnno.setItemSorter(new ExampleSorter()); containerMetaAnno = new BeanItemContainer<>(CorpusBrowserEntry.class); containerMetaAnno.setItemSorter(new ExampleSorter()); citationGenerator = new CitationLinkGenerator(); tblNodeAnno = new ExampleTable(citationGenerator, containerNodeAnno); tblNodeAnno.addValueChangeListener(new ExampleListener()); tblNodeAnno.addStyleName(ChameleonTheme.TABLE_STRIPED); tblEdgeTypes = new ExampleTable(citationGenerator, containerEdgeType); tblEdgeTypes.addValueChangeListener(new ExampleListener()); tblEdgeTypes.addStyleName(ChameleonTheme.TABLE_STRIPED); tblEdgeAnno = new ExampleTable(citationGenerator, containerEdgeAnno); tblEdgeAnno.addValueChangeListener(new ExampleListener()); tblEdgeAnno.addStyleName(ChameleonTheme.TABLE_STRIPED); tblMetaAnno = new ExampleTable(citationGenerator, containerMetaAnno); tblMetaAnno.addValueChangeListener(new ExampleListener()); tblMetaAnno.addStyleName(ChameleonTheme.TABLE_STRIPED); boolean stripNodeAnno = true; boolean stripEdgeName = true; boolean stripEdgeAnno = true; HashSet<String> nodeAnnoNames = new HashSet<>(); HashSet<String> edgeAnnoNames = new HashSet<>(); HashSet<String> edgeNames = new HashSet<>(); HashSet<String> fullEdgeNames = new HashSet<>(); boolean hasDominance = false; boolean hasEmptyDominance = false; List<AnnisAttribute> attributes = fetchAnnos(corpus.getName()); // do some preparations first for (AnnisAttribute a : attributes) { if (a.getType() == AnnisAttribute.Type.node) { // check for ambigous names String name = killNamespace(a.getName()); if (nodeAnnoNames.contains(name)) { stripNodeAnno = false; } nodeAnnoNames.add(name); } else if (a.getType() == AnnisAttribute.Type.edge) { fullEdgeNames.add(a.getEdgeName()); // check if we need to add the general dominance example edge if (a.getSubtype() == AnnisAttribute.SubType.d) { hasDominance = true; if (a.getEdgeName() == null || a.getEdgeName().isEmpty()) { hasEmptyDominance = true; } } String annoName = killNamespace(a.getName()); if (edgeAnnoNames.contains(annoName)) { stripEdgeAnno = false; } edgeAnnoNames.add(annoName); } } // check if collected edge names are unique for (String edgeName : fullEdgeNames) { String name = killNamespace(edgeName); if (edgeNames.contains(name)) { stripEdgeName = false; } edgeNames.add(name); } if (hasDominance && !hasEmptyDominance) { CorpusBrowserEntry cbe = new CorpusBrowserEntry(); cbe.setName("(dominance)"); cbe.setCorpus(corpus); cbe.setExample("node & node & #1 > #2"); containerEdgeType.addBean(cbe); } // secound round, fill the actual containers Set<String> metaAnnosKey = new HashSet<>(); for (AnnisAttribute a : attributes) { // if the annotation name is already in the example skip this. if (a.getType() == AnnisAttribute.Type.meta && !metaAnnosKey.contains(killNamespace(a.getName()))) { String name = killNamespace(a.getName()); metaAnnosKey.add(name); CorpusBrowserEntry cbe = new CorpusBrowserEntry(); cbe.setName(name); cbe.setExample("node & meta::" + name + "=\"" + getFirst(a.getValueSet()) + "\""); cbe.setCorpus(corpus); containerMetaAnno.addBean(cbe); } if (a.getType() == AnnisAttribute.Type.node) { String name = stripNodeAnno ? killNamespace(a.getName()) : a.getName(); CorpusBrowserEntry cbe = new CorpusBrowserEntry(); cbe.setName(name); cbe.setExample(name + "=\"" + getFirst(a.getValueSet()) + "\""); cbe.setCorpus(corpus); containerNodeAnno.addBean(cbe); } else if (a.getType() == AnnisAttribute.Type.edge) { // edge type entry (multiple entries will be removed automatically) CorpusBrowserEntry cbeEdgeType = new CorpusBrowserEntry(); String name = stripEdgeName ? killNamespace(a.getEdgeName()) : a.getEdgeName(); if ((name == null || name.isEmpty()) && a.getSubtype() == AnnisAttribute.SubType.d) { cbeEdgeType.setName("(dominance)"); } else { cbeEdgeType.setName(name); } cbeEdgeType.setCorpus(corpus); if (a.getSubtype() == AnnisAttribute.SubType.p) { cbeEdgeType.setExample("node & node & #1 ->" + killNamespace(name) + " #2"); } else if (a.getSubtype() == AnnisAttribute.SubType.d) { cbeEdgeType.setExample("node & node & #1 >" + killNamespace(name) + " #2"); } containerEdgeType.addBean(cbeEdgeType); // the edge annotation entry if (!a.getValueSet().isEmpty()) { CorpusBrowserEntry cbeEdgeAnno = new CorpusBrowserEntry(); String edgeAnno = stripEdgeAnno ? killNamespace(a.getName()) : a.getName(); cbeEdgeAnno.setName(edgeAnno); cbeEdgeAnno.setCorpus(corpus); if (a.getSubtype() == AnnisAttribute.SubType.p) { cbeEdgeAnno.setExample("node & node & #1 ->" + killNamespace(a.getEdgeName()) + "[" + killNamespace(a.getName()) + "=\"" + getFirst(a.getValueSet()) + "\"] #2"); } else if (a.getSubtype() == AnnisAttribute.SubType.d) { cbeEdgeAnno.setExample("node & node & #1 >[" + killNamespace(a.getName()) + "=\"" + getFirst(a.getValueSet()) + "\"] #2"); } containerEdgeAnno.addBean(cbeEdgeAnno); } } } tblNodeAnno.setSortContainerPropertyId("name"); tblEdgeTypes.setSortContainerPropertyId("name"); tblEdgeAnno.setSortContainerPropertyId("name"); if (containerNodeAnno.size() == 0) { placeEmptyLabel(accordion, "Node Annotations"); } else { accordion.addTab(tblNodeAnno, "Node Annotations", null); } if (tblEdgeAnno.getContainerDataSource().size() == 0) { placeEmptyLabel(accordion, "Edge Annotations"); } else { accordion.addTab(tblEdgeAnno, "Edge Annotations", null); } if (tblEdgeTypes.getContainerDataSource().size() == 0) { placeEmptyLabel(accordion, "Edge Types"); } else { accordion.addTab(tblEdgeTypes, "Edge Types", null); } if (tblMetaAnno.getContainerDataSource().size() == 0) { placeEmptyLabel(accordion, "Meta Annotations"); } else { accordion.addTab(tblMetaAnno, "Meta Annotations", null); } }
From source file:annis.gui.MetaDataPanel.java
License:Apache License
public MetaDataPanel(String toplevelCorpusName, String documentName) { super("Metadata"); this.toplevelCorpusName = toplevelCorpusName; this.documentName = documentName; setSizeFull();/*from ww w. j av a 2s. c om*/ layout = new VerticalLayout(); setContent(layout); layout.setSizeFull(); if (documentName == null) { docs = getAllSubcorpora(toplevelCorpusName); HorizontalLayout selectionLayout = new HorizontalLayout(); Label selectLabel = new Label("Select corpus/document: "); corpusSelection = new ComboBox(); selectionLayout.addComponents(selectLabel, corpusSelection); layout.addComponent(selectionLayout); selectLabel.setSizeUndefined(); corpusSelection.setWidth(100, Unit.PERCENTAGE); corpusSelection.setHeight("-1px"); corpusSelection.addValueChangeListener(MetaDataPanel.this); selectionLayout.setWidth(100, Unit.PERCENTAGE); selectionLayout.setHeight("-1px"); selectionLayout.setSpacing(true); selectionLayout.setComponentAlignment(selectLabel, Alignment.MIDDLE_LEFT); selectionLayout.setComponentAlignment(corpusSelection, Alignment.MIDDLE_LEFT); selectionLayout.setExpandRatio(selectLabel, 0.4f); selectionLayout.setExpandRatio(corpusSelection, 0.6f); corpusSelection.addItem(toplevelCorpusName); corpusSelection.select(toplevelCorpusName); corpusSelection.setNullSelectionAllowed(false); corpusSelection.setImmediate(true); for (Annotation c : docs) { corpusSelection.addItem(c.getName()); } } else { Map<Integer, List<Annotation>> hashMData = splitListAnnotations(); List<BeanItemContainer<Annotation>> l = putInBeanContainer(hashMData); Accordion accordion = new Accordion(); accordion.setSizeFull(); // set output to none if no metadata are available if (l.isEmpty()) { addEmptyLabel(); } else { for (BeanItemContainer<Annotation> item : l) { String corpusName = item.getIdByIndex(0).getCorpusName(); String path = toplevelCorpusName.equals(corpusName) ? "corpus: " + corpusName : "document: " + corpusName; if (item.getItemIds().isEmpty()) { accordion.addTab(new Label("none"), path); } else { accordion.addTab(setupTable(item), path); } } layout.addComponent(accordion); } } }
From source file:com.cavisson.gui.dashboard.components.controls.Accordions.java
License:Apache License
Accordion getAccordion(String caption) { TestIcon testIcon = new TestIcon(0); Accordion ac = new Accordion(); ac.setCaption(caption);/*from www .j a va 2 s .c o m*/ ac.addTab(new VerticalLayout() { { setMargin(true); addComponent(new Label( "Fabio vel iudice vincam, sunt in culpa qui officia. Ut enim ad minim veniam, quis nostrud exercitation.")); } }, "First Caption", testIcon.get()); ac.addTab(new VerticalLayout() { { setMargin(true); addComponent(new Label("Gallia est omnis divisa in partes tres, quarum.")); } }, "Second Caption", testIcon.get()); ac.addTab(new VerticalLayout() { { setMargin(true); addComponent(new Label( "Nihil hic munitissimus habendi senatus locus, nihil horum? Sed haec quis possit intrepidus aestimare tellus.")); } }, "Third Caption", testIcon.get()); ac.addTab(new VerticalLayout() { { setMargin(true); addComponent(new Label( "Inmensae subtilitatis, obscuris et malesuada fames. Quisque ut dolor gravida, placerat libero vel, euismod.")); } }, "Custom Caption Style", testIcon.get()).setStyleName("color1"); return ac; }
From source file:com.freebox.engeneering.application.web.layout.RightSideBarController.java
License:Apache License
/** * Initializes view when system enters 'initView' action state. * * @param event - state event./* ww w. j a v a 2 s . c o m*/ */ @Override public void initView(StateEvent event) { final Accordion content = new Accordion(); content.setSizeFull(); setView(content); }
From source file:com.liferay.mail.vaadin.Folders.java
License:Open Source License
/** * The constructor should first build the main layout, set the composition * root and then do any custom initialization. The constructor will not be * automatically regenerated by the visual editor. *//*from ww w. j a v a 2 s . co m*/ public Folders(MessageList messageList) { this.messageList = messageList; mainLayout = new VerticalLayout(); mainLayout.setSizeFull(); mainPanel = new Accordion(); mainPanel.setSizeFull(); mainPanel.setStyleName("borderless"); accountLayout = new VerticalLayout(); // accountLayout.setCaption(Lang.get("accounts")); mainLayout.addComponent(createComposeButton()); mainLayout.addComponent(mainPanel); mainLayout.setExpandRatio(mainPanel, 1); mainPanel.addComponent(accountLayout); tree = new FolderTree(this, messageList); accountLayout.addComponent(tree); // top-level component properties setSizeFull(); setCompositionRoot(mainLayout); Controller.get().addListener(this); }
From source file:com.lizardtech.expresszip.vaadin.ExportOptionsViewComponent.java
License:Apache License
public ExportOptionsViewComponent(ExportProps exportProps) { this.exportProps = exportProps; listeners = new ArrayList<ExportOptionsViewListener>(); txtJobName = new TextField(JOB_NAME); txtEmail = new TextField(EMAIL_ADDRESS); txtUserNotation = new TextField(JOB_USER_NOTATION); numTilesLabel = new Label(); exportSizeEstimate = new Label(); outputFormatComboBox = new ComboBox(OUTPUT_FORMAT, OUTPUT_FORMATS); outputFormatComboBox.setTextInputAllowed(false); outputFormatComboBox.addListener(griddingValuesChangeListener); setSizeFull();//w ww .j a v a 2s .co m /** * Setup output resolution */ exportSizeComboBox = new ComboBox(null, exportSizes); exportSizeComboBox.setNullSelectionAllowed(false); exportSizeComboBox.setNewItemsAllowed(false); exportSizeComboBox.setTextInputAllowed(false); exportSizeComboBox.setImmediate(true); exportSizeComboBox.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { Object choice = event.getProperty().getValue(); String value = ""; if (SMALL.equals(choice)) { gridCheckbox.setValue(Boolean.FALSE); gridCheckbox.setEnabled(false); value = "512"; } else if (MEDIUM.equals(choice)) { gridCheckbox.setValue(Boolean.FALSE); gridCheckbox.setEnabled(false); value = "1280"; } else if (LARGE.equals(choice)) { gridCheckbox.setValue(Boolean.FALSE); gridCheckbox.setEnabled(false); value = "5000"; } boolean custom = CUSTOM.equals(choice); if (!custom) { if (NATIVE.equals(choice)) { txtGroundResolution.setValue(Double.toString(maximumResolution)); } else { if (getExportProps().getAspectRatio() > 1.0d) { txtDimHeight.setValue(value); } else txtDimWidth.setValue(value); } } txtDimWidth.setEnabled(custom); txtDimHeight.setEnabled(custom); txtGroundResolution.setEnabled(custom); } }); // Add Output Resolution to view HorizontalLayout dimensionsLayout = new HorizontalLayout(); dimensionsLayout.addComponent(txtDimWidth); dimensionsLayout.addComponent(txtDimHeight); dimensionsLayout.setSpacing(true); dimensionsLayout.setWidth("100%"); // Format dimensions layout txtDimHeight.setMaxLength(10); txtDimHeight.setWidth("100%"); txtDimHeight.setImmediate(true); txtDimHeight.addListener(heightValChangeListener); txtDimHeight.setRequired(true); txtDimHeight.addValidator(new WidthHeightValidator()); txtDimWidth.setMaxLength(10); txtDimWidth.setWidth("100%"); txtDimWidth.setImmediate(true); txtDimWidth.addListener(widthValChangeListener); txtDimWidth.setRequired(true); txtDimWidth.addValidator(new WidthHeightValidator()); // Format Ground Resolution layout txtGroundResolution.setValue("0"); txtGroundResolution.setImmediate(true); txtGroundResolution.addListener(groundResValChangeListener); txtGroundResolution.setRequired(true); txtGroundResolution.addValidator(new GroundResolutionValidator()); vrtOutputResolution = new VerticalLayout(); vrtOutputResolution.setSpacing(true); vrtOutputResolution.addComponent(exportSizeComboBox); vrtOutputResolution.addComponent(dimensionsLayout); txtGroundResolution.setWidth("75%"); vrtOutputResolution.addComponent(txtGroundResolution); vrtOutputResolution.setComponentAlignment(txtGroundResolution, Alignment.BOTTOM_CENTER); /** * Setup Gridding options */ // Add Gridding option to view griddingLayout = new VerticalLayout(); griddingLayout.setSpacing(true); // Format GridCheckbox layout griddingLayout.addComponent(gridCheckbox); gridCheckbox.setImmediate(true); gridCheckbox.setValue(false); gridCheckbox.addListener(griddingModeChangeListener); xPixelsTextBox.setWidth("100%"); xPixelsTextBox.setImmediate(true); xPixelsTextBox.addValidator(new TileWidthValidator()); xPixelsTextBox.addListener(griddingValuesChangeListener); yPixelsTextBox.setWidth("100%"); yPixelsTextBox.setImmediate(true); yPixelsTextBox.addValidator(new TileHeightValidator()); yPixelsTextBox.addListener(griddingValuesChangeListener); xDistanceTextBox.setWidth("100%"); xDistanceTextBox.setImmediate(true); xDistanceTextBox.addValidator(new TileGeoXValidator()); xDistanceTextBox.addListener(griddingValuesChangeListener); yDistanceTextBox.setWidth("100%"); yDistanceTextBox.setImmediate(true); yDistanceTextBox.addValidator(new TileGeoYValidator()); yDistanceTextBox.addListener(griddingValuesChangeListener); // Format gridding options xTilesTextBox.setWidth("100%"); xTilesTextBox.setImmediate(true); xTilesTextBox.addValidator(new TileXDivisorValidator()); xTilesTextBox.addListener(griddingValuesChangeListener); yTilesTextBox.setWidth("100%"); yTilesTextBox.setImmediate(true); yTilesTextBox.addValidator(new TileYDivisorValidator()); yTilesTextBox.addListener(griddingValuesChangeListener); optGridOpt.setValue(GRID_TILE_DIMENSIONS); optGridOpt.setImmediate(true); optGridOpt.addListener(griddingModeChangeListener); HorizontalLayout hznGridOptions = new HorizontalLayout(); griddingLayout.addComponent(hznGridOptions); hznGridOptions.setWidth("100%"); hznGridOptions.setSpacing(true); hznGridOptions.addComponent(optGridOpt); VerticalLayout vrtGridComboFields = new VerticalLayout(); hznGridOptions.addComponent(vrtGridComboFields); vrtGridComboFields.setWidth("100%"); hznGridOptions.setExpandRatio(vrtGridComboFields, 1.0f); HorizontalLayout hznTileDim = new HorizontalLayout(); hznTileDim.setWidth("100%"); vrtGridComboFields.addComponent(hznTileDim); hznTileDim.addComponent(xPixelsTextBox); hznTileDim.addComponent(yPixelsTextBox); HorizontalLayout hznDistanceDim = new HorizontalLayout(); hznDistanceDim.setWidth("100%"); vrtGridComboFields.addComponent(hznDistanceDim); hznDistanceDim.addComponent(xDistanceTextBox); hznDistanceDim.addComponent(yDistanceTextBox); HorizontalLayout hznDivideGrid = new HorizontalLayout(); hznDivideGrid.setWidth("100%"); vrtGridComboFields.addComponent(hznDivideGrid); hznDivideGrid.addComponent(xTilesTextBox); hznDivideGrid.addComponent(yTilesTextBox); hznDivideGrid.setSpacing(true); hznTileDim.setSpacing(true); hznDistanceDim.setSpacing(true); /** * Format options panel */ // Add Format options to view formatOptionsLayout = new VerticalLayout(); formatOptionsLayout.setWidth("100%"); formatOptionsLayout.setSpacing(true); formatOptionsLayout.setMargin(true); // Format outputformat formatOptionsLayout.addComponent(outputFormatComboBox); outputFormatComboBox.setNullSelectionAllowed(false); formatOptionsLayout.addComponent(packageComboBox); packageComboBox.addItem(ExportProps.OutputPackageFormat.TAR); packageComboBox.addItem(ExportProps.OutputPackageFormat.ZIP); packageComboBox.setNullSelectionAllowed(false); packageComboBox.setTextInputAllowed(false); packageComboBox.setValue(ExportProps.OutputPackageFormat.ZIP); /** * Job Details */ // Set Jobname panel jobDetailsLayout = new VerticalLayout(); jobDetailsLayout.setSpacing(true); jobDetailsLayout.setMargin(true); jobDetailsLayout.addComponent(txtJobName); txtJobName.setRequired(true); txtJobName.setRequiredError("Please enter a job name."); txtJobName.setWidth("100%"); txtJobName.setImmediate(true); String jobname_regexp = "^[ A-Za-z0-9._-]{1,128}$"; txtJobName.addValidator(new RegexpValidator(jobname_regexp, "Job names should be alpha-numeric, less than 128 characters and may include spaces, dashes and underscores")); txtJobName.addValidator(new JobNameUniqueValidator( "A job by that name already exists in your configured export directory")); txtJobName.addListener(resolutionValuesChangeListener); jobDetailsLayout.addComponent(txtUserNotation); txtUserNotation.setWidth("100%"); txtUserNotation.setImmediate(true); String usernotation_regexp = "^[ A-Za-z0-9_-]{0,32}$"; txtUserNotation.addValidator(new RegexpValidator(usernotation_regexp, "User names should be alpha-numeric, less than 32 characters and may include spaces, dashes and underscores")); txtUserNotation.addListener(resolutionValuesChangeListener); // Format Email boolean enableEmail = new BackgroundExecutor.Factory().getBackgroundExecutor().getMailServices() .isValidEmailConfig(); txtEmail.setEnabled(enableEmail); if (enableEmail) { jobDetailsLayout.addComponent(txtEmail); txtEmail.setWidth("100%"); txtEmail.setInputPrompt("enter your email address"); txtEmail.setImmediate(true); txtEmail.addValidator(new EmailValidator("Invalid format for email address.")); txtEmail.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { updateSubmitEnabledState(); } }); } VerticalLayout exportSummary = new VerticalLayout(); exportSummary.addComponent(numTilesLabel); exportSummary.addComponent(exportSizeEstimate); jobDetailsLayout.addComponent(new Panel(("Export summary"), exportSummary)); // Set submit and back buttons // Add listeners to all fields backButton = new ExpressZipButton("Back", Style.STEP); backButton.addListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { ((ExpressZipWindow) getApplication().getMainWindow()).regressToPrev(); } }); submitButton = new ExpressZipButton("Submit", Style.STEP); submitButton.addListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { try { txtJobName.validate(); } catch (InvalidValueException e) { txtJobName.requestRepaint(); updateSubmitEnabledState(); return; } for (ExportOptionsViewListener listener : listeners) { listener.submitJobEvent(getExportProps()); } } }); accordian = new Accordion(); accordian.addStyleName("expresszip"); accordian.setImmediate(true); accordian.addTab(jobDetailsLayout, JOB_DETAILS); accordian.addTab(formatOptionsLayout, FORMAT_OPTIONS); accordian.setSizeFull(); outputDetails = new VerticalLayout(); outputDetails.setMargin(true); outputDetails.setSpacing(true); outputDetails.addComponent(new Panel(DIMENSIONS, vrtOutputResolution)); outputDetails.addComponent(new Panel(TILING, griddingLayout)); accordian.addTab(outputDetails, EXPORT_CONFIGURATION); HorizontalLayout backSubmitLayout = new HorizontalLayout(); backSubmitLayout.setWidth("100%"); backSubmitLayout.addComponent(backButton); backSubmitLayout.addComponent(submitButton); backSubmitLayout.setComponentAlignment(backButton, Alignment.BOTTOM_LEFT); backSubmitLayout.setComponentAlignment(submitButton, Alignment.BOTTOM_RIGHT); VerticalLayout navLayout = new VerticalLayout(); navLayout.addComponent(backSubmitLayout); navLayout.setSpacing(true); ThemeResource banner = new ThemeResource("img/ProgressBar3.png"); navLayout.addComponent(new Embedded(null, banner)); // add scrollbars around formLayout VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSizeFull(); layout.setSpacing(true); Label step = new Label("Step 3: Configure Export Options"); step.addStyleName("step"); layout.addComponent(step); layout.addComponent(accordian); layout.setExpandRatio(accordian, 1.0f); layout.addComponent(navLayout); layout.setComponentAlignment(navLayout, Alignment.BOTTOM_CENTER); setCompositionRoot(layout); outputFormatComboBox.select(OUTPUT_FORMATS.get(0)); forceGriddingCheck(); updateGriddingEnabledState(); }
From source file:com.m4gik.views.MainView.java
/** * @param left/*from w w w . j a va 2 s . com*/ */ private void addAccordion(Panel left) { Accordion accordion = new Accordion(); accordion.setSizeFull(); accordion.setHeight("350px"); left.setContent(accordion); accordion.addTab(buildTree(), "Category"); accordion.addTab(new Label(""), "Discover"); accordion.addTab(new Label(""), "Quick Search"); }
From source file:com.oodrive.nuage.webui.component.DeviceItemComponent.java
License:Apache License
DeviceItemComponent(final DeviceModel model) { super(); this.model = model; this.attr = new Accordion(); }
From source file:com.oodrive.nuage.webui.component.SnapshotItemComponent.java
License:Apache License
SnapshotItemComponent(final SnapshotModel model) { super(); this.model = model; this.attr = new Accordion(); }
From source file:com.saax.gestorweb.view.ChatView.java
/** * Chat Pop-Up/*from ww w . j a v a 2 s.c om*/ * */ public ChatView() { super(); setCaption(messages.getString("ChatView.titulo")); setModal(true); setWidth("80%"); setHeight("80%"); setResizable(false); VerticalLayout container = new VerticalLayout(); container.setMargin(true); container.setWidth("100%"); container.setHeight("100%"); setContent(container); userLogged = (Usuario) GestorSession.getAttribute(SessionAttributesEnum.USUARIO_LOGADO); HorizontalLayout hlayout = new HorizontalLayout(); // Have a horizontal split panel as its content hsplit = new HorizontalSplitPanel(); hsplit.setSizeFull(); // Put a component in the left panel hsplit.setFirstComponent(containerUserTable()); hsplit.getFirstComponent().setWidth("100%"); // A static variable so that everybody gets the same instance. //accordion container.addComponent(hsplit); accordion = new Accordion(); accordion.setWidth("100%"); accordion.addTab(buildAttachTable(), "Anexos", null); container.addComponent(accordion); //container.addComponent(buildAttachTable()); }