com.google.maps.gwt.client.ScaleControlStyle Maven / Gradle / Ivy
/*
* Copyright 2011 The Google Web Toolkit Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.maps.gwt.client;
import com.google.gwt.core.client.JavaScriptObject;
import java.util.HashMap;
import java.util.Map;
/**
* Identifiers for scale control ids.
*
* THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
*/
public class ScaleControlStyle extends JavaScriptObject {
/**
* The standard scale control.
*/
public static final ScaleControlStyle DEFAULT = getDefault();
/**
* Internal registry for value types.
*/
private static Map registry;
/**
* Access the enum instance using the underlying value of the type.
*/
public static final ScaleControlStyle fromValue(double value){
return registry.get(value);
}
/**
* Internal initialization method.
*/
private static final native ScaleControlStyle getDefault()/*-{
var instance = { 'value' : $wnd.google.maps.ScaleControlStyle.DEFAULT };
@com.google.maps.gwt.client.ScaleControlStyle::register(Lcom/google/maps/gwt/client/ScaleControlStyle;)(instance);
return instance;
}-*/;
/**
* Internal registration of type for future access.
*/
private static final void register(ScaleControlStyle value){
if (registry == null) {
registry = new HashMap();
}
registry.put(value.getValue(),value);
}
/**
* Protected constructor avoids default public constructor.
*/
protected ScaleControlStyle() {
/* Java constructor is protected, */
}
/**
* Access the underlying value of the type.
*/
public final native double getValue()/*-{
return this.value;
}-*/;
}