Java Code Examples for com.vaadin.ui.Button#setWidth()

The following examples show how to use com.vaadin.ui.Button#setWidth() . 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: SelectPIPConfigurationWindow.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");
	
	// table
	table = new Table();
	table.setCaption("PIP Configurations");
	table.setImmediate(false);
	table.setWidth("-1px");
	table.setHeight("-1px");
	mainLayout.addComponent(table);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 2
Source File: GitSynchronizeWindow.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");
	
	// textAreaResults
	textAreaResults = new TextArea();
	textAreaResults.setCaption("Synch Results");
	textAreaResults.setImmediate(false);
	textAreaResults.setWidth("462px");
	textAreaResults.setHeight("222px");
	mainLayout.addComponent(textAreaResults);
	
	// buttonSynchronize
	buttonSynchronize = new Button();
	buttonSynchronize.setCaption("Synchronize");
	buttonSynchronize.setImmediate(true);
	buttonSynchronize.setWidth("-1px");
	buttonSynchronize.setHeight("-1px");
	mainLayout.addComponent(buttonSynchronize);
	mainLayout.setComponentAlignment(buttonSynchronize, new Alignment(24));
	
	return mainLayout;
}
 
Example 3
Source File: ExpressionSelectionWindow.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");
	
	// optionGroupExpression
	optionGroupExpression = new OptionGroup();
	optionGroupExpression
			.setCaption("Select One Of The Following Types of Expressions");
	optionGroupExpression.setImmediate(false);
	optionGroupExpression.setWidth("-1px");
	optionGroupExpression.setHeight("-1px");
	mainLayout.addComponent(optionGroupExpression);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Select");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(24));
	
	return mainLayout;
}
 
Example 4
Source File: PolicyWorkspace.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutLeftToolbarLeft() {
	// common part: create layout
	horizontalLayoutLeftToolbarLeft = new HorizontalLayout();
	horizontalLayoutLeftToolbarLeft.setImmediate(false);
	horizontalLayoutLeftToolbarLeft.setWidth("-1px");
	horizontalLayoutLeftToolbarLeft.setHeight("-1px");
	horizontalLayoutLeftToolbarLeft.setMargin(false);
	horizontalLayoutLeftToolbarLeft.setSpacing(true);
	
	// buttonSynchronize
	buttonSynchronize = new Button();
	buttonSynchronize.setCaption("Synchronize Repository");
	buttonSynchronize.setImmediate(true);
	buttonSynchronize
			.setDescription("Synchronize local repository with main branch.");
	buttonSynchronize.setWidth("-1px");
	buttonSynchronize.setHeight("-1px");
	horizontalLayoutLeftToolbarLeft.addComponent(buttonSynchronize);
	
	// buttonExport
	buttonExport = new Button();
	buttonExport.setCaption("Export Workspace");
	buttonExport.setImmediate(true);
	buttonExport.setDescription("Export your workspace to your local drive.");
	buttonExport.setWidth("-1px");
	buttonExport.setHeight("-1px");
	horizontalLayoutLeftToolbarLeft.addComponent(buttonExport);
	
	return horizontalLayoutLeftToolbarLeft;
}
 
Example 5
Source File: RunnersLayout.java    From usergrid with Apache License 2.0 5 votes vote down vote up
private void addRefreshButton()  {

        Button button = new Button( "Refresh" );
        button.setWidth( "100px" );

        button.addClickListener( new Button.ClickListener() {
            public void buttonClick( Button.ClickEvent event ) {
                loadData();
            }
        });

        addComponent( button );
        this.setComponentAlignment( button, Alignment.BOTTOM_CENTER );
    }
 
Example 6
Source File: SelectWorkspacePoliciesWindow.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");
	
	// treeWorkspace
	treeWorkspace = new TreeTable();
	treeWorkspace.setCaption("Select Policy(s) for PDP Group");
	treeWorkspace.setImmediate(true);
	treeWorkspace.setWidth("100.0%");
	treeWorkspace.setHeight("-1px");
	mainLayout.addComponent(treeWorkspace);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 7
Source File: ApplyEditorWindow.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);
	
	// tableFunction
	tableFunction = new Table();
	tableFunction.setCaption("Select A Function");
	tableFunction.setImmediate(false);
	tableFunction.setWidth("100.0%");
	tableFunction.setHeight("-1px");
	tableFunction.setInvalidAllowed(false);
	tableFunction.setRequired(true);
	mainLayout.addComponent(tableFunction);
	mainLayout.setExpandRatio(tableFunction, 1.0f);
	
	// buttonSelect
	buttonSelect = new Button();
	buttonSelect.setCaption("Select and Continue");
	buttonSelect.setImmediate(true);
	buttonSelect.setWidth("-1px");
	buttonSelect.setHeight("-1px");
	mainLayout.addComponent(buttonSelect);
	mainLayout.setComponentAlignment(buttonSelect, new Alignment(48));
	
	return mainLayout;
}
 
