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.

ICaptionWrapper.java 818B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. @ITMillApache2LicenseForJavaFiles@
  3. */
  4. package com.itmill.toolkit.terminal.gwt.client;
  5. import com.google.gwt.user.client.ui.FlowPanel;
  6. import com.google.gwt.user.client.ui.Widget;
  7. public class ICaptionWrapper extends FlowPanel {
  8. public static final String CLASSNAME = "i-captionwrapper";
  9. ICaption caption;
  10. Paintable widget;
  11. public ICaptionWrapper(Paintable toBeWrapped, ApplicationConnection client) {
  12. caption = new ICaption(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. }