Skip to content

Commit

Permalink
Added event types constants + cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zak905 committed Sep 18, 2016
1 parent a5924ed commit a0a8fe3
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

/**
* The Class DragEndEvent.
* @author <a href="mailto:zakaria.amine88@gmail.com">Zakaria Amine</a>
*/
public class DragEndEvent extends Event {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

/**
* The Class ErrorEvent.
* @author <a href="mailto:zakaria.amine88@gmail.com">Zakaria Amine</a>
*/
@JsType
public class ErrorEvent extends Event {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/gwidgets/api/leaflet/events/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

/**
* The base event object. All other event objects contain these properties too.
* @author <a href="mailto:zakaria.amine88@gmail.com">Zakaria Amine</a>
*/
@JsType
public class Event extends JavaScriptObject {
Expand Down
109 changes: 109 additions & 0 deletions src/main/java/com/gwidgets/api/leaflet/events/EventTypes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
package com.gwidgets.api.leaflet.events;

public class EventTypes {

private EventTypes() {

}


public static class Map{
public static final String CLICK = "click";
public static final String DBLCLICK = "dblclick";
public static final String MOUSEDOWN = "mousedown";
public static final String MOUSEUP = "mouseup";
public static final String MOUSEOVER = "mouseover";
public static final String MOUSEOUT = "mouseout";
public static final String MOUSEMOVE = "mousemove";
public static final String CONTEXTMENU = "contextmenu";
public static final String FOCUS = "focus";
public static final String BLUR = "blur";
public static final String PRECLICK = "preclick";
public static final String LOAD = "UNLOAD";
public static final String VIEWRESET = "viewreset";
public static final String MOVESTART = "movestart";
public static final String MOVE = "move";
public static final String MOVEEND = "moveend";
public static final String DRAGSTART = "dragstart";
public static final String DRAG = "drag";
public static final String DRAGEND = "dragend";
public static final String ZOOMSTART = "zoomstart";
public static final String ZOOMEND = "zoomend";
public static final String ZOOMLEVELSCHANGE = "zoomlevelschange";
public static final String RESIZE = "resize";
public static final String AUTOPANSTART = "autopanstart";
public static final String LAYERADD = "layeradd";
public static final String LAYERREMOVE = "layerremove";
public static final String BASELAYERCHANGE = "baselayerchange";
public static final String OVERLAYADD = "overlayadd";
public static final String OVERLAYREMOVE = "overlayremove";
public static final String LOCATIONFOUND = "locationfound";
public static final String LOCATIONERROR = "locationerror";
public static final String POPUPOPEN = "popupopen";
public static final String POPUPCLOSE = "popupclose";
}

public static class Marker{
public static final String CLICK = "click";
public static final String DBLCLICK = "dblclick";
public static final String MOUSEDOWN = "mousedown";
public static final String MOUSEOVER = "mouseover";
public static final String MOUSEOUT = "mouseout";
public static final String CONTEXTMENU = "contextmenu";
public static final String MOVE = "move";
public static final String DRAGSTART = "dragstart";
public static final String DRAG = "drag";
public static final String DRAGEND = "dragend";
public static final String ADD = "add";
public static final String REMOVE = "remove";
public static final String POPUPOPEN = "popupopen";
public static final String POPUPCLOSE = "popupclose";
}

public static class TileLayer{
public static final String LOADING = "loading";
public static final String LOAD = "load";
public static final String TILELOADSTART = "tileloadstart";
public static final String TILELOAD = "tileload";
public static final String TILEUNLOAD = "tileunload";
public static final String TILEERROR = "tileerror";
}

public static class Path{
public static final String CLICK = "click";
public static final String DBLCLICK = "dblclick";
public static final String MOUSEDOWN = "mousedown";
public static final String MOUSEOVER = "mouseover";
public static final String MOUSEOUT = "mouseout";
public static final String CONTEXTMENU = "contextmenu";
public static final String ADD = "add";
public static final String REMOVE = "remove";
public static final String POPUPOPEN = "popupopen";
public static final String POPUPCLOSE = "popupclose";
}

public static class FeatureGroup{
public static final String CLICK = "click";
public static final String DBLCLICK = "dblclick";
public static final String MOUSEOVER = "mouseover";
public static final String MOUSEOUT = "mouseout";
public static final String MOUSEMOVE = "mousemove";
public static final String CONTEXTMENU = "contextmenu";
public static final String LAYERADD = "layeradd";
public static final String LAYERREMOVE = "layerremove";
}

public static class ControlLayers{
public static final String BASELAYERCHANGE = "baselayerchange";
public static final String OVERLAYADD = "overlayadd";
public static final String OVERLAYREMOVE = "overlayremove";
}

public static class PosAnimation {
public static final String START = "start";
public static final String STEP = "step";
public static final String END = "end";
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

/**
* The Class GeoJSONEvent.
* @author <a href="mailto:zakaria.amine88@gmail.com">Zakaria Amine</a>
*/
@JsType
public class GeoJSONEvent extends Event {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

/**
* The Class LayerEvent.
* @author <a href="mailto:zakaria.amine88@gmail.com">Zakaria Amine</a>
*/
@JsType
public class LayerEvent extends Event {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@

/**
* The Class LayerControlEvent.
* @author <a href="mailto:zakaria.amine88@gmail.com">Zakaria Amine</a>
*/
@JsType
public class LayerControlEvent extends Event {
public class LayersControlEvent extends Event {


protected LayerControlEvent() {
protected LayersControlEvent() {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

/**
* The Class LocationEvent.
* @author <a href="mailto:zakaria.amine88@gmail.com">Zakaria Amine</a>
*/
@JsType
public class LocationEvent extends Event {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

/**
* The Class MouseEvent.
* @author <a href="mailto:zakaria.amine88@gmail.com">Zakaria Amine</a>
*/
@JsType
public class MouseEvent extends Event {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private ControlAttributionOptions(){
private String prefix;

/**
* Gets the position of the control (one of the map corners). See class constants for possibe values
* Gets the position of the control (one of the map corners). See class constants for possible values
* </br>
*default "bottomright"
* @return the position
Expand Down

0 comments on commit a0a8fe3

Please sign in to comment.