Class GraphicsBase.ContextMenuParameter<R extends Row<?,​?,​?>>

  • Type Parameters:
    R - the type of the rows used in the graphics view
    Enclosing class:
    GraphicsBase<R extends Row<?,​?,​?>>

    public static final class GraphicsBase.ContextMenuParameter<R extends Row<?,​?,​?>>
    extends Object
    A callback parameter class used for displaying a context menu. Instances of this class will be passed constructed based on the information available at the location of the context menu trigger event.
    Since:
    1.0
    See Also:
    GraphicsBase.setContextMenuCallback(Callback)
    • Constructor Detail

      • ContextMenuParameter

        public ContextMenuParameter​(GraphicsBase<R> graphics,
                                    R row,
                                    List<ActivityRef<?>> activities,
                                    Layout layout,
                                    Instant time,
                                    LocalTime localTime)
        Constructs a new context menu parameter object.
        Parameters:
        graphics - the view where the context menu has been requested
        row - the row where the context menu has been requested
        activities - the activities found at the location within the row where the context menu has been requested
        layout - the layout found at the location within the row where the context menu has been requested
        time - the time found at the location within the row where the context menu has been requested
        localTime - the local time found at the location within the row where the context menu has been requested
        Since:
        1.0
    • Method Detail

      • getGraphics

        public final GraphicsBase<R> getGraphics()
        Returns the graphics view where the context menu has been requested.
        Returns:
        the graphics view
        Since:
        1.0
      • getRow

        public final R getRow()
        Returns the row where the context menu has been requested.
        Returns:
        the row
        Since:
        1.0
      • getActivities

        public final List<ActivityRef<?>> getActivities()
        Returns the activities found at the location where the context menu has been requested.
        Returns:
        the activities
        Since:
        1.0
      • getLayout

        public Layout getLayout()
        Returns the layout found at the location where the context menu has been requested.
        Returns:
        the layout (e.g. GanttLayout)
        Since:
        1.0
      • getLocalTime

        public LocalTime getLocalTime()
        Returns the local time found at the location where the context menu has been requested.
        Returns:
        the local time (e.g. 6pm)
        Since:
        1.0
      • getTime

        public Instant getTime()
        Returns the time found at the location where the context menu has been requested.
        Returns:
        the time
        Since:
        1.0