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.

Vaadin6Component.java 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright 2011 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.server;
  17. import java.util.EventListener;
  18. import com.vaadin.ui.Component;
  19. /**
  20. * Interface provided to ease porting of Vaadin 6 components to Vaadin 7. By
  21. * implementing this interface your Component will be able to use
  22. * {@link #paintContent(PaintTarget)} and
  23. * {@link #changeVariables(Object, java.util.Map)} just like in Vaadin 6.
  24. *
  25. * @author Vaadin Ltd
  26. * @since 7.0.0
  27. *
  28. */
  29. public interface Vaadin6Component extends VariableOwner, Component,
  30. EventListener {
  31. /**
  32. * <p>
  33. * Paints the Paintable into a UIDL stream. This method creates the UIDL
  34. * sequence describing it and outputs it to the given UIDL stream.
  35. * </p>
  36. *
  37. * <p>
  38. * It is called when the contents of the component should be painted in
  39. * response to the component first being shown or having been altered so
  40. * that its visual representation is changed.
  41. * </p>
  42. *
  43. * @param target
  44. * the target UIDL stream where the component should paint itself
  45. * to.
  46. * @throws PaintException
  47. * if the paint operation failed.
  48. */
  49. public void paintContent(PaintTarget target) throws PaintException;
  50. /**
  51. * (non-Javadoc) {@inheritDoc}
  52. * <p>
  53. * For a Vaadin6Component, markAsDirty will also cause
  54. * {@link #paintContent(PaintTarget)} to be called before sending changes to
  55. * the client.
  56. *
  57. * @see com.vaadin.server.ClientConnector#markAsDirty()
  58. */
  59. @Override
  60. public void markAsDirty();
  61. }