Example 8
Source File: MatchEditorWindow.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");
	
	// tableFunctions
	tableFunctions = new Table();
	tableFunctions.setCaption("Function");
	tableFunctions.setImmediate(true);
	tableFunctions
			.setDescription("Select a function for matching the attribute.");
	tableFunctions.setWidth("100.0%");
	tableFunctions.setHeight("-1px");
	tableFunctions.setInvalidAllowed(false);
	tableFunctions.setRequired(true);
	mainLayout.addComponent(tableFunctions);
	mainLayout.setExpandRatio(tableFunctions, 1.0f);
	
	// 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 9
Source File: AbstractMenuItemFactoryImpl.java    From cia with Apache License 2.0 5 votes vote down vote up
/**
 * Creates the button link.
 *
 * @param row
 *            the panel content
 * @param linkText
 *            the link text
 * @param icon
 *            the icon
 * @param command
 *            the command
 * @param description
 *            the description
 */
protected final void createButtonLink(final ResponsiveRow row,final String linkText,final Resource icon, final ClickListener command, final String description) {
	final CssLayout layout = new CssLayout();
	layout.addStyleName("v-layout-content-overview-panel-level2");
	Responsive.makeResponsive(layout);
	layout.setSizeUndefined();


	final Button button = new Button(linkText);
	Responsive.makeResponsive(button);
	button.setStyleName(LINK_STYLE_NAME);
	button.addStyleName("title");
	button.addClickListener(command);
	button.setIcon(icon);
	button.setWidth(100, Unit.PERCENTAGE);


	layout.addComponent(button);

	final Label descriptionLabel = new Label(description);
	descriptionLabel.addStyleName("itembox");
	Responsive.makeResponsive(descriptionLabel);
	descriptionLabel.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(descriptionLabel);

	row.addColumn().withDisplayRules(DISPLAY_SIZE_XS_DEVICE,DISPLAYS_SIZE_XM_DEVICE,DISPLAY_SIZE_MD_DEVICE,DISPLAY_SIZE_LG_DEVICE).withComponent(layout);
}
 
Example 10
Source File: UserManagement.java    From XACML with MIT License 5 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);
	
	// buttonAdd
	buttonAdd = new Button();
	buttonAdd.setCaption("Add User");
	buttonAdd.setImmediate(false);
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonAdd);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove User");
	buttonRemove.setImmediate(false);
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	
	return horizontalLayoutToolbar;
}
 
Example 11
Source File: ExpressionBuilderComponent.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("-1px");
	setHeight("-1px");
	
	// horizontalLayout_1
	horizontalLayout_1 = buildHorizontalLayout_1();
	mainLayout.addComponent(horizontalLayout_1);
	mainLayout.setExpandRatio(horizontalLayout_1, 1.0f);
	
	// treeExpressions
	treeExpressions = new TreeTable();
	treeExpressions.setImmediate(false);
	treeExpressions.setWidth("100.0%");
	treeExpressions.setHeight("-1px");
	mainLayout.addComponent(treeExpressions);
	mainLayout.setExpandRatio(treeExpressions, 1.0f);
	
	// 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 12
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 13
Source File: ObligationAdviceEditorWindow.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("-1px");
	setHeight("-1px");
	
	// horizontalLayout_1
	horizontalLayout_1 = buildHorizontalLayout_1();
	mainLayout.addComponent(horizontalLayout_1);
	
	// tableExpressions
	tableExpressions = new TreeTable();
	tableExpressions.setCaption("Expressions");
	tableExpressions.setImmediate(false);
	tableExpressions.setWidth("100%");
	tableExpressions.setHeight("-1px");
	mainLayout.addComponent(tableExpressions);
	mainLayout.setExpandRatio(tableExpressions, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 14
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 15
Source File: AttributeAssignmentExpressionEditorWindow.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");
	
	// textFieldAttributeID
	textFieldAttributeID = new TextField();
	textFieldAttributeID.setCaption("Attribute Assignment ID");
	textFieldAttributeID.setImmediate(false);
	textFieldAttributeID.setWidth("-1px");
	textFieldAttributeID.setHeight("-1px");
	textFieldAttributeID.setInvalidAllowed(false);
	textFieldAttributeID.setRequired(true);
	mainLayout.addComponent(textFieldAttributeID);
	
	// textFieldIssuer
	textFieldIssuer = new TextField();
	textFieldIssuer.setCaption("Issuer (Optional)");
	textFieldIssuer.setImmediate(false);
	textFieldIssuer.setWidth("-1px");
	textFieldIssuer.setHeight("-1px");
	textFieldIssuer.setNullSettingAllowed(true);
	mainLayout.addComponent(textFieldIssuer);
	
	// tableCategories
	tableCategories = new Table();
	tableCategories.setCaption("Category (Optional)");
	tableCategories.setImmediate(false);
	tableCategories.setWidth("100.0%");
	tableCategories.setHeight("-1px");
	mainLayout.addComponent(tableCategories);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 16
Source File: PIPManagement.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);
	
	// buttonAdd
	buttonAdd = new Button();
	buttonAdd.setCaption("Add Configuration");
	buttonAdd.setImmediate(true);
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonAdd);
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone Configuration");
	buttonClone.setImmediate(true);
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove Configuration");
	buttonRemove.setImmediate(true);
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	
	// buttonImport
	buttonImport = new Button();
	buttonImport.setCaption("Import Configuration");
	buttonImport.setImmediate(false);
	buttonImport
			.setDescription("Imports a configuration from a properties file.");
	buttonImport.setWidth("-1px");
	buttonImport.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonImport);
	
	return horizontalLayoutToolbar;
}
 
Example 17
Source File: PolicyEditorWindow.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");
	
	// labelID
	labelID = new Label();
	labelID.setCaption("Policy Set ID");
	labelID.setImmediate(false);
	labelID.setWidth("100.0%");
	labelID.setHeight("-1px");
	labelID.setValue("Label");
	mainLayout.addComponent(labelID);
	
	// textFieldVersion
	textFieldVersion = new TextField();
	textFieldVersion.setCaption("Version");
	textFieldVersion.setImmediate(false);
	textFieldVersion
			.setDescription("The format is numbers only separated by decimal point.");
	textFieldVersion.setWidth("-1px");
	textFieldVersion.setHeight("-1px");
	textFieldVersion.setInvalidAllowed(false);
	textFieldVersion.setRequired(true);
	textFieldVersion.setInputPrompt("Eg. 1 or 1.0 or 1.0.0 etc.");
	mainLayout.addComponent(textFieldVersion);
	
	// listSelectAlgorithm
	listSelectAlgorithm = new ListSelect();
	listSelectAlgorithm.setCaption("Policy Combining Algorithm");
	listSelectAlgorithm.setImmediate(false);
	listSelectAlgorithm.setWidth("100.0%");
	listSelectAlgorithm.setHeight("-1px");
	listSelectAlgorithm.setInvalidAllowed(false);
	listSelectAlgorithm.setRequired(true);
	mainLayout.addComponent(listSelectAlgorithm);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// 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 18
Source File: RuleEditorWindow.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");
	
	// labelRuleID
	labelRuleID = new Label();
	labelRuleID.setCaption("Rule ID");
	labelRuleID.setImmediate(false);
	labelRuleID.setWidth("100.0%");
	labelRuleID.setHeight("-1px");
	labelRuleID.setValue("Label");
	mainLayout.addComponent(labelRuleID);
	mainLayout.setExpandRatio(labelRuleID, 1.0f);
	
	// optionGroupEffect
	optionGroupEffect = new OptionGroup();
	optionGroupEffect.setCaption("Choose the effect.");
	optionGroupEffect.setImmediate(false);
	optionGroupEffect.setWidth("-1px");
	optionGroupEffect.setHeight("-1px");
	optionGroupEffect.setInvalidAllowed(false);
	optionGroupEffect.setRequired(true);
	mainLayout.addComponent(optionGroupEffect);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter a description for the Rule.");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	textAreaDescription.setNullSettingAllowed(true);
	textAreaDescription.setNullRepresentation("");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// 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: EditPDPWindow.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");
	
	// textId
	textId = new TextField();
	textId.setCaption("PDP URL");
	textId.setImmediate(false);
	textId.setDescription("The URL is the ID of the PDP");
	textId.setWidth("-1px");
	textId.setHeight("-1px");
	textId.setRequired(true);
	textId.setInputPrompt("Eg. http://localhost:8080/pdp");
	mainLayout.addComponent(textId);
	
	// textName
	textName = new TextField();
	textName.setCaption("PDP Name");
	textName.setImmediate(false);
	textName.setWidth("-1px");
	textName.setHeight("-1px");
	mainLayout.addComponent(textName);
	
	// textDescription
	textDescription = new TextArea();
	textDescription.setCaption("PDP Description");
	textDescription.setImmediate(false);
	textDescription.setWidth("100.0%");
	textDescription.setHeight("-1px");
	textDescription.setNullSettingAllowed(true);
	mainLayout.addComponent(textDescription);
	mainLayout.setExpandRatio(textDescription, 1.0f);
	
	// 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 20
Source File: AttributeDictionary.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("Create a new attribute");
	buttonNew.setWidth("70px");
	buttonNew.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonNew);
	horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(
			9));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove the selected attribute(s)");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	horizontalLayoutToolbar.setComponentAlignment(buttonRemove,
			new Alignment(9));
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(true);
	buttonClone.setDescription("Clone an attribute.");
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	horizontalLayoutToolbar.setComponentAlignment(buttonClone,
			new Alignment(9));
	
	// comboBoxFilterCategory
	comboBoxFilterCategory = new ComboBox();
	comboBoxFilterCategory.setCaption("Filter By Category");
	comboBoxFilterCategory.setImmediate(false);
	comboBoxFilterCategory.setWidth("-1px");
	comboBoxFilterCategory.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilterCategory);
	
	// comboBoxFilterDatatype
	comboBoxFilterDatatype = new ComboBox();
	comboBoxFilterDatatype.setCaption("Filter By Data Type");
	comboBoxFilterDatatype.setImmediate(false);
	comboBoxFilterDatatype.setWidth("-1px");
	comboBoxFilterDatatype.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilterDatatype);
	
	return horizontalLayoutToolbar;
}