当前位置: 首页>>代码示例>>Java>>正文


Java Accordion类代码示例

本文整理汇总了Java中com.vaadin.ui.Accordion的典型用法代码示例。如果您正苦于以下问题:Java Accordion类的具体用法?Java Accordion怎么用?Java Accordion使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Accordion类属于com.vaadin.ui包,在下文中一共展示了Accordion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAddFilesLayout

import com.vaadin.ui.Accordion; //导入依赖的package包/类
private VerticalLayout getAddFilesLayout() {
	VerticalLayout addFilesLayout = new VerticalLayout();
	Label label = new Label(SUB_TITLE);
	label.addStyleName(ValoTheme.LABEL_H3);
	label.addStyleName("align-left");
	addFilesLayout.addComponent(label);
	addFilesLayout.setComponentAlignment(label, Alignment.TOP_CENTER);

	Accordion accordion = new Accordion();
	accordion.setSizeFull();

	for (Options option : options) {

		VerticalLayout optionLayout = new VerticalLayout();
		if (option == Options.Path) {
			optionLayout = getPathLayout();
		}
		if (option == Options.Copy_Paste) {
			optionLayout = getCopyPasteLayout();
		}
		if (option == Options.Edit) {
			optionLayout = getEditLayer();
		}

		optionLayout.setSizeFull();

		accordion.addTab(optionLayout, option.getText());
	}

	addFilesLayout.addComponent(accordion);
	addFilesLayout.setComponentAlignment(accordion, Alignment.MIDDLE_CENTER);

	return addFilesLayout;
}
 
开发者ID:RosesTheN00b,项目名称:MetricsToGo,代码行数:35,代码来源:UIStartPage.java

示例2: clearMenuSelection

