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.

TableFieldFactory.java 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.v7.ui;
  17. import java.io.Serializable;
  18. import com.vaadin.ui.Component;
  19. import com.vaadin.v7.data.Container;
  20. /**
  21. * Factory interface for creating new Field-instances based on Container
  22. * (datasource), item id, property id and uiContext (the component responsible
  23. * for displaying fields). Currently this interface is used by {@link Table},
  24. * but might later be used by some other components for {@link Field}
  25. * generation.
  26. *
  27. * <p>
  28. *
  29. * @author Vaadin Ltd.
  30. * @since 6.0
  31. * @see FormFieldFactory
  32. *
  33. * @deprecated As of 8.0, Table is replaced by {@link com.vaadin.ui.Grid}
  34. */
  35. @Deprecated
  36. public interface TableFieldFactory extends Serializable {
  37. /**
  38. * Creates a field based on the Container, item id, property id and the
  39. * component responsible for displaying the field (most commonly
  40. * {@link Table}).
  41. *
  42. * @param container
  43. * the Container where the property belongs to.
  44. * @param itemId
  45. * the item Id.
  46. * @param propertyId
  47. * the Id of the property.
  48. * @param uiContext
  49. * the component where the field is presented.
  50. * @return A field suitable for editing the specified data or null if the
  51. * property should not be editable.
  52. */
  53. Field<?> createField(Container container, Object itemId, Object propertyId,
  54. Component uiContext);
  55. }