本文整理汇总了Java中com.github.mikephil.charting.utils.Utils.convertIntegers方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.convertIntegers方法的具体用法?Java Utils.convertIntegers怎么用?Java Utils.convertIntegers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.mikephil.charting.utils.Utils
的用法示例。
在下文中一共展示了Utils.convertIntegers方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Legend
import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
* Constructor. Provide colors and labels for the legend.
*
* @param colors
* @param labels
*/
public Legend(List<Integer> colors, List<String> labels) {
this();
if (colors == null || labels == null) {
throw new IllegalArgumentException("colors array or labels array is NULL");
}
if (colors.size() != labels.size()) {
throw new IllegalArgumentException(
"colors array and labels array need to be of same size");
}
this.mColors = Utils.convertIntegers(colors);
this.mLabels = Utils.convertStrings(labels);
}
示例2: Legend
import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
* Constructor. Provide colors and labels for the legend.
*
* @param colors
* @param labels
*/
public Legend(List<Integer> colors, List<String> labels) {
this();
if (colors == null || labels == null) {
throw new IllegalArgumentException("colors array or labels array is NULL");
}
if (colors.size() != labels.size()) {
throw new IllegalArgumentException(
"colors array and labels array need to be of same size");
}
this.mColors = Utils.convertIntegers(colors);
this.mLabels = Utils.convertStrings(labels);
}
示例3: setCustom
import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
* Sets a custom legend's labels and colors arrays. The colors count should
* match the labels count. * Each color is for the form drawn at the same
* index. * A null label will start a group. * A ColorTemplate.COLOR_SKIP
* color will avoid drawing a form This will disable the feature that
* automatically calculates the legend labels and colors from the datasets.
* Call resetCustom() to re-enable automatic calculation (and then
* notifyDataSetChanged() is needed to auto-calculate the legend again)
*/
public void setCustom(List<Integer> colors, List<String> labels) {
if (colors.size() != labels.size()) {
throw new IllegalArgumentException(
"colors array and labels array need to be of same size");
}
mColors = Utils.convertIntegers(colors);
mLabels = Utils.convertStrings(labels);
mIsLegendCustom = true;
}
示例4: setComputedColors
import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
* This method sets the automatically computed colors for the legend. Use setCustom(...) to set custom colors.
*
* @param colors
*/
public void setComputedColors(List<Integer> colors) {
if (mColors != null && colors.size() == mColors.length) {
Utils.copyIntegers(colors, mColors);
} else {
mColors = Utils.convertIntegers(colors);
}
}
示例5: setExtra
import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
* Colors and labels that will be appended to the end of the auto calculated
* colors and labels arrays after calculating the legend. (if the legend has
* already been calculated, you will need to call notifyDataSetChanged() to
* let the changes take effect)
*/
public void setExtra(List<Integer> colors, List<String> labels) {
if (mExtraColors != null && mExtraColors.length == colors.size()) {
Utils.copyIntegers(colors, mExtraColors);
} else {
this.mExtraColors = Utils.convertIntegers(colors);
}
if (mExtraLabels != null && mExtraLabels.length == labels.size()) {
Utils.copyStrings(labels, mExtraLabels);
} else {
this.mExtraLabels = Utils.convertStrings(labels);
}
}
示例6: Legend
import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
@Deprecated
public Legend(List<Integer> colors, List<String> labels) {
this(Utils.convertIntegers(colors), Utils.convertStrings(labels));
}
示例7: setComputedColors
import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
* This method sets the automatically computed colors for the legend. Use setCustom(...) to set custom colors.
* @param colors
*/
public void setComputedColors(List<Integer> colors) {
mColors = Utils.convertIntegers(colors);
}
示例8: setExtra
import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
* Colors and labels that will be appended to the end of the auto calculated
* colors and labels arrays after calculating the legend. (if the legend has
* already been calculated, you will need to call notifyDataSetChanged() to
* let the changes take effect)
*/
public void setExtra(List<Integer> colors, List<String> labels) {
this.mExtraColors = Utils.convertIntegers(colors);
this.mExtraLabels = Utils.convertStrings(labels);
}