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


Java Panel.addStyleName方法代码示例

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


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

示例1: MovieDetailsWindow

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private MovieDetailsWindow(final Movie movie, final Date startTime,
        final Date endTime) {
    addStyleName("moviedetailswindow");
    Responsive.makeResponsive(this);

    setCaption(movie.getTitle());
    center();
    setCloseShortcut(KeyCode.ESCAPE, null);
    setResizable(false);
    setClosable(false);
    setHeight(90.0f, Unit.PERCENTAGE);

    VerticalLayout content = new VerticalLayout();
    content.setSizeFull();
    setContent(content);

    Panel detailsWrapper = new Panel(buildMovieDetails(movie, startTime,
            endTime));
    detailsWrapper.setSizeFull();
    detailsWrapper.addStyleName(ValoTheme.PANEL_BORDERLESS);
    detailsWrapper.addStyleName("scroll-divider");
    content.addComponent(detailsWrapper);
    content.setExpandRatio(detailsWrapper, 1f);

    content.addComponent(buildFooter());
}
 
开发者ID:mcollovati,项目名称:vaadin-vertx-samples,代码行数:27,代码来源:MovieDetailsWindow.java

示例2: initInformationPanel

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
protected void initInformationPanel() {
  Panel infoPanel = new Panel();
  infoPanel.addStyleName(Reindeer.PANEL_LIGHT);
  infoPanel.setSizeFull();
  
  profilePanelLayout.addComponent(infoPanel);
  profilePanelLayout.setExpandRatio(infoPanel, 1.0f); // info panel should take all the remaining width available
  
  // All the information sections are put under each other in a vertical layout
  this.infoPanelLayout = new VerticalLayout();
  infoPanel.setContent(infoPanelLayout);
  
  initAboutSection();
  initContactSection();
  
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:17,代码来源:ProfilePanel.java

示例3: DetailPanel

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
public DetailPanel() {
  setSizeFull();
  addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
  setMargin(true);
  
  CssLayout cssLayout = new CssLayout(); // Needed for rounded corners
  cssLayout.addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
  cssLayout.setSizeFull();
  super.addComponent(cssLayout);
  
  mainPanel = new Panel();
  mainPanel.addStyleName(Reindeer.PANEL_LIGHT);
  mainPanel.setSizeFull();
  cssLayout.addComponent(mainPanel);
  
  // Use default layout
  VerticalLayout verticalLayout = new VerticalLayout();
  verticalLayout.setWidth(100, UNITS_PERCENTAGE);
  verticalLayout.setMargin(true);
  mainPanel.setContent(verticalLayout);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:22,代码来源:DetailPanel.java

示例4: SimplePageLayout

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
public SimplePageLayout(CaoNode res) {
		this.res = res;
		
		p = new Panel();
		un = new Panel();
		
		h = new HorizontalLayout();
		v = new VerticalLayout();
		p.setContent(v);
//		setSizeFull();
		h.setWidth("100%");
		p.addStyleName("v-scrollable");
        p.setHeight("100%");
		un.addStyleName("v-scrollable");
        un.setHeight("100%");
        un.setWidth("250px");
        addComponent(p);
        addComponent(un);
        setExpandRatio(p, 1);
	}
 
开发者ID:mhus,项目名称:cherry-web,代码行数:21,代码来源:SimplePageLayout.java

示例5: AbstractDialog

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
/**
 * Constructor
 */
public AbstractDialog() {
	super();

	// defaults
	setModal(true);
	setResizable(false);
	setDraggable(false);
	setClosable(false);

	// style name
	addStyleName("h-dialog");

	// build
	content = new Panel();
	content.setWidth("100%");
	content.addStyleName(ValoTheme.PANEL_BORDERLESS);
	content.addStyleName("h-dialog-content");

	actions = new HorizontalLayout();
	actions.setWidth("100%");
	actions.setSpacing(true);
	actions.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
	actions.addStyleName("h-dialog-actions");

	root = new VerticalLayout();
	root.addComponent(content);
	root.addComponent(actions);

	setContent(root);
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:34,代码来源:AbstractDialog.java

示例6: getVirtualSystemPanel

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
/**
 * @return AZ Panel
 */
@SuppressWarnings("serial")
protected Panel getVirtualSystemPanel() {
    try {

        this.vsTable = new Table();
        this.vsTable.setPageLength(5);
        this.vsTable.setImmediate(true);
        this.vsTable.addGeneratedColumn("Enabled", new CheckBoxGenerator());
        this.vsTable.addItemClickListener(new ItemClickListener() {
            @Override
            public void itemClick(ItemClickEvent event) {
                vsTableClicked((Long) event.getItemId());
            }
        });

        // populating VS table
        populateVirtualSystem();

        Panel vsPanel = new Panel("Virtualization System:");
        vsPanel.addStyleName("form_Panel");
        vsPanel.setWidth(100, Sizeable.Unit.PERCENTAGE);
        vsPanel.setContent(this.vsTable);

        return vsPanel;

    } catch (Exception e) {

        log.error("Error while creating DA's VS panel", e);
    }

    return null;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:36,代码来源:BaseDAWindow.java

示例7: RowLayout

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private RowLayout(Step step) {
  this.step = step;

  label = getLabelProvider().getStepLabel(step);

  divider = new CssLayout();
  divider.addStyleName(STYLE_DIVIDER);
  divider.setHeight(100, Unit.PERCENTAGE);

  contentContainer = new Panel();
  contentContainer.addStyleName(STYLE_CONTENT_CONTAINER);
  contentContainer.addStyleName(ValoTheme.PANEL_BORDERLESS);
  contentContainer.setSizeFull();

  buttonBar = new HorizontalLayout();
  buttonBar.addStyleName(STYLE_BUTTON_BAR);
  buttonBar.setMargin(false);
  buttonBar.setSpacing(true);
  buttonBar.setWidth(100, Unit.PERCENTAGE);
  buttonBar.setMargin(new MarginInfo(false, false, !isLastStep(step), false));

  rootLayout = new GridLayout(2, 3);
  rootLayout.setSizeFull();
  rootLayout.setMargin(false);
  rootLayout.setSpacing(false);
  rootLayout.setColumnExpandRatio(1, 1);
  rootLayout.setRowExpandRatio(1, 1);
  rootLayout.addComponent(label, 0, 0, 1, 0);
  rootLayout.addComponent(divider, 0, 1, 0, 2);
  rootLayout.addComponent(contentContainer, 1, 1, 1, 1);
  rootLayout.addComponent(buttonBar, 1, 2, 1, 2);

  setCompositionRoot(rootLayout);
  addStyleName(STYLE_COMPONENT);
  setWidth(100, Unit.PERCENTAGE);
  setActive(false);
}
 
开发者ID:Juchar,项目名称:md-stepper,代码行数:38,代码来源:VerticalStepper.java

示例8: initLayouts

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private void initLayouts() {
    navBar = new NavBar(this);
    // Use panel as main content container to allow it's content to scroll
    content = new Panel();
    content.setSizeFull();
    content.addStyleName(UIConstants.PANEL_BORDERLESS);

    addComponents(navBar, content);
    setExpandRatio(content, 1);
}
 
开发者ID:apache,项目名称:incubator-tamaya-sandbox,代码行数:11,代码来源:ApplicationLayout.java

示例9: getAddonComponent

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Override
public Component getAddonComponent() {
    Window w = new Window("Medium Editor in window");
    w.setWidth(500, Unit.PIXELS);
    w.setHeight(400, Unit.PIXELS);
    
    
    Panel p = new Panel();
    p.addStyleName(ValoTheme.PANEL_WELL);
    p.setSizeFull();

    MediumEditor editor = new MediumEditor();
    editor.setSizeFull();
    editor.setFocusOutlineEnabled(false);
    editor.setJsLoggingEnabled(true);
    editor.setContent(Lorem.getHtmlParagraphs(3, 5));
    editor.configure(
            editor.options()
            .toolbar()
            .buttons(Buttons.BOLD, Buttons.ITALIC, 
                    Buttons.JUSTIFY_CENTER, 
                    Buttons.ANCHOR)
            .done()
            .autoLink(true)
            .imageDragging(false)
            .done()
            );
    editors.add(editor);
    p.setContent(editor);
    w.setContent(p);

    Button b = new Button("Open Window");
    b.addClickListener(e -> {
        w.setPosition(e.getClientX(), e.getClientY());
        UI.getCurrent().addWindow(w);
    });


    return b; 
}
 
开发者ID:moberwasserlechner,项目名称:vaadin-medium-editor,代码行数:41,代码来源:WindowEditorView.java

示例10: buildPreview

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private Component buildPreview() {
    previewLabel = new Label();
    previewLabel.setSizeFull();

    Panel panel = new Panel(previewLabel);
    panel.setCaption("Preview");
    panel.setSizeFull();
    panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
    panel.addStyleName("addon-code");
    return panel;
}
 
开发者ID:moberwasserlechner,项目名称:vaadin-medium-editor,代码行数:12,代码来源:AddonDemoUI.java

示例11: buildCode

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private Component buildCode() {
    codeLabel = new Label();
    codeLabel.setContentMode(ContentMode.HTML);

    Panel codePanel = new Panel(codeLabel);
    codePanel.setSizeFull();
    codePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
    codePanel.addStyleName("addon-code");
    return codePanel;
}
 
开发者ID:moberwasserlechner,项目名称:vaadin-medium-editor,代码行数:11,代码来源:AddonDemoUI.java

示例12: buildMenu

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private Component buildMenu() {
    Panel menuPanel = new Panel();
    menuPanel.setSizeFull();
    menuPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
    menuPanel.addStyleName("addon-menu");

    VerticalLayout vl = new VerticalLayout();
    vl.setWidth(100, Unit.PERCENTAGE);

    for (EditorStructure editorStructure : EditorStructure.values()) {
        List<MenuItem> children = new ArrayList<>();
        for (MenuItem i : menuItems) {
            if (i.getType() == editorStructure) {
                children.add(i);
            }
        }

        Label section = new Label();
        section.addStyleName(ValoTheme.LABEL_SUCCESS);
        section.setSizeFull();
        section.setValue(editorStructure.toString());
        vl.addComponent(section);

        for (MenuItem menuItem : children) {
            Button b = new Button(menuItem.getLabel());
            b.setSizeFull();
            b.addClickListener(e -> {
                getUI().getNavigator().navigateTo(menuItem.getViewName());
                vl.forEach(c -> c.removeStyleName(ValoTheme.BUTTON_PRIMARY));
                b.addStyleName(ValoTheme.BUTTON_PRIMARY);
            });
            vl.addComponent(b);
        }
    }
    menuPanel.setContent(vl);
    return menuPanel;
}
 
开发者ID:moberwasserlechner,项目名称:vaadin-medium-editor,代码行数:38,代码来源:AddonDemoUI.java

示例13: initOptionGroups

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private void initOptionGroups() {
        detInput = new Panel("Zukünftige Perioden (deterministisch):");
        deterministicInput.addItem(InputType.DIRECT);
        deterministicInput.addItem(InputType.GESAMTKOSTENVERFAHREN);
        deterministicInput.addItem(InputType.UMSATZKOSTENVERFAHREN);
        detInput.addStyleName(Reindeer.PANEL_LIGHT);
        detInput.addComponent(deterministicInput);
        
        stoInput = new Panel("Vergangene Perioden (stochastisch):");
        stochasticInput.addItem(InputType.DIRECT);
        stochasticInput.addItem(InputType.GESAMTKOSTENVERFAHREN);
        stochasticInput.addItem(InputType.UMSATZKOSTENVERFAHREN);
        stoInput.addStyleName(Reindeer.PANEL_LIGHT);
        stoInput.addComponent(stochasticInput);
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:16,代码来源:MethodViewImpl.java

示例14: buildLayout

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private void buildLayout() {
    setSizeFull();
    setSpacing(true);
    setMargin(false);
    setStyleName("group");
    final VerticalLayout tableHeaderLayout = new VerticalLayout();
    tableHeaderLayout.setSizeFull();
    tableHeaderLayout.setSpacing(false);
    tableHeaderLayout.setMargin(false);

    tableHeaderLayout.setStyleName("table-layout");
    tableHeaderLayout.addComponent(tableHeader);

    tableHeaderLayout.setComponentAlignment(tableHeader, Alignment.TOP_CENTER);
    if (isShortCutKeysRequired()) {
        final Panel tablePanel = new Panel();
        tablePanel.setStyleName("table-panel");
        tablePanel.setHeight(100.0F, Unit.PERCENTAGE);
        tablePanel.setContent(table);
        tablePanel.addActionHandler(getShortCutKeysHandler());
        tablePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
        tableHeaderLayout.addComponent(tablePanel);
        tableHeaderLayout.setComponentAlignment(tablePanel, Alignment.TOP_CENTER);
        tableHeaderLayout.setExpandRatio(tablePanel, 1.0F);
    } else {
        tableHeaderLayout.addComponent(table);
        tableHeaderLayout.setComponentAlignment(table, Alignment.TOP_CENTER);
        tableHeaderLayout.setExpandRatio(table, 1.0F);
    }

    addComponent(tableHeaderLayout);
    addComponent(detailsLayout);
    setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER);
    setComponentAlignment(detailsLayout, Alignment.TOP_CENTER);
    setExpandRatio(tableHeaderLayout, 1.0F);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:37,代码来源:AbstractTableLayout.java

示例15: initImage

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
protected void initImage() {
  processImageContainer = new VerticalLayout();
  
  Label processTitle = new Label(i18nManager.getMessage(Messages.PROCESS_HEADER_DIAGRAM));
  processTitle.addStyleName(ExplorerLayout.STYLE_H3);
  processImageContainer.addComponent(processTitle);
  
  if(processDefinition.getDiagramResourceName() != null) {
    StreamResource diagram = new ProcessDefinitionImageStreamResourceBuilder()
      .buildStreamResource(processDefinition, repositoryService);
    
    Embedded embedded = new Embedded(null, diagram);
    embedded.setType(Embedded.TYPE_IMAGE);
    embedded.setSizeUndefined();
    
    Panel imagePanel = new Panel(); // using panel for scrollbars
    imagePanel.addStyleName(Reindeer.PANEL_LIGHT);
    imagePanel.setWidth(100, UNITS_PERCENTAGE);
    imagePanel.setHeight(400, UNITS_PIXELS);
    HorizontalLayout panelLayout = new HorizontalLayout();
    panelLayout.setSizeUndefined();
    imagePanel.setContent(panelLayout);
    imagePanel.addComponent(embedded);
    
    processImageContainer.addComponent(imagePanel);
  } else {
    Label noImageAvailable = new Label(i18nManager.getMessage(Messages.PROCESS_NO_DIAGRAM));
    processImageContainer.addComponent(noImageAvailable);
  }
  addComponent(processImageContainer);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:32,代码来源:ProcessDefinitionInfoComponent.java


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