| 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2012, 2014 Ericsson |
| 3 | * |
| 4 | * All rights reserved. This program and the accompanying materials are |
| 5 | * made available under the terms of the Eclipse Public License v1.0 which |
| 6 | * accompanies this distribution, and is available at |
| 7 | * http://www.eclipse.org/legal/epl-v10.html |
| 8 | * |
| 9 | * Contributors: |
| 10 | * Patrick Tasse - Initial API and implementation |
| 11 | *******************************************************************************/ |
| 12 | |
| 13 | package org.eclipse.tracecompass.tmf.ui.widgets.timegraph; |
| 14 | |
| 15 | import java.util.EventObject; |
| 16 | |
| 17 | /** |
| 18 | * Notifier for the time graph that the time range has been updated. |
| 19 | * |
| 20 | * @version 1.0 |
| 21 | * @author Patrick Tasse |
| 22 | */ |
| 23 | public class TimeGraphRangeUpdateEvent extends EventObject { |
| 24 | |
| 25 | /** |
| 26 | * Default serial version UID for this class. |
| 27 | * @since 1.0 |
| 28 | */ |
| 29 | private static final long serialVersionUID = 1L; |
| 30 | |
| 31 | /** |
| 32 | * The start time. |
| 33 | */ |
| 34 | private final long fStartTime; |
| 35 | |
| 36 | /** |
| 37 | * The end time. |
| 38 | */ |
| 39 | private final long fEndTime; |
| 40 | |
| 41 | /** |
| 42 | * Standard constructor |
| 43 | * |
| 44 | * @param source |
| 45 | * The source of this event |
| 46 | * @param startTime |
| 47 | * The start time |
| 48 | * @param endTime |
| 49 | * The end time |
| 50 | */ |
| 51 | public TimeGraphRangeUpdateEvent(Object source, long startTime, long endTime) { |
| 52 | super(source); |
| 53 | fStartTime = startTime; |
| 54 | fEndTime = endTime; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * @return the start time |
| 59 | */ |
| 60 | public long getStartTime() { |
| 61 | return fStartTime; |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * @return the end time |
| 66 | */ |
| 67 | public long getEndTime() { |
| 68 | return fEndTime; |
| 69 | } |
| 70 | |
| 71 | } |