com.dlsc.flexgantt.swing.timeline
Interface IDatelineMenuProvider

All Known Implementing Classes:
DefaultDatelineMenuProvider

public interface IDatelineMenuProvider

A dateline menu provider is a convenient way of adding a context sensitive popup menu to the Dateline. When using this provider instead of using JComponent.setComponentPopupMenu(JPopupMenu) the information that is usually required by the popup menu gets already delivered to the provider. This information contains the mouse event that triggered the popup and the time that matches that location.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
Dateline.setMenuProvider(IDatelineMenuProvider)

Method Summary
 javax.swing.JPopupMenu getPopupMenu(Dateline eventline, java.awt.event.MouseEvent e, boolean major, long timePoint, ITimeSpan span)
          Returns a popup menu for the given eventline.
 

Method Detail

getPopupMenu

javax.swing.JPopupMenu getPopupMenu(Dateline eventline,
                                    java.awt.event.MouseEvent e,
                                    boolean major,
                                    long timePoint,
                                    ITimeSpan span)
Returns a popup menu for the given eventline.

Parameters:
eventline - the eventline that requests the popup menu
e - the mouse event that triggered the popup menu request
major - signals whether the mouse event was performed on a major or a minor time span
timePoint - the time point at the mouse location
span - the time span in which the click time point is located
Returns:
a popup menu that can be used in the context specified by the given parameters
Since:
1.0
See Also:
Dateline.setMenuProvider(IDatelineMenuProvider)