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 810B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. @ITMillApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client;
  5. import com.google.gwt.user.client.ui.FlowPanel;
  6. import com.google.gwt.user.client.ui.Widget;
  7. public class VCaptionWrapper extends FlowPanel {
  8. public static final String CLASSNAME = "i-captionwrapper";
  9. VCaption caption;
  10. Paintable widget;
  11. public VCaptionWrapper(Paintable toBeWrapped, ApplicationConnection client) {
  12. caption = new VCaption(toBeWrapped, client);
  13. add(caption);
  14. widget = toBeWrapped;
  15. add((Widget) widget);
  16. setStyleName(CLASSNAME);
  17. }
  18. public void updateCaption(UIDL uidl) {
  19. caption.updateCaption(uidl);
  20. setVisible(!uidl.getBooleanAttribute("invisible"));
  21. }
  22. public Paintable getPaintable() {
  23. return widget;
  24. }
  25. }