
com.extjs.gxt.charts.client.model.axis.YAxis Maven / Gradle / Ivy
/*
* Ext GWT - Ext for GWT
* Copyright(c) 2007-2009, Ext JS, LLC.
* [email protected]
*
* http://extjs.com/license
*/
package com.extjs.gxt.charts.client.model.axis;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
/**
* OFC y-axis.
*/
public class YAxis extends AbstractAxis {
/**
* Adds the labels.
*
* @param list the labels
*/
public void addLabels(List list) {
Collection labels = checkLabels();
labels.addAll(list);
}
/**
* Adds the labels.
*
* @param list the labels
*/
public void addLabels(String... list) {
Collection labels = checkLabels();
labels.addAll(Arrays.asList(list));
}
/**
* Returns the labels.
*
* @return the labels
*/
public Collection getLabels() {
return checkLabels();
}
/**
* Returns the tick length.
*
* @return the tick length
*/
public Integer getTickLength() {
return (Integer)get("tick-length");
}
/**
* Sets the labels.
*
* @param list the new labels
*/
public void setLabels(List list) {
Collection labels = checkLabels();
labels.clear();
labels.addAll(list);
}
/**
* Sets the labels.
*
* @param labels the new labels
*/
public void setLabels(String... labels) {
setLabels(Arrays.asList(labels));
}
/**
* Sets the tick length.
*
* @param tickLength the new tick length
*/
public void setTickLength(Integer tickLength) {
set("tick-length", tickLength);
}
private Collection checkLabels() {
Collection labels = get("labels");
if (labels == null) {
labels = new ArrayList();
set("labels", labels);
}
return labels;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy