You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VCaptionWrapper.java 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client;
  5. import com.google.gwt.user.client.ui.FlowPanel;
  6. public class VCaptionWrapper extends FlowPanel {
  7. public static final String CLASSNAME = "v-captionwrapper";
  8. VCaption caption;
  9. ComponentConnector paintable;
  10. /**
  11. * Creates a new caption wrapper panel.
  12. *
  13. * @param toBeWrapped
  14. * paintable that the caption is associated with, not null
  15. * @param client
  16. * ApplicationConnection
  17. */
  18. public VCaptionWrapper(ComponentConnector toBeWrapped,
  19. ApplicationConnection client) {
  20. caption = new VCaption(toBeWrapped, client);
  21. add(caption);
  22. paintable = toBeWrapped;
  23. add(paintable.getWidget());
  24. setStyleName(CLASSNAME);
  25. }
  26. public void updateCaption(UIDL uidl) {
  27. caption.updateCaption(uidl);
  28. setVisible(!uidl.getBooleanAttribute("invisible"));
  29. }
  30. public ComponentConnector getPaintable() {
  31. return paintable;
  32. }
  33. }