/** * Customize the password field. Only for overriding, do not call. * * @return the password field * @since 7.7 */ protected PasswordField createPasswordField() { throwIfInitialized(); return new PasswordField(getPasswordCaption()); }
@Override public Component createEditor() { return new PasswordField(); }
protected AbstractField createTextField() { return new PasswordField(); }
PasswordField input = new PasswordField(); input.setSkin(new PasswordSkin(input));
PasswordField passwordField = new PasswordField(); passwordField.setStyle("-fx-echo-char: -;");
PasswordField field = new PasswordField(); field.getText();
grid.add(pw, 0, 2); final PasswordField pwBox = new PasswordField(); grid.add(pwBox, 1, 2);
public class PasswordFieldCell extends TableCell<YourTableBean, String> { private PasswordField passwordField; public PasswordFieldCell() { passwordField = new PasswordField(); passwordField.setEditable(false); this.setContentDisplay(ContentDisplay.GRAPHIC_ONLY); this.setGraphic(null); } @Override protected void updateItem(String item, boolean empty) { super.updateItem(item, empty); if(!isEmpty()){ passwordField.setText(item); setGraphic(passwordField); }else{ setGraphic(null); } }}
@Override public Field<?> createField(Item item, Object propertyId, Component uiContext) { if (MetaConfigModel.PASSWORD.equals(propertyId)) { PasswordField field = new PasswordField(); field.setNullRepresentation(""); field.setCaption(createCaptionByPropertyId(propertyId)); return field; } return super.createField(item, propertyId, uiContext); } });
public AbstractField<?> getTextField(MaduraPropertyWrapper property) { AbstractTextField ret = null; if (property.isSecret()) { ret = new PasswordField(); } else { ret = new TextField(); } ret.setMaxLength(property.getMaxLength()); return ret; } public Button getButtonField(String name, MessageSource messageSource) {
final TextField textField = new TextField(); final PasswordField passwordField = new PasswordField(); final TextField textField1 = new TextField(); ... button.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { String hostIP = textField1.getText(); String userName = textField.getText(); String password = passwordField.getText(); isSShConnected = sshManager.connect(hostIP, userName, password); isSFTPConnected = sftpManager.connect(hostIP, userName, password); if(isSFTPConnected && isSShConnected){ System.out.println("Connected"); } } });
public AbstractField getTextField(MaduraPropertyWrapper property) { AbstractTextField ret = null; if (property.isSecret()) { ret = new PasswordField(); } else { ret = new TextField(); // int maxLength = property.getMaxLength(); // if (maxLength > 100) { // ret = new TextArea(); // } else { // ret = new TextField(); // } } ret.setMaxLength(property.getMaxLength()); return ret; } public Button getButtonField(String name, MessageSource messageSource) {
private void buildPasswordField() { password = new PasswordField(i18n.getMessage("label.login.password")); password.setIcon(FontAwesome.LOCK); password.addStyleName( ValoTheme.TEXTFIELD_INLINE_ICON + " " + ValoTheme.TEXTFIELD_SMALL + " " + LOGIN_TEXTFIELD); password.setId("login-password"); if(isDemo && !uiProperties.getDemo().getPassword().isEmpty()) { password.setValue(uiProperties.getDemo().getPassword()); } }
private void buildPasswordField() { password = new PasswordField(i18n.getMessage("label.login.password")); password.setIcon(FontAwesome.LOCK); password.addStyleName( ValoTheme.TEXTFIELD_INLINE_ICON + " " + ValoTheme.TEXTFIELD_SMALL + " " + LOGIN_TEXTFIELD); password.setId("login-password"); if (isDemo && !uiProperties.getDemo().getPassword().isEmpty()) { password.setValue(uiProperties.getDemo().getPassword()); } }
public AbstractField getTextField(MaduraPropertyWrapper property) { AbstractTextField ret = null; if (property.isSecret()) { ret = new PasswordField(); } else if (property.isNumeric()) { ret = new NumberField(); } else if (property.isEmail()) { ret = new EmailField(); } else { ret = new TextField(); } return ret; } public Button getButtonField(String name, MessageSource messageSource) {
public AbstractField<?> getTextField(MaduraPropertyWrapper property) { AbstractTextField ret = null; if (property.isSecret()) { ret = new PasswordField(); } else if (property.isNumeric()) { ret = new NumberField(); } else if (property.isEmail()) { ret = new EmailField(); } else { ret = new TextField(); } return ret; } public Button getButtonField(String name, MessageSource messageSource) {
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); }
public Component getComponent() { container = new HorizontalLayout(); container.setSpacing(true); container.setMargin(true); container.addComponent(new Label("User")); container.addComponent(new TextField()); container.addComponent(new Label("Password")); container.addComponent(new PasswordField()); return container; }
@Override protected void initContent(VerticalLayout layout) throws Exception { label = new Label(message); label.setContentMode(ContentMode.HTML); layout.addComponent(label); textField = new PasswordField(); textField.setValue(txtInput); textField.setWidth("100%"); textField.focus(); textField.addShortcutListener(new ShortcutListener("Confirm", ShortcutAction.KeyCode.ENTER, null) { private static final long serialVersionUID = 1L; @Override public void handleAction(Object sender, Object target) { confirm.doAction(PasswordInputDialog.this); } }); layout.addComponent(textField); txtInput = null; }
public LoginForm(LoginCallback callback) { setMargin(true); setSpacing(true); TextField username = new TextField("Username"); addComponent(username); PasswordField password = new PasswordField("Password"); addComponent(password); Button login = new Button("Login", evt -> { String pword = password.getValue(); password.setValue(""); if (!callback.login(username.getValue(), pword)) { Notification.show("Login failed"); username.focus(); } }); login.setClickShortcut(ShortcutAction.KeyCode.ENTER); addComponent(login); }