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.

LegacyComponent.java 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright 2000-2018 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.ui;
  17. import com.vaadin.event.ConnectorEventListener;
  18. import com.vaadin.server.PaintException;
  19. import com.vaadin.server.PaintTarget;
  20. import com.vaadin.server.VariableOwner;
  21. /**
  22. * Interface provided to ease porting of Vaadin 6 components to Vaadin 7. By
  23. * implementing this interface your Component will be able to use
  24. * {@link #paintContent(PaintTarget)} and
  25. * {@link #changeVariables(Object, java.util.Map)} just like in Vaadin 6.
  26. *
  27. * @deprecated As of 7.0. This class is only intended to ease migration and
  28. * should not be used for new projects.
  29. *
  30. * @author Vaadin Ltd
  31. * @since 7.0.0
  32. */
  33. @Deprecated
  34. public interface LegacyComponent
  35. extends VariableOwner, Component, ConnectorEventListener {
  36. /**
  37. * <p>
  38. * Paints the Paintable into a UIDL stream. This method creates the UIDL
  39. * sequence describing it and outputs it to the given UIDL stream.
  40. * </p>
  41. *
  42. * <p>
  43. * It is called when the contents of the component should be painted in
  44. * response to the component first being shown or having been altered so
  45. * that its visual representation is changed.
  46. * </p>
  47. *
  48. * @param target
  49. * the target UIDL stream where the component should paint itself
  50. * to.
  51. * @throws PaintException
  52. * if the paint operation failed.
  53. */
  54. public void paintContent(PaintTarget target) throws PaintException;
  55. /**
  56. * (non-Javadoc) {@inheritDoc}
  57. * <p>
  58. * For a LegacyComponent, markAsDirty will also cause
  59. * {@link #paintContent(PaintTarget)} to be called before sending changes to
  60. * the client.
  61. *
  62. * @see com.vaadin.server.ClientConnector#markAsDirty()
  63. */
  64. @Override
  65. public void markAsDirty();
  66. }