Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ChartDataSource.java 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * ====================================================================
  3. * Licensed to the Apache Software Foundation (ASF) under one or more
  4. * contributor license agreements. See the NOTICE file distributed with
  5. * this work for additional information regarding copyright ownership.
  6. * The ASF licenses this file to You under the Apache License, Version 2.0
  7. * (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. * ====================================================================
  18. */
  19. package org.apache.poi.ss.usermodel.charts;
  20. import org.apache.poi.util.Removal;
  21. /**
  22. * Represents data model of the charts.
  23. *
  24. * @param <T> type of points the data source contents
  25. * @deprecated use XDDFDataSource instead
  26. */
  27. @Deprecated
  28. @Removal(version="4.2")
  29. public interface ChartDataSource<T> {
  30. /**
  31. * Return number of points contained by data source.
  32. *
  33. * @return number of points contained by data source
  34. */
  35. int getPointCount();
  36. /**
  37. * Returns point value at specified index.
  38. *
  39. * @param index index to value from
  40. * @return point value at specified index.
  41. * @throws {@code IndexOutOfBoundsException} if index
  42. * parameter not in range {@code 0 <= index <= pointCount}
  43. */
  44. T getPointAt(int index);
  45. /**
  46. * Returns {@code true} if charts data source is valid cell range.
  47. *
  48. * @return {@code true} if charts data source is valid cell range
  49. */
  50. boolean isReference();
  51. /**
  52. * Returns {@code true} if data source points should be treated as numbers.
  53. *
  54. * @return {@code true} if data source points should be treated as numbers
  55. */
  56. boolean isNumeric();
  57. /**
  58. * Returns formula representation of the data source. It is only applicable
  59. * for data source that is valid cell range.
  60. *
  61. * @return formula representation of the data source
  62. * @throws {@code UnsupportedOperationException} if the data source is not a
  63. * reference.
  64. */
  65. String getFormulaString();
  66. }