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


Java Panel类代码示例

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


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

示例1: init

import com.vaadin.ui.Panel; //导入依赖的package包/类
@Override
protected void init(VaadinRequest request) {
	final VerticalLayout root = new VerticalLayout();
	root.setSizeFull();
	root.setMargin(true);
	root.setSpacing(true);
	setContent(root);
	MHorizontalLayout horizontalLayout = new MHorizontalLayout();
	for (MenuEntry menuEntry : menuEntries) {
		horizontalLayout.addComponent(new MButton(menuEntry.getName(), event -> {
			navigator.navigateTo(menuEntry.getNavigationTarget());
		}));
	}
	root.addComponent(horizontalLayout);
	springViewDisplay = new Panel();
	springViewDisplay.setSizeFull();
	root.addComponent(springViewDisplay);
	root.setExpandRatio(springViewDisplay, 1.0f);

}
 
开发者ID:dve,项目名称:spring-boot-plugins-example,代码行数:21,代码来源:VaadinUI.java

示例2: init

import com.vaadin.ui.Panel; //导入依赖的package包/类
@Override
protected void init(VaadinRequest request) {
    final VerticalLayout rootLayout = new VerticalLayout();
    rootLayout.setSizeFull();
    setContent(rootLayout);

    final CssLayout navigationBar = new CssLayout();
    navigationBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
    navigationBar.addComponent(createNavigationButton("Demo View (Default)",
            Constants.VIEW_DEFAULT));
    navigationBar.addComponent(createNavigationButton("Stream View",
            Constants.VIEW_STREAM));
    rootLayout.addComponent(navigationBar);

    springViewDisplay = new Panel();
    springViewDisplay.setSizeFull();
    
    rootLayout.addComponent(springViewDisplay);
    rootLayout.setExpandRatio(springViewDisplay, 1.0f);

}
 
开发者ID:MikeQin,项目名称:spring-boot-vaadin-rabbitmq-pipeline-demo,代码行数:22,代码来源:NavigatorUI.java

示例3: getOptionTable

import com.vaadin.ui.Panel; //导入依赖的package包/类
@SuppressWarnings("serial")
protected Panel getOptionTable() {
    this.optionTable = new Table();
    this.optionTable.setPageLength(3);
    this.optionTable.setSizeFull();
    this.optionTable.setImmediate(true);
    this.optionTable.addGeneratedColumn("Enabled", new CheckBoxGenerator());
    this.optionTable.addContainerProperty("Name", String.class, null);
    this.optionTable.addItemClickListener(new ItemClickListener() {
        @Override
        public void itemClick(ItemClickEvent event) {
            optionTableClicked(event);
        }
    });

    this.optionPanel = new Panel();
    this.optionPanel.addStyleName(StyleConstants.FORM_PANEL);
    this.optionPanel.setWidth(100, Sizeable.Unit.PERCENTAGE);
    this.optionPanel.setContent(this.optionTable);

    return this.optionPanel;

}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:24,代码来源:BaseDeploymentSpecWindow.java

示例4: ManageLayout

import com.vaadin.ui.Panel; //导入依赖的package包/类
public ManageLayout(BackupServiceApi backupService, RestoreServiceApi restoreService,
        ServerApi server, ValidationApi validator) {
    super();
    this.backupService = backupService;
    this.validator = validator;

    VerticalLayout backupContainer = new VerticalLayout();
    VerticalLayout restoreContainer = new VerticalLayout();

    DbRestorer restorer = new DbRestorer(restoreService, server, validator);
    restorer.setSizeFull();

    // Component to Backup Database
    Panel bkpPanel = new Panel();
    bkpPanel.setContent(createBackup());

    backupContainer.addComponent(ViewUtil.createSubHeader("Backup Database", null));
    backupContainer.addComponent(bkpPanel);

    restoreContainer.addComponent(ViewUtil.createSubHeader("Restore Database", null));
    restoreContainer.addComponent(restorer);

    addComponent(backupContainer);
    addComponent(restoreContainer);
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:26,代码来源:ManageLayout.java

示例5: getAttributesPanel

import com.vaadin.ui.Panel; //导入依赖的package包/类
protected Panel getAttributesPanel() {

        this.sharedKey = new PasswordField();
        this.sharedKey.setRequiredError("shared secret key cannot be empty");
        this.sharedKey.setRequired(true);
        // best show/hide this conditionally based on Manager type.
        this.sharedKey.setValue("dummy1234");

        this.attributes = new Table();
        this.attributes.setPageLength(0);
        this.attributes.setSelectable(true);
        this.attributes.setSizeFull();
        this.attributes.setImmediate(true);

        this.attributes.addContainerProperty("Attribute Name", String.class, null);
        this.attributes.addContainerProperty("Value", PasswordField.class, null);
        this.attributes.addItem(new Object[] { "Shared Secret key", this.sharedKey }, new Integer(1));
        // creating panel to store attributes table
        this.attributePanel = new Panel("Common Appliance Configuration Attributes:");
        this.attributePanel.addStyleName("form_Panel");
        this.attributePanel.setWidth(100, Sizeable.Unit.PERCENTAGE);
        this.attributePanel.setContent(this.attributes);

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

示例6: init

import com.vaadin.ui.Panel; //导入依赖的package包/类
@Override
protected void init(VaadinRequest request) {
	log.info("Levanto la pagina UI");
	
	final VerticalLayout root = new VerticalLayout();
       root.setSizeFull();
       root.setMargin(true);
       root.setSpacing(true);
       setContent(root);
	
       final Panel viewContainer = new Panel();
       viewContainer.setSizeFull();
       root.addComponent(viewContainer);
       root.setExpandRatio(viewContainer, 1.0f);
       
       Navigator navigator = new Navigator(this, viewContainer);
       //Navigator navigator = new Navigator(this, this);
       navigator.addProvider(viewProvider);
       
       log.info("Termina de levantar la pagina UI");

}
 
开发者ID:damiancom,项目名称:garantia,代码行数:23,代码来源:LoginUI.java

示例7: FlowViewPanel

import com.vaadin.ui.Panel; //导入依赖的package包/类
public FlowViewPanel(FlowDTO flowDTO,
                     ConditionWidgetRepository conditionWidgetRepository,
                     ActionWidgetRepository actionWidgetRepository) {
  this.flowDTO = flowDTO;
  this.innerPanel = new Panel(flowDTO.getName());
  this.conditionWidgetRepository = conditionWidgetRepository;
  this.actionWidgetRepository = actionWidgetRepository;

  StackPanel stackPanel = StackPanel.extend(innerPanel);
  stackPanel.setToggleIconsEnabled(false);
  stackPanel.close();

  innerPanel.setContent(getPanelGrid());

  setCompositionRoot(innerPanel);
}
 
开发者ID:daergoth,项目名称:HomeWire-Server,代码行数:17,代码来源:FlowViewPanel.java

示例8: ConditionPanel

import com.vaadin.ui.Panel; //导入依赖的package包/类
public ConditionPanel(ConditionDTO conditionDTO,
                      ConditionWidgetRepository conditionWidgetRepository,
                      Consumer<ConditionDTO> changeListener) {
  this.conditionWidgetRepository = conditionWidgetRepository;
  this.conditionDTO = conditionDTO;

  this.mainPanel = new Panel("Condition");
  this.mainTypeComboBox = new ComboBox("Type");

  this.currentConditionWidget = conditionWidgetRepository
      .getFactory(TypeViewDTO.ConditionTypes.ofConditionDto(conditionDTO))
      .createWidget(conditionDTO);
  currentConditionWidget.setChangeListener(changeListener);

  this.changeListener = changeListener;

  setupPanel();

  setCompositionRoot(mainPanel);
  setSizeUndefined();
}
 
开发者ID:daergoth,项目名称:HomeWire-Server,代码行数:22,代码来源:ConditionPanel.java

示例9: ActionPanel

import com.vaadin.ui.Panel; //导入依赖的package包/类
public ActionPanel(ActionDTO actionDTO,
                   ActionWidgetRepository actionWidgetRepository,
                   Consumer<ActionDTO> changeListener) {
  this.actionWidgetRepository = actionWidgetRepository;
  this.actionDTO = actionDTO;

  this.mainPanel = new Panel("Action");
  this.mainTypeComboBox = new ComboBox("Type");

  this.currentActionWidget = actionWidgetRepository
      .getFactory(TypeViewDTO.ActionTypes.ofActionDto(actionDTO))
      .createWidget(actionDTO);
  currentActionWidget.setChangeListener(changeListener);

  this.changeListener = changeListener;

  setupPanel();

  setCompositionRoot(mainPanel);
  setSizeUndefined();
}
 
开发者ID:daergoth,项目名称:HomeWire-Server,代码行数:22,代码来源:ActionPanel.java

示例10: createSensorList

import com.vaadin.ui.Panel; //导入依赖的package包/类
private Component createSensorList() {
  VerticalLayout listLayout = new VerticalLayout();
  //listLayout.setWidth(25, Unit.PERCENTAGE);

  deviceSetupService.getSensorDtosGroupedByType().forEach((groupName, sensorDTOS) -> {
    VerticalLayout sensorList = new VerticalLayout();

    sensorDTOS.forEach(sensorDTO -> {
      CheckBox c = new CheckBox(sensorDTO.getName());

      c.addValueChangeListener(event -> {
        updateChart(sensorDTO.getType() + sensorDTO.getDevId(),
            (Boolean) event.getProperty().getValue());
      });

      sensorList.addComponent(c);
    });

    Panel typePanel = new Panel(groupName.substring(0, 1).toUpperCase() + groupName.substring(1));
    typePanel.setContent(sensorList);
    listLayout.addComponent(typePanel);
  });

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

示例11: 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

示例12: ImageSelector

import com.vaadin.ui.Panel; //导入依赖的package包/类
public ImageSelector() {
    images = new LinkedList<DSImage>();
    visibleImages = new HashMap<Integer, Image>();
    loadedImages = new LinkedList<Image>();

    mainPanel = new Panel();
    imageLayout = new HorizontalLayout();
    layout = new HorizontalLayout();

    imageMaxWidth = 110;
    imageMaxHeight = 110;

    leftButton = new Button("<", e -> scrollLeft());
    rightButton = new Button(">", e -> scrollRight());
    leftButton.setEnabled(false);
    rightButton.setEnabled(false);
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:18,代码来源:ImageSelector.java

示例13: MultiColumnFormLayout

import com.vaadin.ui.Panel; //导入依赖的package包/类
public MultiColumnFormLayout(int columns, String caption) {
    if (columns < 1) {
        throw new IllegalArgumentException("column number must be greater than 1");
    }
    hLayout = new HorizontalLayout();
    hLayout.setWidth(100, Unit.PERCENTAGE);
    for (int i = 0; i < columns; i++) {
        FormLayout form = new FormLayout();
        hLayout.addComponent(form, i);
    }
    
    if (caption != null) {
        hLayout.setMargin(new MarginInfo(false, true));
        Panel panel = new Panel(caption, hLayout);
        setCompositionRoot(panel);
    } else {
        setCompositionRoot(hLayout);
    }
    
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:21,代码来源:MultiColumnFormLayout.java

示例14: 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

示例15: initLayout

import com.vaadin.ui.Panel; //导入依赖的package包/类
private void initLayout() {
	final VerticalLayout root = new VerticalLayout();
	root.setSizeFull();
	root.setMargin(true);
	root.setSpacing(true);
	setContent(root);

	final CssLayout navigationBar = new CssLayout();
	navigationBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);

	navigationBar.addComponent(createNavigationButton("Default View",
               DefaultView.VIEW_NAME));		
       navigationBar.addComponent(createNavigationButton("MongoDB View",
               MongoDBUIView.VIEW_NAME));
       navigationBar.addComponent(createNavigationButton("Combobox Example View",
               CityComboboxView.VIEW_NAME));
       
	root.addComponent(navigationBar);

	springViewDisplay = new Panel();
       springViewDisplay.setSizeFull();
       root.addComponent(springViewDisplay);
       root.setExpandRatio(springViewDisplay, 1.0f);

}
 
开发者ID:theMightyFly,项目名称:demo-spring-vaadin,代码行数:26,代码来源:MyVaadinUI.java


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