001 package com.google.gwt.maps.client.events.removeat;
002
003 import com.google.gwt.ajaxloader.client.Properties;
004 import com.google.gwt.ajaxloader.client.Properties.TypeException;
005 import com.google.gwt.maps.client.events.MapEvent;
006
007 public class RemoveAtMapEvent extends MapEvent<RemoveAtMapHandler, RemoveAtMapEvent> {
008
009 public static Type<RemoveAtMapHandler> TYPE = new Type<RemoveAtMapHandler>();
010
011 public RemoveAtMapEvent(Properties properties) {
012 super(properties);
013 }
014
015 @Override
016 public com.google.gwt.event.shared.GwtEvent.Type<RemoveAtMapHandler> getAssociatedType() {
017 return TYPE;
018 }
019
020 @Override
021 protected void dispatch(RemoveAtMapHandler handler) {
022 handler.onEvent(this);
023 }
024
025 public int getIndex() {
026 int index = -1;
027 try {
028 index = properties.getNumber("index").intValue();
029 } catch (TypeException e) {
030 }
031 return index;
032 }
033
034 }