Follow us on GitHub

com.google.gwt.maps.client.mvc
Class MVCObject<T extends JavaScriptObject>

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.mvc.MVCObject<T>
Direct Known Subclasses:
AdUnitImpl, Autocomplete, BicyclingLayer, Circle, CloudLayer, DirectionsRenderer, DrawingManager, FusionTablesCell, FusionTablesLayer, GroundOverlay, InfoWindow, MapImpl, Marker, MVCArray, OverlayView, PanoramioLayer, Polygon, Polyline, Rectangle, StreetViewPanoramaImpl, TrafficLayer, TransitLayer, WeatherLayer

public class MVCObject<T extends JavaScriptObject>
extends JavaScriptObject

Base class implementing KVO.

See MVCObject API Doc


Constructor Summary
protected MVCObject()
          Base class implementing KVO.
 
Method Summary
 void bindTo(String key, MVCObject<T> target)
          Binds a View to a Model.
 void bindTo(String key, MVCObject<T> target, String targetKey)
          Binds a View to a Model.
 void bindTo(String key, MVCObject<T> target, String targetKey, boolean noNotify)
          Binds a View to a Model.
 void changed(String key)
          Generic handler for state changes.
static
<T extends JavaScriptObject>
MVCObject<T>
createInstanceOfMVCObject()
          (Main purpose is for internal use only)
create instance of MVCObject (inherited class)
 T get(String key)
          Gets a value.
 void notify(String key)
          Notify all observers of a change on this property.
 void set(String key, T value)
          Sets a value.
 void setValues(HashMap<String,String> values)
          Sets a collection of key-value pairs.
 void unbind(String key)
          Removes a binding.
 void unbindAll()
          Removes all bindings.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MVCObject

protected MVCObject()
Base class implementing KVO. use newInstance();

Method Detail

createInstanceOfMVCObject

public static final <T extends JavaScriptObject> MVCObject<T> createInstanceOfMVCObject()
(Main purpose is for internal use only)
create instance of MVCObject (inherited class)


bindTo

public final void bindTo(String key,
                         MVCObject<T> target)
Binds a View to a Model.

Parameters:
key -
target -

bindTo

public final void bindTo(String key,
                         MVCObject<T> target,
                         String targetKey)
Binds a View to a Model.

Parameters:
key -
target -
targetKey -

bindTo

public final void bindTo(String key,
                         MVCObject<T> target,
                         String targetKey,
                         boolean noNotify)
Binds a View to a Model.

Parameters:
key -
target -
targetKey -
noNotify -

changed

public final void changed(String key)
Generic handler for state changes. Override this in derived classes to handle arbitrary state changes.

Parameters:
key -

get

public final T get(String key)
Gets a value.

Parameters:
key -

notify

public final void notify(String key)
Notify all observers of a change on this property. This notifies both objects that are bound to the object's property as well as the object that it is bound to.

Parameters:
key -

set

public final void set(String key,
                      T value)
Sets a value.

Parameters:
key -
value -

setValues

public final void setValues(HashMap<String,String> values)
Sets a collection of key-value pairs.

Parameters:
values -

unbind

public final void unbind(String key)
Removes a binding. Unbinding will set the unbound property to the current value. The object will not be notified, as the value has not changed.

Parameters:
key -

unbindAll

public final void unbindAll()
Removes all bindings.



Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.