/* 
 * Copyright 2016 iserge.
 *
 * 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 org.ol3cesium.client.ol;

import com.google.gwt.core.client.JavaScriptObject;

/**
 *
 * @author Serge Silaev aka iSergio <s.serge.b@gmail.com>
 */
public class RendererType extends JavaScriptObject {
    protected RendererType() {
        //
    }
    
    public static final String CANVAS = "canvas";
    public static final String DOM    = "dom";
    public static final String WEBGL  = "webgl";
}

/* 
 * Copyright 2016 iserge.
 *
 * 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 org.ol3cesium.client.ol;

/**
 *
 * @author Serge Silaev aka iSergio <s.serge.b@gmail.com>
 */
public enum RendererType {
    CANVAS("canvas"), DOM("dom"), WEBGL("webgl"), UNKNOWN("unknown");
    
    private final String _value;
    
    private RendererType(String value) {
        _value = value;
    }
    
    public static RendererType fromString(String string) {
        if (CANVAS.toString().equalsIgnoreCase(string)) {
            return CANVAS;
        }
        else if (DOM.toString().equalsIgnoreCase(string)) {
            return DOM;
        }
        else if (WEBGL.toString().equalsIgnoreCase(string)) {
            return WEBGL;
        } else {
            return UNKNOWN;
        }
    }
    
    @Override
    public String toString() {
        return _value;
    }
}
Add enumiration for renderer type.
Add enumiration for renderer type.