Klasse Cluster<A extends Activity>

java.lang.Object
impl.com.flexganttfx.skin.util.Cluster<A>
Typparameter:
A - the type of the activities

public final class Cluster<A extends Activity> extends Object
A cluster is a group of activities placed on multiple columns. The activities can overlap each other within the cluster, but not within a single column.
Siehe auch:
  • Konstruktordetails

    • Cluster

      public Cluster()
  • Methodendetails

    • getColumnCount

      public int getColumnCount()
      Returns the number of columns that are needed by the cluster in order to display all activities without any overlaps. This value is only valid after the resolve(Predicate) method has been called.
      Gibt zurück:
      the number of columns inside the cluster
    • add

      public void add(A activity)
      Adds an activity to the cluster.
      Parameter:
      activity - the activity
    • getActivities

      public List<A> getActivities()
      Returns all activities within the cluster.
      Gibt zurück:
      the cluster activities
    • intersects

      public boolean intersects(A activity)
      Determines if the given activity intersects with the current time bounds of the cluster. The first activity always intersects with the cluster so that the cluster gets initialized.
      Parameter:
      activity - the activity to check
      Gibt zurück:
      true if the time bounds of the activity intersect with the time bounds of the cluster
    • resolve

      public Map<A, Placement<A>> resolve(Predicate<A> filter)
      Resolves the conflicts within this cluster by placing the activites in different columns. The filter allows the application to ignore some activities when resolving the conflicts.
      Parameter:
      filter - a filter used to ignore some of the activities
      Gibt zurück:
      a map structure containing the placement for each activity within the cluster
    • getColumns

      public List<Column<A>> getColumns()
      Returns the list of columns. This list is only valid after the method resolve(Predicate) has been called.
      Gibt zurück:
      the list of columns