Advertisement
Guest User

Untitled

a guest
May 21st, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. // Provides item virtualization support for Gantt charts. And items uses a single row and spans a well defined time interval.
  2. // Client code should inherit from this class and override source- totalRowCount, preferredTimeline, filteredItems, and filteredDependencies appropriately.
  3. open class GanttChartItemManager {
  4.  
  5. // Range and timeline are set by the user interface controller depending on the scrolling viewport.
  6. public var range = RowRange()
  7. public var timeline = TimeRange()
  8.  
  9. // The totally available row count and the preferred (total) timeline used by the items are needed by the user interface controller to set up the maximum scrollable size of the view (that the viewport is scrolling within).
  10. open var sourceTotalRowCount: Int { return 0 }
  11. open var sourcePreferredTimeline: TimeRange { return TimeRange() }
  12.  
  13. // Only the filtered items and dependencies that are visible in the current range and timeline are required by the user interface controller.
  14. open var sourceFilteredItems: [GanttChartItem] { return [] }
  15. open var sourceFilteredDependencies: [GanttChartDependency] { return [] }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement