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.

VariableOwner.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright 2000-2016 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.io.Serializable;
  18. import java.util.Map;
  19. import com.vaadin.ui.LegacyComponent;
  20. /**
  21. * <p>
  22. * Listener interface for UI variable changes. The user communicates with the
  23. * application using the so-called <i>variables</i>. When the user makes a
  24. * change using the UI the terminal trasmits the changed variables to the
  25. * application, and the components owning those variables may then process those
  26. * changes.
  27. * </p>
  28. *
  29. * @author Vaadin Ltd.
  30. * @since 3.0
  31. * @deprecated As of 7.0. Only provided to ease porting of Vaadin 6 components.
  32. * Do not implement this directly, implement {@link LegacyComponent}
  33. * .
  34. */
  35. @Deprecated
  36. public interface VariableOwner extends Serializable {
  37. /**
  38. * Called when one or more variables handled by the implementing class are
  39. * changed.
  40. *
  41. * @param source
  42. * the Source of the variable change. This is the origin of the
  43. * event. For example in Web Adapter this is the request.
  44. * @param variables
  45. * the Mapping from variable names to new variable values.
  46. */
  47. public void changeVariables(Object source, Map<String, Object> variables);
  48. /**
  49. * <p>
  50. * Tests if the variable owner is enabled or not. The terminal should not
  51. * send any variable changes to disabled variable owners.
  52. * </p>
  53. *
  54. * @return <code>true</code> if the variable owner is enabled,
  55. * <code>false</code> if not
  56. */
  57. public boolean isEnabled();
  58. }