當前位置: 首頁>>代碼示例>>Java>>正文


Java VerticalLayout.addStyleName方法代碼示例

本文整理匯總了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);
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:23,代碼來源:CRUDBaseSubView.java

示例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);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:35,代碼來源:MainUI.java

示例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);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:37,代碼來源:AccordionItemMenu.java

示例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;
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:10,代碼來源:MainUI.java

示例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);
    }
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:57,代碼來源:JobsArchiverPanel.java

示例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);
    }
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:54,代碼來源:NetworkLayout.java


注:本文中的com.vaadin.ui.VerticalLayout.addStyleName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。