import com.vaadin.ui.Accordion; //导入依赖的package包/类
private void clearMenuSelection() {
    for (Component next : this.menu) {
        if (next instanceof Accordion) {
            clearAccordionSubMenu((Accordion) next);
        }
    }
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:8,代码来源:MainUI.java

示例3: clearAccordionSubMenu

import com.vaadin.ui.Accordion; //导入依赖的package包/类
private void clearAccordionSubMenu(Accordion subMenu) {
    for (Component next : subMenu) {
        if (next instanceof CssLayout) {
            clearSubmenuSelection((CssLayout) next);
        }
    }
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:8,代码来源:MainUI.java

示例4: addSystemInfo

import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
public void addSystemInfo(Accordion systemInfoPanel) {
    VerticalLayout layout = new VerticalLayout();
    textArea = new TextArea("System Info");
    textArea.addStyleName(UIConstants.FIXED_FONT);
    textArea.setValue(getInfo());
    textArea.setRows(20);
    textArea.setHeight("400px");
    textArea.setWidth("100%");
    layout.addComponents(textArea);
    systemInfoPanel.addTab(layout, getCaption());
}
 
开发者ID:apache,项目名称:incubator-tamaya-sandbox,代码行数:13,代码来源:AbstractTextInfoProvider.java

示例5: createStatAccordion

import com.vaadin.ui.Accordion; //导入依赖的package包/类
private Component createStatAccordion() {
  Accordion statAccordion = new Accordion();
  statAccordion.setWidth(75, Unit.PERCENTAGE);

  Collection<TimeSeries> minuteGroupedData =
      groupDataById(statisticDeviceDataService.getStats(DeviceStateEntity.StateInterval.MINUTE))
          .values();
  TimeSeriesChart minuteChart = new TimeSeriesChart(minuteGroupedData);
  charts.add(minuteChart);
  statAccordion.addTab(minuteChart, "By minute");

  Collection<TimeSeries> hourGroupedData =
      groupDataById(statisticDeviceDataService.getStats(DeviceStateEntity.StateInterval.HOUR))
          .values();
  TimeSeriesChart hourChart = new TimeSeriesChart(hourGroupedData);
  charts.add(hourChart);
  statAccordion.addTab(hourChart, "By hour");

  Collection<TimeSeries> dayGroupedData =
      groupDataById(statisticDeviceDataService.getStats(DeviceStateEntity.StateInterval.HOUR))
          .values();
  TimeSeriesChart dayChart = new TimeSeriesChart(dayGroupedData);
  charts.add(dayChart);
  statAccordion.addTab(dayChart, "By day");

  return statAccordion;
}
 
开发者ID:daergoth,项目名称:HomeWire-Server,代码行数:28,代码来源:StatisticView.java

示例6: VaadinInvoiceGui

import com.vaadin.ui.Accordion; //导入依赖的package包/类
public VaadinInvoiceGui(VaadinInvoiceController controller) {
	super();
	this.controller = controller;
	invoice = new Invoice();
	invoiceBean = new BeanItem<Invoice>(invoice);
	createButton = new Button("Generate PDF");
	titlePanel = new TitlePanel(createButton, invoiceBean, controller);
	infoPanel = new InfoPanel(invoiceBean);
	descriptionPanel = new DescriptionPanel(invoiceBean);
	invoiceRowPanel = new InvoiceRowPanel(invoiceBean);
	uploadPanel = new UploadPanel(invoiceBean, controller.getSessionId(), controller);
	descriptionAndUploadAccordion = new Accordion();
	setActionListeners();
	setLayout();
}
 
开发者ID:nyholmniklas,项目名称:vaadinInvoiceGenerator,代码行数:16,代码来源:VaadinInvoiceGui.java

示例7: createSection

import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
public void createSection(Accordion compositionRoot, SideBarSectionDescriptor descriptor, Collection<SideBarItemDescriptor> itemDescriptors) {
    final Panel panel = new Panel();
    panel.addStyleName(SIDE_BAR_SECTION_STYLE);
    panel.setSizeFull();
    final VerticalLayout layout = new VerticalLayout();
    panel.setContent(layout);
    for (SideBarItemDescriptor item : itemDescriptors) {
        layout.addComponent(itemComponentFactory.createItemComponent(item));
    }
    compositionRoot.addTab(panel, descriptor.getCaption());
}
 
开发者ID:peholmst,项目名称:vaadin4spring,代码行数:13,代码来源:AccordionSideBar.java

示例8: AccordionBuilder

import com.vaadin.ui.Accordion; //导入依赖的package包/类
public AccordionBuilder() {
	super(new Accordion());
}
 
开发者ID:holon-platform,项目名称:holon-vaadin,代码行数:4,代码来源:AccordionBuilder.java

示例9: build

import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected Accordion build(Accordion instance) {
	return instance;
}
 
开发者ID:holon-platform,项目名称:holon-vaadin,代码行数:5,代码来源:AccordionBuilder.java

示例10: builder

import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected TabsBuilder<Accordion> builder() {
	return this;
}
 
开发者ID:holon-platform,项目名称:holon-vaadin,代码行数:5,代码来源:AccordionBuilder.java

示例11: createAccordian

import com.vaadin.ui.Accordion; //导入依赖的package包/类
private void createAccordian() {
    accordion = new Accordion();
    accordion.setSizeFull();
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:5,代码来源:AbstractConfirmationWindowLayout.java

示例12: init

import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected void init(VaadinRequest request) {

	try {

		VerticalLayout mainLayout = new VerticalLayout();
		mainLayout.setMargin(true);
		mainLayout.setSpacing(true);
		Accordion accordion = new Accordion();

		weatherInfo = new Weather();
		final int[] times = new int[] { 10, 12, 14, 16 };
		final String[] entries = new String[] {
				"<strong>10°</strong> sunny", "<strong>12°</strong> windy",
				"<strong>14°</strong> cold", "<strong>20°</strong> superb" };
		weatherInfo.setDaten(times, entries);
		weatherInfo.addClickListener(new WeatherClickListener() {

			private static final long serialVersionUID = 1L;

			@Override
			public void click(int time, String entry) {
				showPopup(entry);
			}
		});
		weatherInfo.setButtonCaption("E-Mail (from angular)");
		accordion.addTab(weatherInfo, "Weather-Demo");
		mainLayout.addComponent(accordion);

		javaSend = new Button();
		javaSend.setCaption("E-Mail (from Java)");
		javaSend.addClickListener(new ClickListener() {

			private static final long serialVersionUID = 1L;

			@Override
			public void buttonClick(ClickEvent event) {
				int index = weatherInfo.getSliderPos();
				System.out.println("Button from w/in Java - value: "
						+ index);
				showPopup(entries[index]);
			}
		});
		mainLayout.addComponent(javaSend);

		setContent(mainLayout);
	} catch (Exception e) {
		throw new RuntimeException("some stupid error occured!", e);
	}
}
 
开发者ID:akquinet,项目名称:vaangular,代码行数:51,代码来源:VaangularUI.java

示例13: createCompositionRoot

import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected Accordion createCompositionRoot() {
    Accordion accordion = new Accordion();
    accordion.setSizeFull();
    return accordion;
}
 
开发者ID:peholmst,项目名称:vaadin4spring,代码行数:7,代码来源:AccordionSideBar.java

示例14: createDefaultSectionComponentFactory

import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected SectionComponentFactory<Accordion> createDefaultSectionComponentFactory() {
    return new DefaultSectionComponentFactory();
}
 
开发者ID:peholmst,项目名称:vaadin4spring,代码行数:5,代码来源:AccordionSideBar.java

示例15: createWestLayout

import com.vaadin.ui.Accordion; //导入依赖的package包/类
/**
    * Creates the west area layout including the
    * accordion and tree views.
    * 
    * @return
    */
   @SuppressWarnings("serial")
private Layout createWestLayout() {
       m_tree = createTree();
       
       
       final TextField filterField = new TextField("Filter");
       filterField.setTextChangeTimeout(200);
       
       
       final Button filterBtn = new Button("Filter");
       filterBtn.addListener(new ClickListener() {

           @Override
           public void buttonClick(ClickEvent event) {
           	GCFilterableContainer container = m_tree.getContainerDataSource();
               container.removeAllContainerFilters();
               
               String filterString = (String) filterField.getValue();
               if(!filterString.equals("") && filterBtn.getCaption().toLowerCase().equals("filter")) {
                   container.addContainerFilter(LABEL_PROPERTY, (String) filterField.getValue(), true, false);
                   filterBtn.setCaption("Clear");
               } else {
                   filterField.setValue("");
                   filterBtn.setCaption("Filter");
               }
               
           }
       });
       
       
       HorizontalLayout filterArea = new HorizontalLayout();
       filterArea.addComponent(filterField);
       filterArea.addComponent(filterBtn);
       filterArea.setComponentAlignment(filterBtn, Alignment.BOTTOM_CENTER);
       
       m_treeAccordion = new Accordion();
       m_treeAccordion.addTab(m_tree, m_tree.getTitle());
       m_treeAccordion.setWidth("100%");
       m_treeAccordion.setHeight("100%");
       
       AbsoluteLayout absLayout = new AbsoluteLayout();
       absLayout.setWidth("100%");
       absLayout.setHeight("100%");
       absLayout.addComponent(filterArea, "top: 25px; left: 15px;");
       absLayout.addComponent(m_treeAccordion, "top: 75px; left: 15px; right: 15px; bottom:25px;"); 
       
       return absLayout;
   }
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:55,代码来源:TopologyWidgetTestApplication.java


注:本文中的com.vaadin.ui.Accordion类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。