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

software.xdev.chartjs.model.options.Title Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
/*
 * Copyright © 2023 XDEV Software (https://xdev.software)
 *
 * 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 software.xdev.chartjs.model.options;

/**
 * @see ChartJS docs
 */
public class Title
{
	protected String align;
	protected Object color;
	protected Boolean display;
	protected Boolean fullSize;
	protected String position;
	protected Font font;
	protected Integer padding;
	protected String text;
	
	/**
	 * @see #setAlign(String)
	 */
	public String getAlign()
	{
		return this.align;
	}
	
	/**
	 * Alignment of the title
	 *
	 * 

Default: center

*/ public Title setAlign(final String align) { this.align = align; return this; } /** * @see #setColor(Object) */ public Object getColor() { return this.color; } /** * Color of text */ public Title setColor(final Object color) { this.color = color; return this; } /** * @see #setFullSize(Boolean) */ public Boolean getFullSize() { return this.fullSize; } /** * Marks that this box should take the full width/height of the canvas. If false, the box is sized and placed * above/beside the chart area. * *

Default: true

*/ public Title setFullSize(final Boolean fullSize) { this.fullSize = fullSize; return this; } public Font getFont() { return this.font; } public Title setFont(final Font font) { this.font = font; return this; } /** * @see #setDisplay(Boolean) */ public Boolean getDisplay() { return this.display; } /** *

* Display the title block *

* *

* Default {@code false} *

*/ public Title setDisplay(final Boolean display) { this.display = display; return this; } /** * @see #setPosition(String) */ public String getPosition() { return this.position; } /** *

* Position of the title. Only 'top' or 'bottom' are currently allowed *

* *

* Default {@code 'top'} *

*/ public Title setPosition(final String position) { this.position = position; return this; } /** * @see #setPadding(Integer) */ public Integer getPadding() { return this.padding; } /** *

* Number of pixels to add above and below the title text *

* *

* Default {@code 10} *

*/ public Title setPadding(final Integer padding) { this.padding = padding; return this; } /** * @see #setText(String) */ public String getText() { return this.text; } /** *

* Title text *

* *

* Default {@code ""} *

*/ public Title setText(final String text) { this.text = text; return this; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy