GanttChartItemManager
open class GanttChartItemManager : GanttChartItemFactory
Provides support for browsing and updating items and dependencies to be displayed within a Gantt Chart diagram, filtering them upon the specified row range and timeline values, and offering supplemental information such as the total row count and preferred timeline for virtualizing diagram viewing. An object may inherit from this class to virtualize data loading and updating events to offer the best possible runtime performance.
-
Undocumented
Declaration
Swift
public init(collectionProvider: GanttChartCollectionProvider? = nil, schedule: ScheduleDefinition? = nil, behavior: GanttChartItemBehavior? = nil)
-
Row range displayed in the diagram, vertically filtering the managed items.
Declaration
Swift
public var range: RowRange { get set }
-
Time interval displayed in the diagram, horizontally filtering the managed items.
Declaration
Swift
public var timeline: TimeRange { get set }
-
Returns the total row count that the source items would require vertically to be fully displayed within the diagram.
Declaration
Swift
public var totalRowCount: Int { get }
-
Implementation should return the total row count that the source items would require vertically to be fully displayed within the diagram.
Declaration
Swift
open var sourceTotalRowCount: Int { get }
-
Returns the preferred timeline that the source items would require horizontally to be fully displayed within the diagram.
Declaration
Swift
public var preferredTimeline: TimeRange { get }
-
Implementation should return the preferred timeline that the source items would require horizontally to be fully displayed within the diagram.
Declaration
Swift
open var sourcePreferredTimeline: TimeRange { get }
-
Returns the filtered items that should be displayed in the diagram considering the currently managed range and timeline.
Declaration
Swift
public var filteredItems: [GanttChartItem] { get }
-
Implementation should return the filtered items to be displayed in the diagram considering the currently managed range and timeline.
Declaration
Swift
open var sourceFilteredItems: [GanttChartItem] { get }
-
Returns the filtered dependencies that should be displayed in the diagram considering the currently managed range and timeline.
Declaration
Swift
public var filteredDependencies: [GanttChartDependency] { get }
-
Implementation should return the filtered dependencies to be displayed in the diagram considering the currently managed range and timeline.
Declaration
Swift
open var sourceFilteredDependencies: [GanttChartDependency] { get }
-
Establishes the working and nonworking time to consider by default upon updating items (when their own schedule is not set).
Declaration
Swift
public var schedule: ScheduleDefinition
-
Returns the schedule of the item if it is set, or the default schedule of the item manager otherwise.
Declaration
Swift
public func schedule(for item: GanttChartItem) -> ScheduleDefinition
-
Optional constraint definition, such as for ensuring single item per row, hierarchical behavior, preserving time within min-max values, dependency based rescheduling, or a set of such settings.
Declaration
Swift
public var behavior: GanttChartItemBehavior?
-
Defines the maximum level of recursivity for applying behavioral constraints.
Declaration
Swift
public var maxBehaviorRecursivity: Int
-
Implementation should return the items to run constraints on, if applied through a behavior or schedule application. By default, returns the filtered items.
Declaration
Swift
open var availableItems: [GanttChartItem] { get }
-
Implementation should return the dependencies to run constraints on, if applied, if applied through a behavior or schedule application. By default, returns the filtered dependencies.
Declaration
Swift
open var availableDependencies: [GanttChartDependency] { get }
-
Adds a new item to the managed collection.
Declaration
Swift
public func addNewItem(on row: Row, at time: Time, isMilestone: Bool = false) -> GanttChartItem
-
Removes an existing item from the managed collection.
Declaration
Swift
public func removeItem(_ item: GanttChartItem)
-
Implementation should create and add a record for a new item in the data source.
Declaration
Swift
open func addNewSourceItem(row: Row, time: Time, isMilestone: Bool = false) -> GanttChartItem
-
Implementation should delete the record associated to an existing item from the data source.
Declaration
Swift
open func removeSourceItem(_ item: GanttChartItem)
-
Implementation should create and return a new item object based on the specified argument values.
Declaration
Swift
open func createSourceItem(row: Row, time: Time, isMilestone: Bool = false) -> GanttChartItem
-
Adds a new dependency to the managed collection.
Declaration
Swift
public func addNewDependency( from: GanttChartItem, to: GanttChartItem, type: GanttChartDependencyType = .fromFinishToStart) -> GanttChartDependency
-
Removes an existing dependency from the managed collection.
Declaration
Swift
public func removeDependency(_ dependency: GanttChartDependency)
-
Implementation should create and add a record for a new dependency in the data source.
Declaration
Swift
open func addNewSourceDependency( from: GanttChartItem, to: GanttChartItem, type: GanttChartDependencyType = .fromFinishToStart) -> GanttChartDependency
-
Implementation should delete the record associated to an existing dependency from the data source.
Declaration
Swift
open func removeSourceDependency(_ dependency: GanttChartDependency)
-
Implementation should create and return a new dependency object based on the specified argument values.
Declaration
Swift
open func createSourceDependency( from: GanttChartItem, to: GanttChartItem, type: GanttChartDependencyType = .fromFinishToStart) -> GanttChartDependency
-
Returns the duration of an item (in seconds) considering its scheduled working time.
Declaration
Swift
public func scheduledDuration(for item: GanttChartItem) -> TimeInterval
-
Returns the duration of an item, in the specified time unit, considering its scheduled working time.
Declaration
Swift
public func scheduledDuration(for item: GanttChartItem, in unit: TimeUnit) -> Double
-
Returns the completed duration of an item (in seconds) considering its scheduled working time.
Declaration
Swift
public func completedDuration(for item: GanttChartItem) -> TimeInterval
-
Returns the completed duration of an item, in the specified time unit, considering its scheduled working time.
Declaration
Swift
public func completedDuration(for item: GanttChartItem, in unit: TimeUnit) -> Double
-
Returns the date-time up to which an item is completed.
Declaration
Swift
public func timeCompletedUntil(for item: GanttChartItem) -> Time
-
Updates the start of an item to a specific date-time.
Declaration
Swift
public func updateTime(for item: GanttChartItem, toStartOn value: Time)
-
Updates the duration of an item to finish on a specific date-time preserving its start time, optionally also preserving its completed duration.
Declaration
Swift
public func updateDuration(for item: GanttChartItem, toFinishOn value: Time, preservingCompletedDuration: Bool)
-
Updates the duration of an item to start on a specific date-time preserving its finish time, optionally also preserving its completed duration.
Declaration
Swift
public func updateDuration(for item: GanttChartItem, toStartOn value: Time, preservingCompletedDuration: Bool)
-
Updates completion of an item to get its completed up to date-time set to a specific value.
Declaration
Swift
public func updateCompletion(for item: GanttChartItem, until value: Time)
-
Updates the row of an item to get it vertically moved.
Declaration
Swift
public func updateRow(for item: GanttChartItem, to value: Row)
-
Updates the expansion state of an item (which should be of summary type) to a specified state (true=expanded, false=collapsed).
Declaration
Swift
public func updateExpansion(for item: GanttChartItem, to value: Bool)
-
Updates the expansion state of an item (which should be of summary type) to true.
Declaration
Swift
public func expand(item: GanttChartItem)
-
Updates the expansion state of an item (which should be of summary type) to false.
Declaration
Swift
public func collapse(item: GanttChartItem)
-
Updates the Z-index value of an item.
Declaration
Swift
public func updateZIndex(for item: GanttChartItem, to value: Int)
-
Brings an item to front, increasing its Z-index appropriately.
Declaration
Swift
public func bringToFront(item: GanttChartItem)
-
Sends an item to back, decreasing its Z-index appropriately.
Declaration
Swift
public func sendToBack(item: GanttChartItem)
-
Brings a dependency to front, increasing its Z-index appropriately.
Declaration
Swift
public func bringToFront(dependency: GanttChartDependency)
-
Sends a dependency to back, decreasing its Z-index appropriately.
Declaration
Swift
public func sendToBack(dependency: GanttChartDependency)
-
Ensures an item is visible in chart.
Declaration
Swift
public func show(item: GanttChartItem)
-
Hides an item from chart.
Declaration
Swift
public func hide(item: GanttChartItem)
-
Ensures a dependency is visible in chart.
Declaration
Swift
public func show(dependency: GanttChartDependency)
-
Hides a dependency from chart.
Declaration
Swift
public func hide(dependency: GanttChartDependency)
-
Performs schedule updates for the specified item.
Declaration
Swift
public func applySchedule(for item: GanttChartItem)
-
Performs schedule updates for all available items.
Declaration
Swift
public func applySchedule()
-
Performs behavior updates for the specified item time.
Declaration
Swift
public func applyBehavior(forTimeOf item: GanttChartItem)
-
Performs behavior updates for the specified item completion.
Declaration
Swift
public func applyBehavior(forCompletionOf item: GanttChartItem)
-
Performs behavior updates for the specified item row.
Declaration
Swift
public func applyBehavior(forRowOf item: GanttChartItem)
-
Undocumented
Declaration
Swift
public func applyBehaviorUpdates(forRowOf item: GanttChartItem)
-
Performs behavior updates for the specified item expansion state.
Declaration
Swift
public func applyBehavior(forExpansionStateOf item: GanttChartItem)
-
Undocumented
Declaration
Swift
public func applyBehaviorUpdates(forExpansionStateOf item: GanttChartItem)
-
Performs behavior updates for the specified item time.
Declaration
Swift
public func applyBehavior(for item: GanttChartItem)
-
Performs behavior updates for all available items.
Declaration
Swift
public func applyBehavior()
-
Performs a series of batch updates.
Declaration
Swift
public func performUpdates(_ updates: [GanttChartItemUpdateAction])
-
Notifies the manager object that the items or dependencies have changed due to external causes.
Declaration
Swift
public func collectionDidChange()
-
Clears the cache values that the manager object internally maintains in order to improve output performance.
Declaration
Swift
public func clearCache()
-
Optional observer delegate for the managed collection (usually a controller).
Declaration
Swift
public weak var collectionObserver: GanttChartCollectionObserver?
-
Optional data provider delegate for the managed collection.
Declaration
Swift
public weak var collectionProvider: GanttChartCollectionProvider?
-
Optional item factory delegate for the managed collection.
Declaration
Swift
public weak var itemFactory: GanttChartItemFactory?
-
Determines the actual item factory to use (the specified itemFactory or, by default, itself).
Declaration
Swift
public var actualItemFactory: GanttChartItemFactory { get }
-
Optional item observer delegate for the managed collection.
Declaration
Swift
public weak var itemObserver: GanttChartItemObserver?