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


Java Sizeable类代码示例

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


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

示例1: showBadgesInBrowser

import com.vaadin.server.Sizeable; //导入依赖的package包/类
public void showBadgesInBrowser(List<Attendee> attendeeList) {
    if (attendeeList.size() > 0) {
        StreamResource.StreamSource source = handler.getBadgeFormatter(this, attendeeList);
        String filename = "testbadge" + System.currentTimeMillis() + ".pdf";
        StreamResource resource = new StreamResource(source, filename);

        resource.setMIMEType("application/pdf");
        resource.getStream().setParameter("Content-Disposition", "attachment; filename="+filename);

        Window window = new Window();
        window.setWidth(800, Sizeable.Unit.PIXELS);
        window.setHeight(600, Sizeable.Unit.PIXELS);
        window.setModal(true);
        window.center();
        BrowserFrame pdf = new BrowserFrame("test", resource);
        pdf.setSizeFull();

        window.setContent(pdf);
        getUI().addWindow(window);
    } else {
        Notification.show("No attendees selected");
    }
}
 
开发者ID:kumoregdev,项目名称:kumoreg,代码行数:24,代码来源:PrintBadgeWindow.java

示例2: getOptionTable

import com.vaadin.server.Sizeable; //导入依赖的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

示例3: getAttributesPanel

import com.vaadin.server.Sizeable; //导入依赖的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

示例4: SteppersView

