本文整理匯總了Java中com.vaadin.ui.VerticalLayout.addStyleName方法的典型用法代碼示例。如果您正苦於以下問題:Java VerticalLayout.addStyleName方法的具體用法?Java VerticalLayout.addStyleName怎麽用?Java VerticalLayout.addStyleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.ui.VerticalLayout
的用法示例。
在下文中一共展示了VerticalLayout.addStyleName方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createSubView
import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
private void createSubView(String title, ToolbarButtons[] buttons) {
setSizeFull();
final VerticalLayout layout = new VerticalLayout();
layout.addStyleName(StyleConstants.BASE_CONTAINER);
layout.setSizeFull();
final VerticalLayout panel = new VerticalLayout();
panel.addStyleName("panel");
panel.setSizeFull();
layout.addComponent(createHeader(title));
layout.addComponent(panel);
if (buttons != null) {
panel.addComponent(createToolbar(buttons));
}
panel.addComponent(createTable());
panel.setExpandRatio(this.table, 1L);
layout.setExpandRatio(panel, 1L);
addComponent(layout);
}
示例2: initLayout
import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
/**
* Initialise le layout principal
*/
private void initLayout() {
layout.setSizeFull();
setContent(layout);
menuLayout.setPrimaryStyleName(ValoTheme.MENU_ROOT);
layoutWithSheet.setPrimaryStyleName(StyleConstants.VALO_CONTENT);
layoutWithSheet.addStyleName(StyleConstants.SCROLLABLE);
layoutWithSheet.setSizeFull();
VerticalLayout vlAll = new VerticalLayout();
vlAll.addStyleName(StyleConstants.SCROLLABLE);
vlAll.setSizeFull();
subBarMenu.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
subBarMenu.setVisible(false);
vlAll.addComponent(subBarMenu);
contentLayout.addStyleName(StyleConstants.SCROLLABLE);
contentLayout.setSizeFull();
vlAll.addComponent(contentLayout);
vlAll.setExpandRatio(contentLayout, 1);
layoutWithSheet.addComponent(vlAll);
menuButtonLayout.addStyleName(StyleConstants.VALO_MY_MENU_MAX_WIDTH);
layout.setExpandRatio(layoutWithSheet, 1);
Responsive.makeResponsive(this);
addStyleName(ValoTheme.UI_WITH_MENU);
}
示例3: AccordionItemMenu
import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
/**
* Constructeur
*
* @param title
* @param parent
*/
public AccordionItemMenu(String title, AccordionMenu parent,
Boolean isExpandable) {
super();
setWidth(100, Unit.PERCENTAGE);
/*
* Les labels n'etant pas cliquable, on passe par un layout
* intermediaire
*/
VerticalLayout layoutClickable = new VerticalLayout();
layoutClickable.setWidth(100, Unit.PERCENTAGE);
/* Label */
Label label = new Label(title);
label.setPrimaryStyleName(ValoTheme.MENU_SUBTITLE);
label.setSizeUndefined();
layoutClickable.addComponent(label);
layoutClickable.addStyleName(StyleConstants.VALO_MENUACCORDEON);
addComponent(layoutClickable);
if (isExpandable) {
layoutClickable.addStyleName(StyleConstants.CLICKABLE);
layoutClickable.addLayoutClickListener(e -> {
parent.changeItem((String) getData());
});
}
vlButton = new VerticalLayout();
vlButton.addStyleName(StyleConstants.VALO_MENUACCORDEON);
vlButton.setWidth(100, Unit.PERCENTAGE);
addComponent(vlButton);
}
示例4: buildSidebar
import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
private VerticalLayout buildSidebar() {
VerticalLayout sideBar = new VerticalLayout();
sideBar.addStyleName("sidebar");
sideBar.addComponent(buildMainMenu());
sideBar.setExpandRatio(this.menu, 1);
sideBar.setWidth(null);
sideBar.setHeight("100%");
return sideBar;
}
示例5: JobsArchiverPanel
import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
public JobsArchiverPanel(ArchiveLayout parentLayout, ArchiveServiceApi archiveService,
GetJobsArchiveServiceApi getJobsArchiveService, UpdateJobsArchiveServiceApi updateJobsArchiveService) {
super();
this.parentLayout = parentLayout;
this.archiveService = archiveService;
this.getJobsArchiveService = getJobsArchiveService;
this.updateJobsArchiveService = updateJobsArchiveService;
try {
this.dto = populateJobsArchiveDto().getDto();
// create frequency layout component
VerticalLayout freqLayout = new VerticalLayout();
freqLayout.addComponent(createLastTriggerLabel());
freqLayout.addComponent(createAutoSchedCheckBox());
freqLayout.addComponent(createFrequencyOptionGroup());
freqLayout.addStyleName(StyleConstants.COMPONENT_SPACING);
freqLayout.setSpacing(true);
// create triggering panel component
Panel triggerPanel = new Panel();
triggerPanel.setWidth("50%");
triggerPanel.setContent(freqLayout);
// create threshold layout component
HorizontalLayout thresLayout = new HorizontalLayout();
thresLayout.addComponent(this.thresholdLabel);
thresLayout.addComponent(createArchiveThreshold());
thresLayout.addComponent(createThresholdOptionGroup());
thresLayout.addStyleName(StyleConstants.COMPONENT_SPACING);
thresLayout.setSpacing(true);
// add all components to container
this.container = new VerticalLayout();
this.container.addStyleName(StyleConstants.COMPONENT_SPACING);
this.container.addComponent(this.triggerLabel);
this.container.addComponent(triggerPanel);
this.container.addComponent(thresLayout);
// add buttons component to container
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.addComponent(createOnDemandScheduleButton());
buttonLayout.addComponent(createUpdateScheduleButton());
buttonLayout.setSpacing(true);
this.container.addComponent(buttonLayout);
// add container to root panel
this.container.setSpacing(true);
this.panel.setWidth("100%");
this.panel.setContent(this.container);
setCompositionRoot(this.panel);
} catch (Exception ex) {
log.error("Failed to init archiver panel", ex);
}
}
示例6: NetworkLayout
import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
public NetworkLayout(GetNetworkSettingsServiceApi getNetworkSettingsService,
CheckNetworkSettingsServiceApi checkNetworkSettingsService,
SetNetworkSettingsServiceApi setNetworkSettingsService,
GetNATSettingsServiceApi getNATSettingsService,
SetNATSettingsServiceApi setNATSettingsService,
ValidationApi validator, ServerApi server) {
super();
this.getNetworkSettingsService = getNetworkSettingsService;
this.checkNetworkSettingsService = checkNetworkSettingsService;
this.setNetworkSettingsService = setNetworkSettingsService;
this.getNATSettingsService = getNATSettingsService;
this.setNATSettingsService = setNATSettingsService;
this.server = server;
try {
// creating layout to hold option group and edit button
HorizontalLayout optionLayout = new HorizontalLayout();
optionLayout.addComponent(createIPSettingsEditButton());
optionLayout.addComponent(createOptionGroup());
optionLayout.addStyleName(StyleConstants.COMPONENT_SPACING_TOP_BOTTOM);
Panel networkPanel = new Panel("IP Details");
VerticalLayout networkLayout = new VerticalLayout();
networkLayout.addComponent(optionLayout);
this.networkTable = createNetworkTable();
networkLayout.addComponent(this.networkTable);
networkPanel.setContent(networkLayout);
Panel natPanel = new Panel("NAT Details");
VerticalLayout natLayout = new VerticalLayout();
HorizontalLayout editNatLayout = new HorizontalLayout();
editNatLayout.addStyleName(StyleConstants.COMPONENT_SPACING_TOP_BOTTOM);
editNatLayout.addComponent(createNATEditButton());
natLayout.addComponent(editNatLayout);
this.natTable = createNATTable();
natLayout.addComponent(this.natTable);
natLayout.addStyleName(StyleConstants.COMPONENT_SPACING_TOP_BOTTOM);
natPanel.setContent(natLayout);
// populating Network Information in the Table
populateNetworkTable();
// populating NAT information in the Table
populateNATTable();
addComponent(networkPanel);
addComponent(natPanel);
} catch (Exception ex) {
log.error("Failed to get network settings", ex);
}
}