当前位置: 首页>>代码示例>>Java>>正文


Java Utils.convertStrings方法代码示例

本文整理汇总了Java中com.github.mikephil.charting.utils.Utils.convertStrings方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.convertStrings方法的具体用法?Java Utils.convertStrings怎么用?Java Utils.convertStrings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.github.mikephil.charting.utils.Utils的用法示例。


在下文中一共展示了Utils.convertStrings方法的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);
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:22,代码来源:Legend.java

示例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);
}
 
开发者ID:letolab,项目名称:LETO-Toggl_Android,代码行数:22,代码来源:Legend.java

示例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;
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:21,代码来源:Legend.java

示例4: setComputedLabels

import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
 * This method sets the automatically computed labels for the legend. Use setCustom(...) to set custom labels.
 *
 * @param labels
 */
public void setComputedLabels(List<String> labels) {
    if (mLabels != null && mLabels.length == labels.size()) {
        Utils.copyStrings(labels, mLabels);
    } else {
        mLabels = Utils.convertStrings(labels);
    }
}
 
开发者ID:letolab,项目名称:LETO-Toggl_Android,代码行数:13,代码来源:Legend.java

示例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);
    }
}
 
开发者ID:letolab,项目名称:LETO-Toggl_Android,代码行数:20,代码来源:Legend.java

示例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));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:Legend.java

示例7: setComputedLabels

import com.github.mikephil.charting.utils.Utils; //导入方法依赖的package包/类
/**
 * This method sets the automatically computed labels for the legend. Use setCustom(...) to set custom labels.
 * @param labels
 */
public void setComputedLabels(List<String> labels) {
    mLabels = Utils.convertStrings(labels);
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:8,代码来源:Legend.java

示例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);
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:11,代码来源:Legend.java


注:本文中的com.github.mikephil.charting.utils.Utils.convertStrings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。