Java Code Examples for com.vaadin.ui.VerticalLayout#setMargin()

The following examples show how to use com.vaadin.ui.VerticalLayout#setMargin() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HomeViewImpl.java    From Vaadin4Spring-MVP-Sample-SpringSecurity with Apache License 2.0 6 votes vote down vote up
@Override
public void postConstruct() {	
	super.postConstruct();
	
	content = new VerticalLayout();
	content.setSpacing(true);
	content.setMargin(true);
	setCompositionRoot(content);
							
	caption = new Label("This is Home View", ContentMode.HTML);
	caption.addStyleName(ValoTheme.LABEL_H2);
	content.addComponent(caption);
	
	loginInfo = new Label("This is Home View", ContentMode.HTML);
	loginInfo.addStyleName(ValoTheme.LABEL_H2);
	content.addComponent(loginInfo);
			
}
 
Example 2
Source File: PolicyWorkspace.java    From XACML with MIT License 6 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100%");
	mainLayout.setHeight("100%");
	mainLayout.setMargin(false);
	
	// top-level component properties
	setWidth("100.0%");
	setHeight("100.0%");
	
	// horizontalSplitPanel
	horizontalSplitPanel = buildHorizontalSplitPanel();
	mainLayout.addComponent(horizontalSplitPanel);
	mainLayout.setExpandRatio(horizontalSplitPanel, 1.0f);
	
	return mainLayout;
}
 
Example 3
Source File: CustomPIPConfigurationComponent.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldClassname
	textFieldClassname = new TextField();
	textFieldClassname.setCaption("Java Classname");
	textFieldClassname.setImmediate(false);
	textFieldClassname
			.setDescription("Java classname of the code implementing the custom PIP.");
	textFieldClassname.setWidth("-1px");
	textFieldClassname.setHeight("-1px");
	textFieldClassname.setInputPrompt("Eg. com.foo.MyPIP");
	mainLayout.addComponent(textFieldClassname);
	mainLayout.setExpandRatio(textFieldClassname, 1.0f);
	
	// pipParameterComponent
	pipParameterComponent = new PIPParameterComponent(this.entity.getEntity());
	pipParameterComponent.setImmediate(false);
	pipParameterComponent.setWidth("-1px");
	pipParameterComponent.setHeight("-1px");
	mainLayout.addComponent(pipParameterComponent);
	
	return mainLayout;
}
 
Example 4
Source File: XacmlErrorHandler.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100%");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("100.0%");
	setHeight("-1px");
	
	// labelError
	labelError = new Label();
	labelError.setImmediate(false);
	labelError.setWidth("100.0%");
	labelError.setHeight("80px");
	labelError.setValue("This holds error messages.");
	mainLayout.addComponent(labelError);
	
	// buttonGo
	buttonGo = new Button();
	buttonGo.setCaption("Ok");
	buttonGo.setImmediate(true);
	buttonGo.setWidth("-1px");
	buttonGo.setHeight("-1px");
	mainLayout.addComponent(buttonGo);
	mainLayout.setComponentAlignment(buttonGo, new Alignment(48));
	
	return mainLayout;
}
 
Example 5
Source File: PIPCustomResolverEditorWindow.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	return mainLayout;
}
 
Example 6
Source File: AttributeSelectionWindow.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildVerticalLayout_2() {
	// common part: create layout
	verticalLayout_2 = new VerticalLayout();
	verticalLayout_2.setImmediate(false);
	verticalLayout_2.setWidth("-1px");
	verticalLayout_2.setHeight("-1px");
	verticalLayout_2.setMargin(true);
	verticalLayout_2.setSpacing(true);
	
	// textFieldIssuer
	textFieldIssuer = new TextField();
	textFieldIssuer.setCaption("Issuer");
	textFieldIssuer.setImmediate(false);
	textFieldIssuer.setWidth("-1px");
	textFieldIssuer.setHeight("-1px");
	verticalLayout_2.addComponent(textFieldIssuer);
	
	// checkBoxMustBePresent
	checkBoxMustBePresent = new CheckBox();
	checkBoxMustBePresent.setCaption("Attribute Must Be Present");
	checkBoxMustBePresent.setImmediate(false);
	checkBoxMustBePresent.setWidth("-1px");
	checkBoxMustBePresent.setHeight("-1px");
	verticalLayout_2.addComponent(checkBoxMustBePresent);
	
	return verticalLayout_2;
}
 
Example 7
Source File: TenantConfigurationDashboardView.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Init method adds all Configuration Views to the list of Views.
 */
@PostConstruct
public void init() {
    if (defaultDistributionSetTypeLayout.getComponentCount() > 0) {
        configurationViews.add(defaultDistributionSetTypeLayout);
    }
    configurationViews.add(repositoryConfigurationView);
    configurationViews.add(rolloutConfigurationView);
    configurationViews.add(authenticationConfigurationView);
    configurationViews.add(pollingConfigurationView);
    if (customConfigurationViews != null) {
        configurationViews.addAll(
                customConfigurationViews.stream().filter(ConfigurationGroup::show).collect(Collectors.toList()));
    }

    final Panel rootPanel = new Panel();
    rootPanel.setStyleName("tenantconfig-root");

    final VerticalLayout rootLayout = new VerticalLayout();
    rootLayout.setSizeFull();
    rootLayout.setMargin(true);
    rootLayout.setSpacing(true);

    configurationViews.forEach(rootLayout::addComponent);

    final HorizontalLayout buttonContent = saveConfigurationButtonsLayout();
    rootLayout.addComponent(buttonContent);
    rootLayout.setComponentAlignment(buttonContent, Alignment.BOTTOM_LEFT);
    rootPanel.setContent(rootLayout);
    setCompositionRoot(rootPanel);

    configurationViews.forEach(view -> view.addChangeListener(this));
}
 
Example 8
Source File: Demo.java    From serverside-elements with Apache License 2.0 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
    VerticalLayout layout = new VerticalLayout();
    addDemo(layout, new Html5InputDemo(), "HTML5 inputs");
    // Does not work in Firefox
    // tabSheet.addTab(new GoogleMapDemo(), "Web components");
    addDemo(layout, new ExistingElementsDemo(), "Existing elements");
    addDemo(layout, new PaperElementsDemo(), "Paper compoments");

    layout.setMargin(true);
    // layout.setSpacing(true);
    setContent(layout);
}
 
Example 9
Source File: EnumerationEditorComponent.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// tableEnumerations
	tableEnumerations = new Table();
	tableEnumerations.setCaption("Enumeration Values");
	tableEnumerations.setImmediate(true);
	tableEnumerations
			.setDescription("Enter possible values for the attribute.");
	tableEnumerations.setWidth("100.0%");
	tableEnumerations.setHeight("-1px");
	tableEnumerations.setInvalidAllowed(false);
	mainLayout.addComponent(tableEnumerations);
	mainLayout.setExpandRatio(tableEnumerations, 1.0f);
	
	// horizontalLayout_1
	horizontalLayout_1 = buildHorizontalLayout_1();
	mainLayout.addComponent(horizontalLayout_1);
	mainLayout.setExpandRatio(horizontalLayout_1, 1.0f);
	
	return mainLayout;
}
 
Example 10
Source File: ExpressionEditorWindow.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBox
	comboBox = new ComboBox();
	comboBox.setImmediate(false);
	comboBox.setWidth("-1px");
	comboBox.setHeight("-1px");
	mainLayout.addComponent(comboBox);
	
	// treeExpression
	treeExpression = new Tree();
	treeExpression.setImmediate(false);
	treeExpression.setWidth("100.0%");
	treeExpression.setHeight("-1px");
	mainLayout.addComponent(treeExpression);
	mainLayout.setExpandRatio(treeExpression, 1.0f);
	
	return mainLayout;
}
 
Example 11
Source File: PolicyEditor.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("100.0%");
	mainLayout.setMargin(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("100.0%");
	
	// horizontalLayoutToolbar
	horizontalLayoutToolbar = buildHorizontalLayoutToolbar();
	mainLayout.addComponent(horizontalLayoutToolbar);
	mainLayout.setExpandRatio(horizontalLayoutToolbar, 1.0f);
	
	// tree
	tree = new TreeTable();
	tree.setImmediate(true);
	tree.setWidth("100.0%");
	tree.setHeight("100.0%");
	mainLayout.addComponent(tree);
	mainLayout.setExpandRatio(tree, 1.0f);
	
	return mainLayout;
}
 
Example 12
Source File: ServiceDescDetail.java    From primecloud-controller with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void attach() {
    addStyleName(Reindeer.PANEL_LIGHT);
    setHeight("100%");

    HorizontalLayout layout = new HorizontalLayout();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addStyleName("service-desc-detail");
    setContent(layout);

    VerticalLayout leftLayout = new VerticalLayout();
    leftLayout.setMargin(false);
    leftLayout.setSpacing(false);
    leftLayout.setWidth("250px");
    leftLayout.setHeight("100%");

    left = new DetailInfoOpe();
    left.setWidth("250px");
    leftLayout.addComponent(left);
    leftLayout.setExpandRatio(left, 1.0f);
    layout.addComponent(leftLayout);

    right = new DetailParameters();
    right.setWidth("100%");
    right.setHeight("100%");
    layout.addComponent(right);

    layout.setExpandRatio(right, 100);
}
 
Example 13
Source File: PIPSQLResolverEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textAreaSelect
	textAreaSelect = new TextArea();
	textAreaSelect.setCaption("SQL Select Statement");
	textAreaSelect.setImmediate(false);
	textAreaSelect.setWidth("100.0%");
	textAreaSelect.setHeight("-1px");
	textAreaSelect.setInvalidAllowed(false);
	textAreaSelect.setRequired(true);
	mainLayout.addComponent(textAreaSelect);
	mainLayout.setExpandRatio(textAreaSelect, 1.0f);
	
	// textFieldBase
	textFieldBase = new TextField();
	textFieldBase.setCaption("Base DN");
	textFieldBase.setImmediate(false);
	textFieldBase.setWidth("-1px");
	textFieldBase.setHeight("-1px");
	mainLayout.addComponent(textFieldBase);
	
	// textFieldFilter
	textFieldFilter = new TextField();
	textFieldFilter.setCaption("Filter");
	textFieldFilter.setImmediate(false);
	textFieldFilter.setWidth("-1px");
	textFieldFilter.setHeight("-1px");
	mainLayout.addComponent(textFieldFilter);
	
	// checkBoxShortIds
	checkBoxShortIds = new CheckBox();
	checkBoxShortIds.setCaption("Display short id’s.");
	checkBoxShortIds.setImmediate(false);
	checkBoxShortIds.setWidth("-1px");
	checkBoxShortIds.setHeight("-1px");
	mainLayout.addComponent(checkBoxShortIds);
	
	// tableRequiredAttributes
	tableRequiredAttributes = new Table();
	tableRequiredAttributes.setCaption("Attributes Returned");
	tableRequiredAttributes.setImmediate(false);
	tableRequiredAttributes.setWidth("-1px");
	tableRequiredAttributes.setHeight("-1px");
	mainLayout.addComponent(tableRequiredAttributes);
	
	// tableAttributes
	tableAttributes = new Table();
	tableAttributes.setCaption("Parameters - Attributes Needed (i.e. ?)");
	tableAttributes.setImmediate(false);
	tableAttributes.setWidth("-1px");
	tableAttributes.setHeight("-1px");
	tableAttributes.setInvalidAllowed(false);
	tableAttributes.setRequired(true);
	mainLayout.addComponent(tableAttributes);
	
	return mainLayout;
}
 
Example 14
Source File: HyperCSVPIPConfigurationComponent.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldSource
	textFieldSource = new TextField();
	textFieldSource.setCaption("CSV Source File");
	textFieldSource.setImmediate(false);
	textFieldSource.setDescription("Path to CSV file");
	textFieldSource.setWidth("-1px");
	textFieldSource.setHeight("-1px");
	textFieldSource.setInvalidAllowed(false);
	textFieldSource.setRequired(true);
	textFieldSource.setInputPrompt("Eg. /opt/app/data.csv");
	mainLayout.addComponent(textFieldSource);
	
	// textFieldTarget
	textFieldTarget = new TextField();
	textFieldTarget.setCaption("Table");
	textFieldTarget.setImmediate(false);
	textFieldTarget.setDescription("Name of database table to be created.");
	textFieldTarget.setWidth("-1px");
	textFieldTarget.setHeight("-1px");
	textFieldTarget.setInvalidAllowed(false);
	textFieldTarget.setRequired(true);
	mainLayout.addComponent(textFieldTarget);
	
	// textFieldDefinition
	textFieldDefinition = new TextField();
	textFieldDefinition.setCaption("Table Definition");
	textFieldDefinition.setImmediate(false);
	textFieldDefinition.setDescription("SQL Table Definition");
	textFieldDefinition.setWidth("-1px");
	textFieldDefinition.setHeight("-1px");
	textFieldDefinition.setInvalidAllowed(false);
	textFieldDefinition.setRequired(true);
	mainLayout.addComponent(textFieldDefinition);
	
	return mainLayout;
}
 
Example 15
Source File: LoadBalancerDescBasic.java    From primecloud-controller with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void attach() {
    addStyleName(Reindeer.PANEL_LIGHT);
    setHeight("100%");

    HorizontalLayout layout = new HorizontalLayout();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addStyleName("loadbalancer-desc-basic");
    setContent(layout);

    // ロードバランサ基本情報
    basicInfo = new BasicInfo();
    basicInfo.setWidth("100%");
    layout.addComponent(basicInfo);

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");
    layout.addComponent(padding);

    Label padding2 = new Label("");
    padding2.setWidth("1px");
    layout.addComponent(padding2);

    // ロードバランサリスナ一覧
    VerticalLayout rightLayout = new VerticalLayout();
    rightLayout.setWidth("100%");
    rightLayout.setHeight("100%");
    rightLayout.setMargin(false);
    rightLayout.setSpacing(false);

    attachServiceTable = new AttachServiceTable();
    attachServiceTable.setWidth("100%");
    rightLayout.addComponent(attachServiceTable);
    loadBalancerOpe = new LoadbalancerServiceOperation();
    rightLayout.addComponent(loadBalancerOpe);
    rightLayout.setExpandRatio(attachServiceTable, 100);
    layout.addComponent(rightLayout);

    layout.setExpandRatio(basicInfo, 43);
    layout.setExpandRatio(rightLayout, 57);
}
 
Example 16
Source File: LoadBalancerDescServer.java    From primecloud-controller with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void attach() {
    addStyleName(Reindeer.PANEL_LIGHT);
    setHeight("100%");

    VerticalLayout panel = (VerticalLayout) getContent();
    panel.setWidth("100%");
    panel.setHeight("100%");
    panel.setMargin(true);
    panel.setSpacing(false);
    panel.addStyleName("loadbalancer-desc-basic");

    HorizontalLayout layout = new HorizontalLayout();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addStyleName("loadbalancer-desc-basic");

    // ロードバランサ詳細情報
    VerticalLayout leftLayout = new VerticalLayout();
    leftLayout.setWidth("100%");
    leftLayout.setHeight("100%");
    leftLayout.setMargin(true, false, false, false);
    leftLayout.setSpacing(false);

    loadBalancerInfo = new LoadBalancerDetailInfo();
    leftLayout.addComponent(loadBalancerInfo);
    leftLayout.setExpandRatio(loadBalancerInfo, 10);
    layout.addComponent(leftLayout);

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");
    layout.addComponent(padding);

    Label padding2 = new Label("");
    padding2.setWidth("1px");
    layout.addComponent(padding2);

    // 割り当てサーバ
    VerticalLayout rightLayout = new VerticalLayout();
    rightLayout.setWidth("100%");
    rightLayout.setHeight("100%");
    rightLayout.setMargin(false);
    rightLayout.setSpacing(false);
    rightLayout.addStyleName("loadbalancer-desc-server-right");

    attachServiceServerTable = new AttachSeriviceServerTable();
    rightLayout.addComponent(attachServiceServerTable);
    loadBalancerOpe = new LoadbalancerServerOperation();
    rightLayout.addComponent(loadBalancerOpe);
    rightLayout.setExpandRatio(attachServiceServerTable, 100);
    layout.addComponent(rightLayout);

    layout.setExpandRatio(leftLayout, 48);
    layout.setExpandRatio(rightLayout, 52);

    panel.addComponent(layout);
}
 
Example 17
Source File: NoUserSessionHandler.java    From cuba with Apache License 2.0 4 votes vote down vote up
protected void showNoUserSessionDialog(AppUI ui) {
    Messages messages = beanLocator.get(Messages.class);

    Connection connection = ui.getApp().getConnection();
    //noinspection ConstantConditions
    Locale locale = connection.getSession().getLocale();

    Window dialog = new NoUserSessionExceptionDialog();
    dialog.setStyleName("c-nousersession-dialog");
    dialog.setCaption(messages.getMainMessage("dialogs.Information", locale));
    dialog.setClosable(false);
    dialog.setResizable(false);
    dialog.setModal(true);

    CubaLabel messageLab = new CubaLabel();
    messageLab.setWidthUndefined();
    messageLab.setValue(messages.getMainMessage("noUserSession.message", locale));

    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setMargin(false);
    layout.setWidthUndefined();
    layout.setStyleName("c-nousersession-dialog-layout");
    layout.setSpacing(true);
    dialog.setContent(layout);

    CubaButton reloginBtn = new CubaButton();
    reloginBtn.addStyleName(WebButton.PRIMARY_ACTION_STYLENAME);
    reloginBtn.addClickListener(event -> relogin());
    reloginBtn.setCaption(messages.getMainMessage(Type.OK.getMsgKey()));

    String iconName = beanLocator.get(Icons.class)
            .get(Type.OK.getIconKey());
    reloginBtn.setIcon(beanLocator.get(IconResolver.class)
            .getIconResource(iconName));

    ClientConfig clientConfig = beanLocator.get(Configuration.class)
            .getConfig(ClientConfig.class);
    setClickShortcut(reloginBtn, clientConfig.getCommitShortcut());

    reloginBtn.focus();

    layout.addComponent(messageLab);
    layout.addComponent(reloginBtn);

    layout.setComponentAlignment(reloginBtn, Alignment.BOTTOM_RIGHT);

    ui.addWindow(dialog);

    dialog.center();

    if (ui.isTestMode()) {
        dialog.setCubaId("optionDialog");
        reloginBtn.setCubaId("reloginBtn");
    }

    if (ui.isPerformanceTestMode()) {
        dialog.setId(ui.getTestIdManager().getTestId("optionDialog"));
        reloginBtn.setId(ui.getTestIdManager().getTestId("reloginBtn"));
    }
}
 
Example 18
Source File: ObligationEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldObligationID
	textFieldObligationID = new TextField();
	textFieldObligationID.setCaption("Obligation ID");
	textFieldObligationID.setImmediate(false);
	textFieldObligationID.setWidth("-1px");
	textFieldObligationID.setHeight("-1px");
	textFieldObligationID.setInvalidAllowed(false);
	textFieldObligationID.setRequired(true);
	textFieldObligationID.setInputPrompt("Eg. urn:com:foo:obligation:sample");
	mainLayout.addComponent(textFieldObligationID);
	
	// optionGroupFullfillOn
	optionGroupFullfillOn = new OptionGroup();
	optionGroupFullfillOn.setCaption("Fulfill On");
	optionGroupFullfillOn.setImmediate(false);
	optionGroupFullfillOn.setWidth("-1px");
	optionGroupFullfillOn.setHeight("-1px");
	optionGroupFullfillOn.setInvalidAllowed(false);
	optionGroupFullfillOn.setRequired(true);
	mainLayout.addComponent(optionGroupFullfillOn);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 19
Source File: ServerDescBasic.java    From primecloud-controller with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void attach() {
    setHeight("100%");
    addStyleName(Reindeer.PANEL_LIGHT);

    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(false);
    layout.addStyleName("server-desc-basic");

    HorizontalLayout layout2 = new HorizontalLayout();
    layout2.setWidth("100%");
    layout2.setHeight("100%");
    layout2.setMargin(true);
    layout2.setSpacing(true);
    layout2.addStyleName("server-desc-basic");

    // サーバ基本情報
    left = new BasicInfo();
    left.setWidth("100%");
    layout2.addComponent(left);

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");
    layout2.addComponent(padding);

    Label padding2 = new Label("");
    padding2.setWidth("1px");
    layout2.addComponent(padding2);

    // 割り当てサービス
    String enableService = Config.getProperty("ui.enableService");
    if (enableService == null || BooleanUtils.toBoolean(enableService)) {
        right = new AttachService();
        right.setHeight("100%");
        right.setWidth("100%");
        layout2.addComponent(right);
    }

    layout2.setExpandRatio(left, 40);
    if (right != null) {
        layout2.setExpandRatio(right, 60);
    } else {
        VerticalLayout dummyLayout = new VerticalLayout();
        dummyLayout.setSizeFull();
        layout2.addComponent(dummyLayout);
        layout2.setExpandRatio(dummyLayout, 60);
    }

    layout.addComponent(layout2);
    layout.setExpandRatio(layout2, 1.0f);
}
 
Example 20
Source File: AbstractView.java    From cia with Apache License 2.0 3 votes vote down vote up
/**
 * Creates the full size vertical layout.
 *
 * @param margin
 *            the margin
 * @param spacing
 *            the spacing
 * @return the vertical layout
 */
private static VerticalLayout createFullSizeVerticalLayout(final boolean margin, final boolean spacing) {
	final VerticalLayout layout = new VerticalLayout();
	layout.setMargin(margin);
	layout.setSpacing(spacing);
	layout.setWidth(100, Unit.PERCENTAGE);
	layout.setHeight(100, Unit.PERCENTAGE);
	return layout;
}