1 /*
2  * BreakpointSetEvent.java
3  *
4  * Copyright (C) 2021 by RStudio, PBC
5  *
6  * Unless you have received this program directly from RStudio pursuant
7  * to the terms of a commercial license agreement with RStudio, then
8  * this program is licensed to you under the terms of version 3 of the
9  * GNU Affero General Public License. This program is distributed WITHOUT
10  * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
12  * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
13  *
14  */
15 package org.rstudio.studio.client.workbench.views.source.editors.text.events;
16 
17 
18 import com.google.gwt.event.shared.EventHandler;
19 import com.google.gwt.event.shared.GwtEvent;
20 
21 public class BreakpointMoveEvent extends GwtEvent<BreakpointMoveEvent.Handler>
22 {
23    public interface Handler extends EventHandler
24    {
onBreakpointMove(BreakpointMoveEvent event)25       void onBreakpointMove(BreakpointMoveEvent event);
26    }
27 
BreakpointMoveEvent(int breakpointId)28    public BreakpointMoveEvent(int breakpointId)
29    {
30       breakpointId_ = breakpointId;
31    }
32 
getBreakpointId()33    public int getBreakpointId()
34    {
35       return breakpointId_;
36    }
37 
38    @Override
getAssociatedType()39    public Type<Handler> getAssociatedType()
40    {
41       return TYPE;
42    }
43 
44    @Override
dispatch(Handler handler)45    protected void dispatch(Handler handler)
46    {
47       handler.onBreakpointMove(this);
48    }
49 
50    public static final Type<Handler> TYPE = new Type<>();
51 
52    private int breakpointId_;
53 }
54