Java Code Examples for com.vaadin.ui.HorizontalLayout#setHeight()

The following examples show how to use com.vaadin.ui.HorizontalLayout#setHeight() . 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: AbstractGridHeader.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private void buildLayout() {
    final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout();
    titleFilterIconsLayout.addComponents(headerCaptionLayout);

    if (isAllowSearch() && isRollout()) {
        titleFilterIconsLayout.addComponents(searchField, searchResetIcon);
        titleFilterIconsLayout.setExpandRatio(headerCaptionLayout, 0.3F);
        titleFilterIconsLayout.setExpandRatio(searchField, 0.7F);
    }
    if (hasCreatePermission() && isRollout()) {
        titleFilterIconsLayout.addComponent(addButton);
        titleFilterIconsLayout.setComponentAlignment(addButton, Alignment.TOP_LEFT);
    }
    if (showCloseButton()) {
        titleFilterIconsLayout.addComponent(closeButton);
        titleFilterIconsLayout.setComponentAlignment(closeButton, Alignment.TOP_RIGHT);
    }

    titleFilterIconsLayout.setHeight("40px");
    addComponent(titleFilterIconsLayout);
    addStyleName("bordered-layout");
    addStyleName("no-border-bottom");
}
 
Example 2
Source File: TargetFilterHeader.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private void buildLayout() {
    final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout();
    titleFilterIconsLayout.addComponents(headerCaption, searchField, searchResetIcon);
    if (permissionChecker.hasCreateTargetPermission()) {
        titleFilterIconsLayout.addComponent(createfilterButton);
        titleFilterIconsLayout.setComponentAlignment(createfilterButton, Alignment.TOP_LEFT);
    }
    titleFilterIconsLayout.setExpandRatio(headerCaption, 0.3F);
    titleFilterIconsLayout.setExpandRatio(searchField, 0.7F);
    titleFilterIconsLayout.setHeight("40px");
    addComponent(titleFilterIconsLayout);
    addStyleName("bordered-layout");
    addStyleName("no-border-bottom");

}
 
Example 3
Source File: ChipsterAdminUI.java    From chipster with MIT License 5 votes vote down vote up
private void buildMainLayout() {

		this.getPage().setTitle("Chipster admin");
		horizontalSplit = new HorizontalLayout();
		horizontalSplit.setSizeFull();

		setContent(horizontalSplit);
		horizontalSplit.setHeight(100, Unit.PERCENTAGE);
		showEmtpyView();	
	}
 
Example 4
Source File: AbstractMetadataPopupLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private void buildLayout() {
    final HorizontalLayout headerLayout = new HorizontalLayout();
    headerLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
    headerLayout.setSpacing(false);
    headerLayout.setMargin(false);
    headerLayout.setSizeFull();
    headerLayout.addComponent(headerCaption);
    if (hasCreatePermission()) {
        headerLayout.addComponents(addIcon);
        headerLayout.setComponentAlignment(addIcon, Alignment.MIDDLE_RIGHT);
    }
    headerLayout.setExpandRatio(headerCaption, 1.0F);

    final HorizontalLayout headerWrapperLayout = new HorizontalLayout();
    headerWrapperLayout.addStyleName("bordered-layout" + " " + "no-border-bottom" + " " + "metadata-table-margin");
    headerWrapperLayout.addComponent(headerLayout);
    headerWrapperLayout.setWidth("100%");
    headerLayout.setHeight("30px");

    final VerticalLayout tableLayout = new VerticalLayout();
    tableLayout.setSizeFull();
    tableLayout.setHeight("100%");
    tableLayout.addComponent(headerWrapperLayout);
    tableLayout.addComponent(metaDataGrid);
    tableLayout.addStyleName("table-layout");
    tableLayout.setExpandRatio(metaDataGrid, 1.0F);

    final VerticalLayout metadataFieldsLayout = createMetadataFieldsLayout();

    mainLayout = new HorizontalLayout();
    mainLayout.addComponent(tableLayout);
    mainLayout.addComponent(metadataFieldsLayout);
    mainLayout.setExpandRatio(tableLayout, 0.5F);
    mainLayout.setExpandRatio(metadataFieldsLayout, 0.5F);
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    setCompositionRoot(mainLayout);
    setSizeFull();
}
 
Example 5
Source File: AbstractPageModContentFactoryImpl.java    From cia with Apache License 2.0 5 votes vote down vote up
/**
 * Creates the page visit history.
 *
 * @param pageName
 *            the page name
 * @param pageId
 *            the page id
 * @param panelContent
 *            the panel content
 */
protected final void createPageVisitHistory(final String pageName, final String pageId,
		final VerticalLayout panelContent) {

	final TabSheet tabsheet = new TabSheet();
	tabsheet.setWidth(100, Unit.PERCENTAGE);
	tabsheet.setHeight(100, Unit.PERCENTAGE);

	panelContent.addComponent(tabsheet);
	panelContent.setExpandRatio(tabsheet, ContentRatio.LARGE);

	final HorizontalLayout tabContentPageItemRankHistory = new HorizontalLayout();
	tabContentPageItemRankHistory.setWidth(100, Unit.PERCENTAGE);
	tabContentPageItemRankHistory.setHeight(100, Unit.PERCENTAGE);
	final Tab tabPageItemRankHistory = tabsheet.addTab(tabContentPageItemRankHistory);

	tabPageItemRankHistory.setCaption(CURRENT_PAGE_VISIT_HISTORY);
	adminChartDataManager.createApplicationActionEventPageElementDailySummaryChart(tabContentPageItemRankHistory,
			pageName, pageId);

	final HorizontalLayout tabContentPageModeSummary = new HorizontalLayout();
	tabContentPageModeSummary.setWidth(100, Unit.PERCENTAGE);
	tabContentPageModeSummary.setHeight(100, Unit.PERCENTAGE);
	final Tab tabPageModeSummary = tabsheet.addTab(tabContentPageModeSummary);
	tabPageModeSummary.setCaption(GENERAL_PAGE_MODE_PAGE_VISIT);

	adminChartDataManager.createApplicationActionEventPageModeDailySummaryChart(tabContentPageModeSummary,
			pageName);

}
 
Example 6
Source File: AbstractChartDataManagerImpl.java    From cia with Apache License 2.0 5 votes vote down vote up
/**
 * Adds the chart.
 *
 * @param content
 *            the content
 * @param caption
 *            the caption
 * @param chart
 *            the chart
 * @param fullPage
 *            the full page
 */
protected final void addChart(final AbstractOrderedLayout content,final String caption, final DCharts chart, final boolean fullPage) {
	final HorizontalLayout horizontalLayout = new HorizontalLayout();

	final int browserWindowWidth = getChartWindowWidth();

	final int browserWindowHeight = getChartWindowHeight(fullPage);

	horizontalLayout.setWidth(browserWindowWidth, Unit.PIXELS);
	horizontalLayout.setHeight(browserWindowHeight, Unit.PIXELS);
	horizontalLayout.setMargin(true);
	horizontalLayout.setSpacing(false);
	horizontalLayout.addStyleName("v-layout-content-overview-panel-level1");

	final Panel formPanel = new Panel();
	formPanel.setSizeFull();
	formPanel.setContent(horizontalLayout);
	formPanel.setCaption(caption);

	content.addComponent(formPanel);
	content.setExpandRatio(formPanel, ContentRatio.LARGE);


	chart.setWidth(100, Unit.PERCENTAGE);
	chart.setHeight(100, Unit.PERCENTAGE);
	chart.setMarginRight(CHART_RIGHT_MARGIN);
	chart.setMarginLeft(CHART_LEFT_MARGIN);
	chart.setMarginBottom(CHART_BOTTOM_MARGIN_SIZE);
	chart.setMarginTop(CHART_TOP_MARGIN_SIZE);

	horizontalLayout.addComponent(chart);
	chart.setCaption(caption);
}
 
Example 7
Source File: AttributeStandardSelectorComponent.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_2() {
	// common part: create layout
	horizontalLayout_2 = new HorizontalLayout();
	horizontalLayout_2.setImmediate(false);
	horizontalLayout_2.setWidth("-1px");
	horizontalLayout_2.setHeight("-1px");
	horizontalLayout_2.setMargin(false);
	horizontalLayout_2.setSpacing(true);
	
	// tableAttributes
	tableAttributes = new Table();
	tableAttributes.setCaption("Standard Attributes");
	tableAttributes.setImmediate(false);
	tableAttributes.setWidth("-1px");
	tableAttributes.setHeight("-1px");
	tableAttributes.setInvalidAllowed(false);
	tableAttributes.setRequired(true);
	horizontalLayout_2.addComponent(tableAttributes);
	
	// tableDatatypes
	tableDatatypes = new Table();
	tableDatatypes.setCaption("Standard Data Types");
	tableDatatypes.setImmediate(false);
	tableDatatypes.setWidth("-1px");
	tableDatatypes.setHeight("-1px");
	tableDatatypes.setInvalidAllowed(false);
	tableDatatypes.setRequired(true);
	horizontalLayout_2.addComponent(tableDatatypes);
	
	return horizontalLayout_2;
}
 
Example 8
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 9
Source File: RangeEditorComponent.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// comboBoxMin
	comboBoxMin = new ComboBox();
	comboBoxMin.setCaption("Minimum Type");
	comboBoxMin.setImmediate(true);
	comboBoxMin.setDescription("Select the type for the minimum.");
	comboBoxMin.setWidth("-1px");
	comboBoxMin.setHeight("-1px");
	horizontalLayout_1.addComponent(comboBoxMin);
	
	// textFieldMin
	textFieldMin = new TextField();
	textFieldMin.setCaption("Minimum Value");
	textFieldMin.setImmediate(true);
	textFieldMin.setDescription("Enter a value for the minimum.");
	textFieldMin.setWidth("-1px");
	textFieldMin.setHeight("-1px");
	textFieldMin.setInvalidAllowed(false);
	textFieldMin.setInputPrompt("eg. 1");
	horizontalLayout_1.addComponent(textFieldMin);
	horizontalLayout_1
			.setComponentAlignment(textFieldMin, new Alignment(9));
	
	return horizontalLayout_1;
}
 
Example 10
Source File: AttributeSelectionWindow.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");
	
	// horizontalLayout_1
	horizontalLayout_1 = buildHorizontalLayout_1();
	mainLayout.addComponent(horizontalLayout_1);
	
	// horizontalLayoutAttribute
	horizontalLayoutAttribute = new HorizontalLayout();
	horizontalLayoutAttribute.setImmediate(false);
	horizontalLayoutAttribute.setWidth("-1px");
	horizontalLayoutAttribute.setHeight("-1px");
	horizontalLayoutAttribute.setMargin(false);
	mainLayout.addComponent(horizontalLayoutAttribute);
	mainLayout.setExpandRatio(horizontalLayoutAttribute, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Select");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 11
Source File: ServerDescDetail.java    From primecloud-controller with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void attach() {
    setHeight("100%");
    addStyleName(Reindeer.PANEL_LIGHT);

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

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

    left = new DetailInfo();
    left.setWidth("200px");
    layout.addComponent(left);

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

    layout.setExpandRatio(right, 100);

    panel.addComponent(layout);
    panel.setExpandRatio(layout, 1.0f);
}
 
Example 12
Source File: OldLoginView.java    From gazpachoquest with GNU General Public License v3.0 4 votes vote down vote up
public OldLoginView() {
    setSizeFull();

    // Language bar in the top-right corner for selecting
    // invitation interface language
    final HorizontalLayout languageBar = new HorizontalLayout();
    languageBar.setHeight("50px");
    // addComponent(languageBar);
    // setComponentAlignment(languageBar, Alignment.TOP_RIGHT);

    // Allow selecting a language. We are in a constructor of a
    // CustomComponent, so preselecting the current
    // language of the application can not be done before
    // this (and the selection) component are attached to
    // the application.
    final ComboBox languageSelector = new ComboBox("Select a language") {
        @Override
        public void attach() {
            super.attach();
            // setValue(getLocale());
        }
    };

    // for (int i=0; i<locales.length; i++) {
    String locale = "es";
    languageSelector.addItem(locale);
    languageSelector.setItemCaption(locale, "español");

    // Automatically select the current locale
    // if (locales[i].equals(getLocale()))
    languageSelector.setValue(locale);

    // }

    // Create the invitation input field
    invitationTextField = new TextField("Invitation key:");
    invitationTextField.setWidth("300px");
    invitationTextField.setRequired(true);
    invitationTextField.setInputPrompt("Your questionnair invitation key (eg. 12345678)");
    invitationTextField.setInvalidAllowed(false);

    // Create login button
    enterButton = new Button("Enter", this);

    // Add both to a panel
    VerticalLayout fields = new VerticalLayout(languageSelector, invitationTextField, enterButton);
    fields.setCaption("Please enter your invitation key to access the questionnair");
    fields.setSpacing(true);
    fields.setMargin(new MarginInfo(true, true, true, false));
    fields.setSizeUndefined();

    // The view root layout
    VerticalLayout viewLayout = new VerticalLayout(fields);
    viewLayout.setSizeFull();
    viewLayout.setComponentAlignment(fields, Alignment.MIDDLE_CENTER);
    viewLayout.setStyleName(Reindeer.LAYOUT_BLUE);
    setCompositionRoot(viewLayout);
}
 
Example 13
Source File: ObadviceDictionary.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(false);
	horizontalLayoutToolbar.setSpacing(true);
	
	// buttonNew
	buttonNew = new Button();
	buttonNew.setCaption("New");
	buttonNew.setImmediate(true);
	buttonNew
			.setDescription("Add a new advice or obligation to the dictionary.");
	buttonNew.setWidth("-1px");
	buttonNew.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonNew);
	horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(
			24));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove
			.setDescription("Remove the selected advice or obligation from the dictionary.");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	horizontalLayoutToolbar.setComponentAlignment(buttonRemove,
			new Alignment(24));
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(true);
	buttonClone.setDescription("Clone the selected obligation/advice.");
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	horizontalLayoutToolbar.setComponentAlignment(buttonClone,
			new Alignment(24));
	
	// comboBoxFilter
	comboBoxFilter = new ComboBox();
	comboBoxFilter.setCaption("Filter By Type");
	comboBoxFilter.setImmediate(false);
	comboBoxFilter.setWidth("-1px");
	comboBoxFilter.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilter);
	
	return horizontalLayoutToolbar;
}
 
Example 14
Source File: ApplyEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter A Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("50.0%");
	textAreaDescription.setHeight("-1px");
	horizontalLayout_1.addComponent(textAreaDescription);
	
	// textFieldFilter
	textFieldFilter = new TextField();
	textFieldFilter.setCaption("Filter Function By ID");
	textFieldFilter.setImmediate(false);
	textFieldFilter.setWidth("-1px");
	textFieldFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(textFieldFilter);
	horizontalLayout_1.setComponentAlignment(textFieldFilter,
			new Alignment(9));
	
	// comboBoxDatatypeFilter
	comboBoxDatatypeFilter = new ComboBox();
	comboBoxDatatypeFilter.setCaption("Filter By Data Type");
	comboBoxDatatypeFilter.setImmediate(false);
	comboBoxDatatypeFilter.setWidth("-1px");
	comboBoxDatatypeFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
	horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter,
			new Alignment(9));
	
	// checkBoxFilterIsBag
	checkBoxFilterIsBag = new CheckBox();
	checkBoxFilterIsBag.setCaption("Is Bag Filter");
	checkBoxFilterIsBag.setImmediate(false);
	checkBoxFilterIsBag.setWidth("-1px");
	checkBoxFilterIsBag.setHeight("-1px");
	horizontalLayout_1.addComponent(checkBoxFilterIsBag);
	horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag,
			new Alignment(9));
	
	return horizontalLayout_1;
}
 
Example 15
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 16
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 17
Source File: EnumerationEditorComponent.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// buttonAdd
	buttonAdd = new Button();
	buttonAdd.setCaption("Add");
	buttonAdd.setImmediate(true);
	buttonAdd.setDescription("Add a new enumeration value.");
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonAdd);
	horizontalLayout_1.setComponentAlignment(buttonAdd, new Alignment(9));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove the selected enumeration value.");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonRemove);
	horizontalLayout_1.setComponentAlignment(buttonRemove,
			new Alignment(10));
	
	// buttonClearAll
	buttonClearAll = new Button();
	buttonClearAll.setCaption("Clear All");
	buttonClearAll.setImmediate(false);
	buttonClearAll.setDescription("Clears all the values out.");
	buttonClearAll.setWidth("-1px");
	buttonClearAll.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonClearAll);
	
	return horizontalLayout_1;
}
 
Example 18
Source File: ServiceDescBasic.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("service-desc-basic");
    setContent(layout);

    // サービス基本情報
    VerticalLayout leftLayout = new VerticalLayout();
    leftLayout.setMargin(false);
    leftLayout.setSpacing(false);
    leftLayout.setWidth("100%");
    leftLayout.setHeight("100%");

    left = new BasicInfoOpe();
    left.setWidth("100%");
    leftLayout.addComponent(left);
    leftLayout.setExpandRatio(left, 1.0f);
    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.setMargin(false);
    rightLayout.setSpacing(false);
    rightLayout.setWidth("100%");
    rightLayout.setHeight("100%");

    right = new AttachServersOpe();
    right.setWidth("100%");
    rightLayout.addComponent(right);
    serverOpe = new ServiceSvrOperation();
    rightLayout.addComponent(serverOpe);
    rightLayout.setExpandRatio(right, 1.0f);
    layout.addComponent(rightLayout);

    layout.setExpandRatio(leftLayout, 40);
    layout.setExpandRatio(rightLayout, 60);
}
 
Example 19
Source File: PIPParameterComponent.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// buttonAdd
	buttonAdd = new Button();
	buttonAdd.setCaption("Add");
	buttonAdd.setImmediate(false);
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonAdd);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(false);
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonRemove);
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(false);
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonClone);
	
	// buttonClear
	buttonClear = new Button();
	buttonClear.setCaption("Clear All");
	buttonClear.setImmediate(false);
	buttonClear.setWidth("-1px");
	buttonClear.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonClear);
	
	return horizontalLayout_1;
}
 
Example 20
Source File: PolicyEditor.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(true);
	horizontalLayoutToolbar.setSpacing(true);
	
	// checkBoxReadOnly
	checkBoxReadOnly = new CheckBox();
	checkBoxReadOnly.setCaption("Read Only");
	checkBoxReadOnly.setImmediate(false);
	checkBoxReadOnly
			.setDescription("Check this to turn-off policy editing.");
	checkBoxReadOnly.setWidth("-1px");
	checkBoxReadOnly.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(checkBoxReadOnly);
	
	// checkBoxAutoSave
	checkBoxAutoSave = new CheckBox();
	checkBoxAutoSave.setCaption("Auto Save");
	checkBoxAutoSave.setImmediate(false);
	checkBoxAutoSave
			.setDescription("Check this to turn-on automatic saving of policy when a change occurs.");
	checkBoxAutoSave.setWidth("-1px");
	checkBoxAutoSave.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(checkBoxAutoSave);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setDescription("Click to save the policy.");
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonSave);
	
	// buttonViewXML
	buttonViewXML = new Button();
	buttonViewXML.setCaption("View XML");
	buttonViewXML.setImmediate(true);
	buttonViewXML.setWidth("-1px");
	buttonViewXML.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonViewXML);
	
	// buttonExport
	buttonExport = new Button();
	buttonExport.setCaption("Export Policy");
	buttonExport.setImmediate(false);
	buttonExport.setWidth("-1px");
	buttonExport.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonExport);
	
	return horizontalLayoutToolbar;
}