All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pepstock.charba.client.defaults.IsDefaultPointStyleHandler Maven / Gradle / Ivy

There is a newer version: 6.5-gwt
Show newest version
/**
    Copyright 2017 Andrea "Stock" Stocchero

    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.pepstock.charba.client.defaults;

import org.pepstock.charba.client.dom.elements.Img;
import org.pepstock.charba.client.enums.PointStyle;
import org.pepstock.charba.client.items.Undefined;

/**
 * Interface to define the point styles in the options elements.
 * 
 * @author Andrea "Stock" Stocchero
 *
 */
public interface IsDefaultPointStyleHandler {

	/**
	 * Returns the style of the point.
	 * 
	 * @return the style of the point.
	 */
	default PointStyle getPointStyle() {
		return PointStyle.CIRCLE;
	}

	/**
	 * Returns true if the point style is set by an {@link Img}.
	 * 
	 * @return true if the point style is set by an {@link Img}
	 */
	default boolean isPointStyleAsImage() {
		return false;
	}

	/**
	 * Returns the style of the point as image.
* If property is missing or not an image, returns null. * * @return image of the style of the point as image.
* If property is missing or not a image, returns null. */ default Img getPointStyleAsImage() { return Undefined.IMAGE_ELEMENT; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy