本文整理汇总了Java中com.vaadin.ui.PasswordField.setWidth方法的典型用法代码示例。如果您正苦于以下问题:Java PasswordField.setWidth方法的具体用法?Java PasswordField.setWidth怎么用?Java PasswordField.setWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.PasswordField
的用法示例。
在下文中一共展示了PasswordField.setWidth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initPasswordFields
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
protected void initPasswordFields() {
inputGrid = new GridLayout(2, 2);
inputGrid.setSpacing(true);
layout.addComponent(inputGrid);
layout.setComponentAlignment(inputGrid, Alignment.MIDDLE_CENTER);
Label newPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_NEW_PASSWORD));
inputGrid.addComponent(newPasswordLabel);
passwordField1 = new PasswordField();
passwordField1.setWidth(150, UNITS_PIXELS);
inputGrid.addComponent(passwordField1);
passwordField1.focus();
Label confirmPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_CONFIRM_PASSWORD));
inputGrid.addComponent(confirmPasswordLabel);
passwordField2 = new PasswordField();
passwordField2.setWidth(150, UNITS_PIXELS);
inputGrid.addComponent(passwordField2);
}
示例2: buildDialogLayout
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
@Override
protected void buildDialogLayout() {
FormLayout mainLayout = new FormLayout();
// top-level component properties
setWidth("100%");
setHeight("100%");
final PasswordField passwordField = new PasswordField(PASSWORD_LABEL, password);
passwordField.setWidth("100%");
mainLayout.addComponent(createTextField(VIRTUOSO_URL_LABEL, virtuosoUrl));
mainLayout.addComponent(createTextField(USERNAME_LABEL, username));
mainLayout.addComponent(passwordField);
mainLayout.addComponent(new CheckBox(CLEAR_DESTINATION_GRAPH_LABEL, clearDestinationGraph));
mainLayout.addComponent(createTextField(LOAD_DIRECTORY_PATH_LABEL, loadDirectoryPath));
mainLayout.addComponent(new CheckBox(INCLUDE_SUBDIRECTORIES_LABEL, includeSubdirectories));
mainLayout.addComponent(createTextField(LOAD_FILE_PATTERN_LABEL, loadFilePattern));
mainLayout.addComponent(createTextField(TARGET_CONTEXT_LABEL, targetContext));
mainLayout.addComponent(createTextField(STATUS_UPDATE_INTERVAL_LABEL, statusUpdateInterval));
mainLayout.addComponent(createTextField(THREAD_COUNT_LABEL, threadCount));
mainLayout.addComponent(new CheckBox(SKIP_ON_ERROR_LABEL, skipOnError));
setCompositionRoot(mainLayout);
}
示例3: init
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {
setSizeFull();
user = new TextField("User:");
user.setWidth("300px");
user.setRequiredIndicatorVisible(true);
password = new PasswordField("Password:");
password.setWidth("300px");
user.setRequiredIndicatorVisible(true);
password.setValue("");
VerticalLayout fields = new VerticalLayout(user, password, loginButton);
fields.setCaption("Please login to access the application");
fields.setSpacing(true);
fields.setMargin(new MarginInfo(true, true, true, false));
fields.setSizeUndefined();
VerticalLayout uiLayout = new VerticalLayout(fields);
uiLayout.setSizeFull();
uiLayout.setComponentAlignment(fields, Alignment.MIDDLE_CENTER);
setFocusedComponent(user);
setContent(uiLayout);
}
示例4: buildDialogLayout
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
@Override
protected void buildDialogLayout() {
setSizeFull();
final VerticalLayout mainLayout = new VerticalLayout();
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
mainLayout.setWidth("100%");
uri = new TextField(ctx.tr("FilesUploadVaadinDialog.uri"));
uri.setDescription(ctx.tr("FilesUploadVaadinDialog.uri.description"));
uri.setRequired(true);
uri.setRequiredError(ctx.tr("FilesUploadVaadinDialog.uri.required"));
uri.setWidth("100%");
mainLayout.addComponent(uri);
username = new TextField(ctx.tr("FilesUploadVaadinDialog.username"));
username.setWidth("75%");
mainLayout.addComponent(username);
password = new PasswordField(ctx.tr("FilesUploadVaadinDialog.password"));
password.setWidth("75%");
mainLayout.addComponent(password);
softFail = new CheckBox(ctx.tr("FilesUploadVaadinDialog.skip"));
softFail.setWidth("100%");
mainLayout.addComponent(softFail);
moveFiles = new CheckBox(ctx.tr("FilesUploadVaadinDialog.move"));
moveFiles.setWidth("100%");
mainLayout.addComponent(moveFiles);
setCompositionRoot(mainLayout);
}
示例5: buildForm
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
private void buildForm() {
username = new TextField("Username");
username.setWidth("100%");
username.setImmediate(true);
username.setValidationVisible(false);
username.setNullRepresentation("");
username.setRequired(true);
form.addComponent(username);
password = new PasswordField("Password");
password.setWidth("100%");
password.setImmediate(true);
password.setValidationVisible(false);
password.setNullRepresentation("");
password.setRequired(true);
form.addComponent(password);
firstName = new TextField("First name");
firstName.setWidth("100%");
firstName.setValidationVisible(false);
firstName.setNullRepresentation("");
firstName.setImmediate(true);
firstName.setRequired(true);
form.addComponent(firstName);
lastName = new TextField("Last name");
lastName.setWidth("100%");
lastName.setImmediate(true);
lastName.setNullRepresentation("");
lastName.setValidationVisible(false);
lastName.setRequired(true);
form.addComponent(lastName);
binder.bind(username, "username");
binder.bind(password, "password");
binder.bind(firstName, "firstName");
binder.bind(lastName, "lastName");
}
示例6: buildForm
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
private void buildForm() {
username = new TextField("Username");
username.setWidth("100%");
username.setImmediate(true);
username.setValidationVisible(false);
username.setNullRepresentation("");
form.addComponent(username);
password = new PasswordField("Password");
password.setWidth("100%");
password.setImmediate(true);
password.setValidationVisible(false);
password.setNullRepresentation("");
form.addComponent(password);
firstName = new TextField("First name");
firstName.setWidth("100%");
firstName.setValidationVisible(false);
firstName.setNullRepresentation("");
firstName.setImmediate(true);
form.addComponent(firstName);
lastName = new TextField("Last name");
lastName.setWidth("100%");
lastName.setImmediate(true);
lastName.setNullRepresentation("");
lastName.setValidationVisible(false);
form.addComponent(lastName);
binder.bind(username, "username");
binder.bind(password, "password");
binder.bind(firstName, "firstName");
binder.bind(lastName, "lastName");
}
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecuritySocial,代码行数:36,代码来源:SignupContent.java
示例7: bindPasswordField
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
public PasswordField bindPasswordField(AbstractLayout form, FieldGroup group, String fieldLabel, String fieldName)
{
PasswordField field = new SplitPasswordField(fieldLabel);
field.setWidth("100%");
field.setImmediate(true);
field.setNullRepresentation("");
field.setNullSettingAllowed(false);
field.setId(fieldLabel.replace(" ", ""));
addValueChangeListeners(field);
doBinding(group, fieldName, field);
form.addComponent(field);
return field;
}
示例8: buildLoginForm
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
private Component buildLoginForm() {
FormLayout loginForm = new FormLayout();
loginForm.addStyleName(DSTheme.LOGIN_FORM);
loginForm.setSizeUndefined();
loginForm.setMargin(false);
loginForm.setId("loginForm");
username = new TextField();
username.setValue("admin");
username.setId("username");
username.setWidth(15, Unit.EM);
loginForm.addComponent(username);
password = new PasswordField();
password.setId("password");
password.setWidth(15, Unit.EM);
loginForm.addComponent(password);
CssLayout buttons = new CssLayout();
buttons.setStyleName(DSTheme.LOGIN_BUTTON_LAYOUT);
loginForm.addComponent(buttons);
loginButton = new Button();
loginButton.setId("login");
loginButton.setDisableOnClick(true);
loginButton.addClickListener(e -> {
try {
login();
} finally {
loginButton.setEnabled(true);
}
});
buttons.addComponent(loginButton);
loginButton.setClickShortcut(ShortcutAction.KeyCode.ENTER);
loginButton.addStyleName(ValoTheme.BUTTON_FRIENDLY);
forgotPassword = new Button();
forgotPassword.setId("forgotPassword");
forgotPassword.addStyleName(ValoTheme.BUTTON_LINK);
// forgotPassword.addClickListener(e -> showNotification(new Notification("Hint: Try anything")));
buttons.addComponent(forgotPassword);
newUserButton = new Button();
newUserButton.setId("newUser");
newUserButton.addClickListener(e -> {
centeringLayout.removeAllComponents();
centeringLayout.addComponent(newUserForm);
centeringLayout.setComponentAlignment(newUserForm, Alignment.MIDDLE_CENTER);
});
buttons.addComponent(newUserButton);
return loginForm;
}
示例9: buildMainLayout
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
@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");
// comboBoxConnectionType
comboBoxConnectionType = new ComboBox();
comboBoxConnectionType.setCaption("Type of SQL Connection");
comboBoxConnectionType.setImmediate(false);
comboBoxConnectionType.setWidth("-1px");
comboBoxConnectionType.setHeight("-1px");
mainLayout.addComponent(comboBoxConnectionType);
// textFieldDataSource
textFieldDataSource = new TextField();
textFieldDataSource.setCaption("Data Source");
textFieldDataSource.setImmediate(false);
textFieldDataSource.setWidth("-1px");
textFieldDataSource.setHeight("-1px");
mainLayout.addComponent(textFieldDataSource);
mainLayout.setExpandRatio(textFieldDataSource, 1.0f);
// comboBoxSQLDriver
comboBoxSQLDriver = new ComboBox();
comboBoxSQLDriver.setCaption("JDBC Driver");
comboBoxSQLDriver.setImmediate(false);
comboBoxSQLDriver.setWidth("-1px");
comboBoxSQLDriver.setHeight("-1px");
mainLayout.addComponent(comboBoxSQLDriver);
mainLayout.setExpandRatio(comboBoxSQLDriver, 1.0f);
// textFieldConnectionURL
textFieldConnectionURL = new TextField();
textFieldConnectionURL.setCaption("Connection URL");
textFieldConnectionURL.setImmediate(false);
textFieldConnectionURL.setWidth("-1px");
textFieldConnectionURL.setHeight("-1px");
mainLayout.addComponent(textFieldConnectionURL);
mainLayout.setExpandRatio(textFieldConnectionURL, 1.0f);
// textFieldUser
textFieldUser = new TextField();
textFieldUser.setCaption("User");
textFieldUser.setImmediate(false);
textFieldUser.setWidth("-1px");
textFieldUser.setHeight("-1px");
mainLayout.addComponent(textFieldUser);
mainLayout.setExpandRatio(textFieldUser, 1.0f);
// textFieldPassword
textFieldPassword = new PasswordField();
textFieldPassword.setCaption("Password");
textFieldPassword.setImmediate(false);
textFieldPassword.setWidth("-1px");
textFieldPassword.setHeight("-1px");
mainLayout.addComponent(textFieldPassword);
mainLayout.setExpandRatio(textFieldPassword, 1.0f);
// buttonTest
buttonTest = new Button();
buttonTest.setCaption("Test Connection");
buttonTest.setImmediate(true);
buttonTest.setWidth("-1px");
buttonTest.setHeight("-1px");
mainLayout.addComponent(buttonTest);
mainLayout.setComponentAlignment(buttonTest, new Alignment(48));
return mainLayout;
}
示例10: LoginDialog
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
public LoginDialog(ApplicationContext context, LoginListener loginListener) {
super("Login to Metl");
this.context = context;
this.loginListener = loginListener;
settings = new TypedProperties();
settings.putAll(context.getOperationsSerivce().findGlobalSettingsAsMap());
passwordExpiresInDays = settings.getInt(GlobalSetting.PASSWORD_EXPIRE_DAYS, 60);
setWidth(300, Unit.PIXELS);
setResizable(false);
setModal(true);
setClosable(false);
LoginForm loginForm = new LoginForm() {
@Override
protected Component createContent(TextField userNameField, PasswordField passwordField,
Button loginButton) {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.setSpacing(true);
LoginDialog.this.userNameField = userNameField;
userNameField.setWidth(100, Unit.PERCENTAGE);
LoginDialog.this.passwordField = passwordField;
passwordField.setWidth(100, Unit.PERCENTAGE);
passwordField.setNullRepresentation("");
layout.addComponent(userNameField);
layout.addComponent(passwordField);
validatePasswordField = new PasswordField("Verify Password");
validatePasswordField.setWidth(100, Unit.PERCENTAGE);
validatePasswordField.setNullRepresentation("");
validatePasswordField.setVisible(false);
layout.addComponent(validatePasswordField);
HorizontalLayout buttonLayout = new HorizontalLayout();
loginButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
LoginDialog.this.loginButton = loginButton;
buttonLayout.addComponent(loginButton);
buttonLayout.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(buttonLayout);
buttonLayout.addComponent(loginButton);
buttonLayout.setComponentAlignment(loginButton, Alignment.BOTTOM_RIGHT);
userNameField.focus();
return layout;
}
};
loginForm.addLoginListener((e) -> login());
loginForm.setWidth(300, Unit.PIXELS);
setContent(loginForm);
}
示例11: ChangePasswordDialog
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
public ChangePasswordDialog(ApplicationContext context) {
super("Change Password");
this.context = context;
setWidth(300, Unit.PIXELS);
setResizable(false);
setModal(true);
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
FormLayout fieldLayout = new FormLayout();
fieldLayout.addStyleName(ValoTheme.FORMLAYOUT_LIGHT);
//fieldLayout.setSpacing(true);
currentPasswordField = new PasswordField("Current Password");
currentPasswordField.setWidth(100, Unit.PERCENTAGE);
currentPasswordField.setNullRepresentation("");
fieldLayout.addComponent(currentPasswordField);
newPasswordField = new PasswordField("New Password");
newPasswordField.setWidth(100, Unit.PERCENTAGE);
newPasswordField.setNullRepresentation("");
fieldLayout.addComponent(newPasswordField);
validatePasswordField = new PasswordField("Verify Password");
validatePasswordField.setWidth(100, Unit.PERCENTAGE);
validatePasswordField.setNullRepresentation("");
fieldLayout.addComponent(validatePasswordField);
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setSpacing(true);
buttonLayout.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
buttonLayout.setWidth(100, Unit.PERCENTAGE);
Label spacer = new Label();
buttonLayout.addComponent(spacer);
buttonLayout.setExpandRatio(spacer, 1);
Button cancelButton = new Button("Cancel", (e) -> close());
cancelButton.setClickShortcut(KeyCode.ESCAPE);
buttonLayout.addComponent(cancelButton);
buttonLayout.setComponentAlignment(cancelButton, Alignment.BOTTOM_RIGHT);
Button changeButton = new Button("Change", (e) -> changePassword());
changeButton.setClickShortcut(KeyCode.ENTER);
changeButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
buttonLayout.addComponent(changeButton);
buttonLayout.setComponentAlignment(changeButton, Alignment.BOTTOM_RIGHT);
layout.addComponent(fieldLayout);
layout.setExpandRatio(fieldLayout, 1);
layout.addComponent(buttonLayout);
setContent(layout);
}
示例12: buildDialogLayout
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
@Override
protected void buildDialogLayout() {
setSizeFull();
FormLayout mainLayout = new FormLayout();
// top-level component properties
setWidth("100%");
setHeight("100%");
final PasswordField passwordField = new PasswordField(ctx.tr("RdfToVirtuosoVaadinDialog.password"), password);
passwordField.setWidth("100%");
mainLayout.addComponent(createTextField(ctx.tr("RdfToVirtuosoVaadinDialog.virtuosoUrl"), virtuosoUrl));
mainLayout.addComponent(createTextField(ctx.tr("RdfToVirtuosoVaadinDialog.username"), username));
mainLayout.addComponent(passwordField);
mainLayout.addComponent(new CheckBox(ctx.tr("RdfToVirtuosoVaadinDialog.clearDestinationGraph"), clearDestinationGraph));
targerGraphNameTextField = createTextField(ctx.tr("RdfToVirtuosoVaadinDialog.targetGraphName"), targetGraphName);
final CheckBox perGraphCheckbox = new CheckBox(ctx.tr("RdfToVirtuosoVaadinDialog.perGraph"), perGraph);
perGraphCheckbox.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 6044061864546491939L;
@Override
public void valueChange(ValueChangeEvent event) {
targerGraphNameTextField.setEnabled(!perGraphCheckbox.getValue());
}
});
targerGraphNameTextField.addValidator(new Validator() {
@Override
public void validate(Object value) throws InvalidValueException {
if (value == null || StringUtils.isBlank((String) value)) {
if (!perGraphCheckbox.getValue()) {
throw new InvalidValueException(ctx.tr(RdfToVirtuosoVaadinDialog.this.getClass().getSimpleName() + ".exception.target.graph.name.empty"));
}
}
}
});
targerGraphNameTextField.addValidator(new UrlValidator(true, ctx.getDialogMasterContext().getDialogContext().getLocale()));
targerGraphNameTextField.setImmediate(true);
mainLayout.addComponent(perGraphCheckbox);
mainLayout.addComponent(targerGraphNameTextField);
mainLayout.addComponent(createTextField(ctx.tr(this.getClass().getSimpleName() + ".threadCount"), threadCount));
mainLayout.addComponent(new CheckBox(ctx.tr(this.getClass().getSimpleName() + ".skipOnError"), skipOnError));
setCompositionRoot(mainLayout);
}
示例13: postConstruct
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
@Override
public void postConstruct() {
super.postConstruct();
setSizeFull();
layout = new VerticalLayout();
layout.setSizeFull();
layout.setSpacing(true);
setCompositionRoot(layout);
caption = new Label("Sign in to Vaadin4Spring Security Demo");
caption.addStyleName(ValoTheme.LABEL_H2);
caption.setSizeUndefined();
layout.addComponent(caption);
layout.setComponentAlignment(caption, Alignment.MIDDLE_CENTER);
loginPanel = new VerticalLayout();
loginPanel.setSizeUndefined();
loginPanel.setSpacing(true);
loginPanel.setMargin(true);
layout.addComponent(loginPanel);
layout.setComponentAlignment(loginPanel, Alignment.MIDDLE_CENTER);
layout.setExpandRatio(loginPanel, 1);
errorMessage = new Label();
errorMessage.setWidth("300px");
errorMessage.addStyleName(ValoTheme.LABEL_FAILURE);
errorMessage.setVisible(false);
loginPanel.addComponent(errorMessage);
username = new TextField("Username");
username.setImmediate(true);
username.setWidth("300px");
username.setNullRepresentation("");
username.setInputPrompt("Enter your username");
loginPanel.addComponent(username);
password = new PasswordField("Password");
password.setImmediate(true);
password.setWidth("300px");
password.setNullRepresentation("");
loginPanel.addComponent(password);
rememberMe = new CheckBox("Remember me");
rememberMe.setValue(false);
rememberMe.addStyleName(ValoTheme.CHECKBOX_LARGE);
loginPanel.addComponent(rememberMe);
btnLogin = new Button("Signin", FontAwesome.UNLOCK);
btnLogin.addStyleName(ValoTheme.BUTTON_PRIMARY);
btnLogin.addClickListener(this);
btnLogin.setWidth("100%");
loginPanel.addComponent(btnLogin);
final Label infoLabel = new Label(FontAwesome.INFO_CIRCLE.getHtml() + " You can sign in as: <br/>\"user\" with password \"user\" <br/>\"admin\" with password \"admin\".", ContentMode.HTML);
infoLabel.setWidth("300px");
loginPanel.addComponent(infoLabel);
}
示例14: SignInContent
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
public SignInContent(Security security) {
super();
setSizeFull();
setSpacing(true);
this.security = security;
caption = new Label("Sign in to Vaadin4Spring Security Social Demo");
caption.addStyleName(ValoTheme.LABEL_H2);
caption.setSizeUndefined();
addComponent(caption);
setComponentAlignment(caption, Alignment.MIDDLE_CENTER);
loginPanel = new VerticalLayout();
loginPanel.setSizeUndefined();
loginPanel.setSpacing(true);
loginPanel.setMargin(true);
addComponent(loginPanel);
setComponentAlignment(loginPanel, Alignment.MIDDLE_CENTER);
setExpandRatio(loginPanel, 1);
errorMessage = new Label();
errorMessage.setWidth("300px");
errorMessage.addStyleName(ValoTheme.LABEL_FAILURE);
errorMessage.setVisible(false);
loginPanel.addComponent(errorMessage);
username = new TextField("Username");
username.setImmediate(true);
username.setWidth("300px");
loginPanel.addComponent(username);
password = new PasswordField("Password");
password.setImmediate(true);
password.setWidth("300px");
loginPanel.addComponent(password);
btnLogin = new Button("Signin", FontAwesome.UNLOCK);
btnLogin.addStyleName(ValoTheme.BUTTON_PRIMARY);
btnLogin.addClickListener(this);
btnLogin.setWidth("100%");
loginPanel.addComponent(btnLogin);
btnFacebookLogin = new Button("Signin with Facebook", FontAwesome.FACEBOOK);
btnFacebookLogin.addStyleName(ValoTheme.BUTTON_PRIMARY);
btnFacebookLogin.setWidth("100%");
btnFacebookLogin.addClickListener(this);
loginPanel.addComponent(btnFacebookLogin);
btnGoogleLogin = new Button("Signin with Google", FontAwesome.GOOGLE_PLUS);
btnGoogleLogin.addStyleName(ValoTheme.BUTTON_PRIMARY);
btnGoogleLogin.setWidth("100%");
btnGoogleLogin.addClickListener(this);
loginPanel.addComponent(btnGoogleLogin);
final Label infoLabel = new Label(FontAwesome.INFO_CIRCLE.getHtml() + " You can sign in with username \"user\" and password \"user\".", ContentMode.HTML);
infoLabel.setWidth("300px");
loginPanel.addComponent(infoLabel);
}
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecuritySocial,代码行数:60,代码来源:SignInContent.java
示例15: buildMainLayout
import com.vaadin.ui.PasswordField; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
// common part: create layout
mainLayout = new AbsoluteLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("700px");
mainLayout.setHeight("440px");
mainLayout.setMargin(true);
// top-level component properties
setWidth("700px");
setHeight("440px");
// activeField
activeField = new CheckBox();
activeField.setCaption("Activo");
activeField.setImmediate(false);
activeField.setWidth("-1px");
activeField.setHeight("-1px");
activeField.setTabIndex(1);
activeField.setRequired(true);
mainLayout.addComponent(activeField, "top:14.0px;left:507.0px;");
// commentField
commentField = new TextField();
commentField.setCaption("Comentario");
commentField.setImmediate(false);
commentField.setWidth("540px");
commentField.setHeight("160px");
commentField.setTabIndex(3);
mainLayout.addComponent(commentField, "top:100.0px;left:20.0px;");
// passwordField
passwordField = new PasswordField();
passwordField.setCaption("Clave");
passwordField.setImmediate(false);
passwordField.setWidth("160px");
passwordField.setHeight("-1px");
passwordField.setTabIndex(2);
passwordField.setRequired(true);
mainLayout.addComponent(passwordField, "top:56.0px;left:20.0px;");
// usernameField
usernameField = new TextField();
usernameField.setCaption("Nombre usuario");
usernameField.setImmediate(false);
usernameField.setWidth("160px");
usernameField.setHeight("-1px");
usernameField.setRequired(true);
mainLayout.addComponent(usernameField, "top:17.0px;left:20.0px;");
// rolesField
rolesField = new Table();
rolesField.setCaption("Roles");
rolesField.setImmediate(false);
rolesField.setWidth("501px");
rolesField.setHeight("140px");
mainLayout.addComponent(rolesField, "top:281.0px;left:19.0px;");
// brnAdd
brnAdd = new Button();
brnAdd.setCaption("+");
brnAdd.setImmediate(true);
brnAdd.setWidth("-1px");
brnAdd.setHeight("-1px");
mainLayout.addComponent(brnAdd, "top:283.0px;left:525.0px;");
// btnRemove
btnRemove = new Button();
btnRemove.setCaption("-");
btnRemove.setImmediate(true);
btnRemove.setWidth("-1px");
btnRemove.setHeight("-1px");
mainLayout.addComponent(btnRemove, "top:320.0px;left:525.0px;");
return mainLayout;
}