TileListModel.java 949 B

12345678910111213141516171819202122232425
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. package org.chromium.components.browser_ui.widget.image_tiles;
  5. import org.chromium.ui.modelutil.ListModel;
  6. import org.chromium.ui.modelutil.PropertyModel;
  7. /**
  8. * This model represents the data required to build a list UI around a set of {@link ImageTile}s.
  9. * This includes (1) a {@link ListModel} implementation and (2) exposing a
  10. * {@link PropertyModel} for shared item properties and general list information.
  11. */
  12. class TileListModel extends ListModel<ImageTile> {
  13. private final PropertyModel mListProperties = new PropertyModel(TileListProperties.ALL_KEYS);
  14. /**
  15. * @return A {@link PropertyModel} instance, which is a set of shared properties for the
  16. * list.
  17. */
  18. public PropertyModel getProperties() {
  19. return mListProperties;
  20. }
  21. }