Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. public class EmpDetails extends LayoutContainer {
  2.  
  3.  
  4. private VerticalPanel EmpVP;
  5. private FormData formData;
  6.  
  7. public EmpDetails() {
  8.  
  9. formData = new FormData("-20");
  10.  
  11. EmpVP = new VerticalPanel();
  12. EmpVP.setSpacing(10);
  13. createForm();
  14. setLayout(new CenterLayout());
  15. add(EmpVP);
  16. }
  17.  
  18.  
  19. private void createForm() {// some textboxes and radio button from demo example}
  20.  
  21. public EmpDetails() {
  22.  
  23. formData = new FormData("-20");
  24.  
  25. empVP = new VerticalPanel();
  26. empVP.setStyleName("topPanel");
  27. empVP.setSpacing(10);
  28. createForm();
  29. empVP.setHorizontalAlign(HorizontalAlignment.CENTER);
  30.  
  31. add(empVP);
  32. }
  33.  
  34. .topPanel > table{
  35. width:100%;
  36. }
  37.  
  38. FormPanel simple = new FormPanel();
  39. ...
  40. simple.setStyleAttribute("text-align", "left");
  41.  
  42. DOM.setStyleAttribute(empVP.getElement(), "marginLeft", "auto");
  43. DOM.setStyleAttribute(empVP.getElement(), "marginRight", "auto");
  44.  
  45. DOM.setStyleAttribute(this.getElement(), "marginLeft", "auto");
  46. DOM.setStyleAttribute(this.getElement(), "marginRight", "auto");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement