Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ComponentState.java 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client;
  5. import com.vaadin.terminal.gwt.client.communication.SharedState;
  6. /**
  7. * Default shared state implementation for UI components.
  8. *
  9. * State classes of concrete components should extend this class.
  10. *
  11. * @since 7.0
  12. */
  13. public class ComponentState extends SharedState {
  14. private String height = "";
  15. private String width = "";
  16. // TODO more javadoc
  17. public String getHeight() {
  18. if (height == null) {
  19. return "";
  20. }
  21. return height;
  22. }
  23. public void setHeight(String height) {
  24. this.height = height;
  25. }
  26. public boolean isUndefinedHeight() {
  27. return "".equals(getHeight());
  28. }
  29. public String getWidth() {
  30. if (width == null) {
  31. return "";
  32. }
  33. return width;
  34. }
  35. public void setWidth(String width) {
  36. this.width = width;
  37. }
  38. public boolean isUndefinedWidth() {
  39. return "".equals(getWidth());
  40. }
  41. // TODO constants for the state attributes for now
  42. public static final String STATE_STYLE = "style";
  43. public static final String STATE_READONLY = "readonly";
  44. public static final String STATE_IMMEDIATE = "immediate";
  45. public static final String STATE_DISABLED = "disabled";
  46. public static final String STATE_CAPTION = "caption";
  47. public static final String STATE_DESCRIPTION = "description";
  48. }