Advertisement
Guest User

Untitled

a guest
Mar 15th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.13 KB | None | 0 0
  1. package com.crud.views;
  2.  
  3. import com.vaadin.navigator.View;
  4. import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
  5. import com.vaadin.ui.Button;
  6. import com.vaadin.ui.HorizontalLayout;
  7. import com.vaadin.ui.PasswordField;
  8. import com.vaadin.ui.TextField;
  9. import com.vaadin.ui.VerticalLayout;
  10.  
  11. public class SettingsView extends VerticalLayout implements View{
  12.  
  13.     private final TextField email = new TextField("Your email");
  14.     private final TextField username = new TextField("your name");
  15.     private final PasswordField password = new PasswordField("New Password");
  16.    
  17.     private final Button save = new Button("Save Changes");
  18.     private final Button cancel = new Button("Cancel Changes");
  19.     private final Button projects = new Button("Your projects");
  20.    
  21.    
  22.    
  23.    
  24.     public SettingsView(){
  25.         super();
  26.        
  27.             this.addComponent(email);
  28.             this.addComponent(username);
  29.             this.addComponent(password);
  30.            
  31.             HorizontalLayout buttons = new HorizontalLayout(this.save,this.cancel,this.projects);
  32.            
  33.             this.addComponent(buttons);
  34.            
  35.             buttons.setWidth("450px");
  36.     }
  37.    
  38.    
  39.    
  40.     public void enter(ViewChangeEvent event){
  41.        
  42.     }
  43.    
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement