// Path: timeline/src/main/java/org/mpilone/vaadin/timeline/shared/EventProperties.java
// public class EventProperties {
// 
//   /**
//    * group (String, Number, or null): the id of the clicked group.
//    */
//   public String group;
// 
//   /**
//    * item (String, Number, or null): the id of the clicked item.
//    */
//   public String item;
// 
//   /**
//    * pageX (Number): absolute horizontal position of the click event.
//    */
//   public int pageX;
// 
//   /**
//    * pageY (Number): absolute vertical position of the click event.
//    */
//   public int pageY;
// 
//   /**
//    * x (Number): relative horizontal position of the click event.
//    */
//   public int x;
// 
//   /**
//    * y (Number): relative vertical position of the click event.
//    */
//   public int y;
// 
//   /**
//    * time (Date): Date of the clicked event.
//    */
//   public Date time;
// 
//   /**
//    * snappedTime (Date): Date of the clicked event, snapped to a nice value.
//    */
//   public Date snappedTime;
// 
//   /**
//    * what (String or null): name of the clicked thing: item, background, axis,
//    * group-label, custom-time, or current-time.
//    */
//   public String what;
// 
//   // event (Object): the original click event.
//   @Override
//   public String toString() {
//     return "EventProperties{" + "group=" + group + ", item=" + item + ", pageX="
//         + pageX + ", pageY=" + pageY + ", x=" + x + ", y=" + y + ", time="
//         + time + ", snappedTime=" + snappedTime + ", what=" + what + '}';
//   }
// }


import java.lang.reflect.Method;
import java.util.Date;
import org.mpilone.vaadin.timeline.shared.EventProperties;
import com.vaadin.ui.Component;
import com.vaadin.util.ReflectTools;
package org.mpilone.vaadin.timeline;




/**
 * Listener for click events on the timeline.
 */
public interface ClickListener {
  /**
   * The handler method in the listener.
   */
  static final Method METHOD =
      ReflectTools.findMethod(ClickListener.class, "click", ClickEvent.class);

  /**
   * The handler method called when the timeline is left-clicked.
   *
   * @param evt the event details
   */
  void click(ClickEvent evt);

  /**
   * Event details for a click on the timeline.
   */
  public static class ClickEvent extends Component.Event {

    private final EventProperties props;
    private final Object itemId;

    /**
     * Constructs the event.
     *
     * @param source the source component
     * @param itemId the ID of the item clicked or null
     * @param props the event properties relayed from the client side
     */
// Path: timeline/src/main/java/org/mpilone/vaadin/timeline/shared/EventProperties.java
// public class EventProperties {
// 
//   /**
//    * group (String, Number, or null): the id of the clicked group.
//    */
//   public String group;
// 
//   /**
//    * item (String, Number, or null): the id of the clicked item.
//    */
//   public String item;
// 
//   /**
//    * pageX (Number): absolute horizontal position of the click event.
//    */
//   public int pageX;
// 
//   /**
//    * pageY (Number): absolute vertical position of the click event.
//    */
//   public int pageY;
// 
//   /**
//    * x (Number): relative horizontal position of the click event.
//    */
//   public int x;
// 
//   /**
//    * y (Number): relative vertical position of the click event.
//    */
//   public int y;
// 
//   /**
//    * time (Date): Date of the clicked event.
//    */
//   public Date time;
// 
//   /**
//    * snappedTime (Date): Date of the clicked event, snapped to a nice value.
//    */
//   public Date snappedTime;
// 
//   /**
//    * what (String or null): name of the clicked thing: item, background, axis,
//    * group-label, custom-time, or current-time.
//    */
//   public String what;
// 
//   // event (Object): the original click event.
//   @Override
//   public String toString() {
//     return "EventProperties{" + "group=" + group + ", item=" + item + ", pageX="
//         + pageX + ", pageY=" + pageY + ", x=" + x + ", y=" + y + ", time="
//         + time + ", snappedTime=" + snappedTime + ", what=" + what + '}';
//   }
// }


// Path: timeline/src/main/java/org/mpilone/vaadin/timeline/ClickListener.java
import java.lang.reflect.Method;
import java.util.Date;
import org.mpilone.vaadin.timeline.shared.EventProperties;
import com.vaadin.ui.Component;
import com.vaadin.util.ReflectTools;

package org.mpilone.vaadin.timeline;




/**
 * Listener for click events on the timeline.
 */
public interface ClickListener {
  /**
   * The handler method in the listener.
   */
  static final Method METHOD =
      ReflectTools.findMethod(ClickListener.class, "click", ClickEvent.class);

  /**
   * The handler method called when the timeline is left-clicked.
   *
   * @param evt the event details
   */
  void click(ClickEvent evt);

  /**
   * Event details for a click on the timeline.
   */
  public static class ClickEvent extends Component.Event {

    private final EventProperties props;
    private final Object itemId;

    /**
     * Constructs the event.
     *
     * @param source the source component
     * @param itemId the ID of the item clicked or null
     * @param props the event properties relayed from the client side
     */
    public ClickEvent(Timeline source, Object itemId, EventProperties props) {