import com.vaadin.server.Sizeable; //导入依赖的package包/类
public SteppersView() {
    setAlignSelf(FlexLayout.AlignSelf.BASELINE);
    setFlexDirection(FlexLayout.FlexDirection.COLUMN);
    addStyleName(Paddings.All.LARGE);
    addStyleName(Spacings.Bottom.LARGE);
    setWidth(100, Sizeable.Unit.PERCENTAGE);

    Stepper s1 = createStepper();
    s1.selectStep(0);

    Stepper s2 = createStepper();
    s2.completeStep(0);
    s2.selectStep(1);

    Stepper s3 = createStepper();
    s3.completeStep(0);
    s3.invalidateStep(1);
    s3.selectStep(2);

    addComponents(s1, s2, s3);
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:22,代码来源:SteppersView.java

示例5: init

import com.vaadin.server.Sizeable; //导入依赖的package包/类
@PostConstruct
    public void init() {
        handler.setView(this);
        setSizeFull();

        addComponent(instructions);
        ImportAttendeePresenter.UploadReceiver receiver = handler.getUploadReceiver();
        Upload upload = new Upload("Upload JSON file", receiver);
        upload.addSucceededListener(receiver);
        upload.addFailedListener(receiver);
        addComponent(upload);
        status.setSizeFull();
        status.setWidth(600, Sizeable.Unit.PIXELS);
        status.setEnabled(false);
        addComponent(status);
//        setExpandRatio(status, 1.0f);
    }
 
开发者ID:kumoregdev,项目名称:kumoreg,代码行数:18,代码来源:ImportAttendeeView.java

示例6: applyScrollBarsPolicy

import com.vaadin.server.Sizeable; //导入依赖的package包/类
protected void applyScrollBarsPolicy(ScrollBarPolicy scrollBarPolicy) {
    switch (scrollBarPolicy) {
        case VERTICAL:
            getContent().setHeightUndefined();
            getContent().setWidth(100, Sizeable.Unit.PERCENTAGE);
            break;

        case HORIZONTAL:
            getContent().setHeight(100, Sizeable.Unit.PERCENTAGE);
            getContent().setWidthUndefined();
            break;

        case BOTH:
            getContent().setSizeUndefined();
            break;

        case NONE:
            getContent().setSizeFull();
            break;
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:22,代码来源:WebScrollBoxLayout.java

示例7: addMenuItemComponent

import com.vaadin.server.Sizeable; //导入依赖的package包/类
protected void addMenuItemComponent(final ViewDefinition viewDefinition, String parameters) {
    CssLayout dashboardWrapper = new CssLayout();
    dashboardWrapper.addStyleName("badgewrapper");
    dashboardWrapper.addStyleName(ValoTheme.MENU_ITEM);
    dashboardWrapper.setWidth(100.0f, Sizeable.Unit.PERCENTAGE);

    Label notificationsBadge = new Label();
    notificationsBadge.addStyleName(ValoTheme.MENU_BADGE);
    notificationsBadge.setWidthUndefined();
    notificationsBadge.setVisible(false);

    if (viewDefinition != null) {
        dashboardWrapper.addComponents(new ValoMenuItemButton(viewDefinition, parameters), notificationsBadge);
        menuItemsLayout.addComponent(dashboardWrapper);
    } else if (HybridbpmUI.getDeveloperMode()) {
        dashboardWrapper.addComponents(new ValoMenuAddViewButton(), notificationsBadge);
        menuItemsLayout.addComponent(dashboardWrapper);
    }
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:20,代码来源:MainMenu.java

示例8: initUI

import com.vaadin.server.Sizeable; //导入依赖的package包/类
public void initUI() {
    removeAllComponents();
    btnAdd.setCaption(("Add file"));
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    setMargin(true);
    setSpacing(true);
    setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FileModel fileModel : processModel.getFileModels()) {
        FileForm fileForm = new FileForm();
        fileForm.setFileModel(fileModel);
        addComponent(fileForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:17,代码来源:FileEditorLayout.java

示例9: initUI

import com.vaadin.server.Sizeable; //导入依赖的package包/类
public void initUI() {
    removeAllComponents();
    btnAdd.setCaption(("Add variable"));
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    setMargin(true);
    setSpacing(true);
    setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FieldModel fieldModel : processModel.getVariableModels()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.COMPLEX_DATA);
        fieldForm.setFieldModel(fieldModel);
        addComponent(fieldForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:17,代码来源:VariableEditorLayout.java

示例10: initUI

import com.vaadin.server.Sizeable; //导入依赖的package包/类
public void initUI() {
    removeAllComponents();
    addStyleName("process-model");
    setImmediate(true);
    setWidth(processModel.getWidth(), Sizeable.Unit.PIXELS);
    setHeight(processModel.getHeight(), Sizeable.Unit.PIXELS);

    prepareButtonsBars();

    transitionManager = new TransitionManager(this);
    transitionManager.setSizeFull();
    transitionManager.setValue(processModel.getWidth(), processModel.getHeight());
    transitionManager.setValue(processModel.getTaskModels(), processModel.getTransitionModels());
    addComponent(transitionManager);

    for (TaskModel taskModel : processModel.getTaskModels().values()) {
        ElementModelLayout elementModelLayout = new ElementModelLayout(taskModel, this);
        addComponent(elementModelLayout, "left:" + taskModel.getX() + "px; top:" + taskModel.getY() + "px");
    }
    activeElement = new ActiveElement(ActiveElement.TYPE.PROCESS, processModel, null, null);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:22,代码来源:ProcessModelLayout.java

示例11: initUI

import com.vaadin.server.Sizeable; //导入依赖的package包/类
public void initUI(boolean editable) {
    removeAllComponents();
    btnAdd.setCaption(("Add parameter"));
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    setMargin(true);
    setSpacing(true);
    setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FieldModel fieldModel : formModel.getParameters()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
        fieldForm.setFieldModel(fieldModel);
        fieldForm.setEnabled(editable);
        fieldForm.setReadOnly(!editable);
        addComponent(fieldForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
    btnAdd.setVisible(editable);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:20,代码来源:ParametersLayout.java

示例12: initUI

import com.vaadin.server.Sizeable; //导入依赖的package包/类
public void initUI() {
    removeAllComponents();
    btnAdd.setCaption(("Add parameter"));
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    setMargin(true);
    setSpacing(true);
    setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FieldModel fieldModel : connectoModel.getOutParameters()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
        fieldForm.setFieldModel(fieldModel);
        addComponent(fieldForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:17,代码来源:OutParametersLayout.java

示例13: initUI

import com.vaadin.server.Sizeable; //导入依赖的package包/类
public void initUI() {
    removeAllComponents();
    btnAdd.setCaption(("Add parameter"));
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    setMargin(true);
    setSpacing(true);
    setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FieldModel fieldModel : connectoModel.getInParameters()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
        fieldForm.setFieldModel(fieldModel);
        addComponent(fieldForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:17,代码来源:InParametersLayout.java

示例14: prepareModeler

import com.vaadin.server.Sizeable; //导入依赖的package包/类
private void prepareModeler() {
    btnAdd.setCaption("Add field");
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.addStyleName(ValoTheme.BUTTON_SMALL);

    modelerLayout.setMargin(true);
    modelerLayout.setSpacing(true);
    modelerLayout.setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FieldModel fieldModel : dataModel.getFields()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
        fieldForm.setFieldModel(fieldModel);
        modelerLayout.addComponent(fieldForm);
    }
    modelerLayout.addComponent(btnAdd);
    modelerLayout.setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:18,代码来源:DataEditor.java

示例15: showForTargetFilter

import com.vaadin.server.Sizeable; //导入依赖的package包/类
/**
 * Shows a distribution set select window for the given target filter query
 *
 * @param tfqId
 *            target filter query id
 */
public void showForTargetFilter(final Long tfqId) {
    this.tfqId = tfqId;
    final TargetFilterQuery tfq = targetFilterQueryManagement.get(tfqId)
            .orElseThrow(() -> new EntityNotFoundException(TargetFilterQuery.class, tfqId));

    final VerticalLayout verticalLayout = initView();

    final DistributionSet distributionSet = tfq.getAutoAssignDistributionSet();
    if (distributionSet != null) {
        setValue(distributionSet.getId());
    } else {
        setValue(null);
    }

    // build window after values are set to view elements
    final CommonDialogWindow window = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW)
            .caption(i18n.getMessage("caption.select.auto.assign.dist")).content(verticalLayout)
            .layout(verticalLayout).i18n(i18n).saveDialogCloseListener(this).buildCommonDialogWindow();
    window.setId(UIComponentIdProvider.DIST_SET_SELECT_WINDOW_ID);

    window.setWidth(40.0F, Sizeable.Unit.PERCENTAGE);
    UI.getCurrent().addWindow(window);
    window.setVisible(true);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:31,代码来源:DistributionSetSelectWindow.java


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