本文整理汇总了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;
}
示例2: clearMenuSelection
import com.vaadin.ui.Accordion; //导入依赖的package包/类
private void clearMenuSelection() {
for (Component next : this.menu) {
if (next instanceof Accordion) {
clearAccordionSubMenu((Accordion) next);
}
}
}
示例3: clearAccordionSubMenu
import com.vaadin.ui.Accordion; //导入依赖的package包/类
private void clearAccordionSubMenu(Accordion subMenu) {
for (Component next : subMenu) {
if (next instanceof CssLayout) {
clearSubmenuSelection((CssLayout) next);
}
}
}
示例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());
}
示例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;
}
示例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();
}
示例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());
}
示例8: AccordionBuilder
import com.vaadin.ui.Accordion; //导入依赖的package包/类
public AccordionBuilder() {
super(new Accordion());
}
示例9: build
import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected Accordion build(Accordion instance) {
return instance;
}
示例10: builder
import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected TabsBuilder<Accordion> builder() {
return this;
}
示例11: createAccordian
import com.vaadin.ui.Accordion; //导入依赖的package包/类
private void createAccordian() {
accordion = new Accordion();
accordion.setSizeFull();
}
示例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);
}
}
示例13: createCompositionRoot
import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected Accordion createCompositionRoot() {
Accordion accordion = new Accordion();
accordion.setSizeFull();
return accordion;
}
示例14: createDefaultSectionComponentFactory
import com.vaadin.ui.Accordion; //导入依赖的package包/类
@Override
protected SectionComponentFactory<Accordion> createDefaultSectionComponentFactory() {
return new DefaultSectionComponentFactory();
}
示例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;
}