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


Java Axis.isInside方法代码示例

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


在下文中一共展示了Axis.isInside方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initAxisTextAlignment

import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void initAxisTextAlignment(Axis axis, int position) {
    namePaintTab[position].setTextAlign(Align.CENTER);
    if (TOP == position || BOTTOM == position) {
        labelPaintTab[position].setTextAlign(Align.CENTER);
    } else if (LEFT == position) {
        if (axis.isInside()) {
            labelPaintTab[position].setTextAlign(Align.LEFT);
        } else {
            labelPaintTab[position].setTextAlign(Align.RIGHT);
        }
    } else if (RIGHT == position) {
        if (axis.isInside()) {
            labelPaintTab[position].setTextAlign(Align.RIGHT);
        } else {
            labelPaintTab[position].setTextAlign(Align.LEFT);
        }
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:19,代码来源:AxesRenderer.java

示例2: initAxisTextAlignment

import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void initAxisTextAlignment(Axis axis, int position) {
    this.namePaintTab[position].setTextAlign(Align.CENTER);
    if (position == 0 || 3 == position) {
        this.labelPaintTab[position].setTextAlign(Align.CENTER);
    } else if (1 == position) {
        if (axis.isInside()) {
            this.labelPaintTab[position].setTextAlign(Align.LEFT);
        } else {
            this.labelPaintTab[position].setTextAlign(Align.RIGHT);
        }
    } else if (2 != position) {
    } else {
        if (axis.isInside()) {
            this.labelPaintTab[position].setTextAlign(Align.RIGHT);
        } else {
            this.labelPaintTab[position].setTextAlign(Align.LEFT);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:20,代码来源:AxesRenderer.java

示例3: intiTiltedLabelsTranslation

import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void intiTiltedLabelsTranslation(Axis axis, int position) {
    int pythagoreanFromLabelWidth = (int) Math.sqrt(Math.pow(labelWidthTab[position], 2) / 2);
    int pythagoreanFromAscent = (int) Math.sqrt(Math.pow(labelTextAscentTab[position], 2) / 2);
    int dx = 0;
    int dy = 0;
    if (axis.isInside()) {
        if (LEFT == position) {
            dx = pythagoreanFromAscent;
        } else if (RIGHT == position) {
            dy = -pythagoreanFromLabelWidth / 2;
        } else if (TOP == position) {
            dy = (pythagoreanFromAscent + pythagoreanFromLabelWidth / 2) - labelTextAscentTab[position];
        } else if (BOTTOM == position) {
            dy = -pythagoreanFromLabelWidth / 2;
        }
    } else {
        if (LEFT == position) {
            dy = -pythagoreanFromLabelWidth / 2;
        } else if (RIGHT == position) {
            dx = pythagoreanFromAscent;
        } else if (TOP == position) {
            dy = -pythagoreanFromLabelWidth / 2;
        } else if (BOTTOM == position) {
            dy = (pythagoreanFromAscent + pythagoreanFromLabelWidth / 2) - labelTextAscentTab[position];
        }
    }
    tiltedLabelXTranslation[position] = dx;
    tiltedLabelYTranslation[position] = dy;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:30,代码来源:AxesRenderer.java

示例4: initAxisMargin

import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void initAxisMargin(Axis axis, int position) {
    int margin = 0;
    if (!axis.isInside() && (axis.isAutoGenerated() || !axis.getValues().isEmpty())) {
        margin += axisMargin + labelDimensionForMarginsTab[position];
    }
    margin += getAxisNameMargin(axis, position);
    insetContentRectWithAxesMargins(margin, position);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:AxesRenderer.java

示例5: intiTiltedLabelsTranslation

import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void intiTiltedLabelsTranslation(Axis axis, int position) {
    int pythagoreanFromLabelWidth = (int) Math.sqrt(Math.pow((double) this.labelWidthTab[position], PathListView.ZOOM_X2) / PathListView.ZOOM_X2);
    int pythagoreanFromAscent = (int) Math.sqrt(Math.pow((double) this.labelTextAscentTab[position], PathListView.ZOOM_X2) / PathListView.ZOOM_X2);
    int dx = 0;
    int dy = 0;
    if (axis.isInside()) {
        if (1 == position) {
            dx = pythagoreanFromAscent;
        } else if (2 == position) {
            dy = (-pythagoreanFromLabelWidth) / 2;
        } else if (position == 0) {
            dy = ((pythagoreanFromLabelWidth / 2) + pythagoreanFromAscent) - this.labelTextAscentTab[position];
        } else if (3 == position) {
            dy = (-pythagoreanFromLabelWidth) / 2;
        }
    } else if (1 == position) {
        dy = (-pythagoreanFromLabelWidth) / 2;
    } else if (2 == position) {
        dx = pythagoreanFromAscent;
    } else if (position == 0) {
        dy = (-pythagoreanFromLabelWidth) / 2;
    } else if (3 == position) {
        dy = ((pythagoreanFromLabelWidth / 2) + pythagoreanFromAscent) - this.labelTextAscentTab[position];
    }
    this.tiltedLabelXTranslation[position] = dx;
    this.tiltedLabelYTranslation[position] = dy;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:28,代码来源:AxesRenderer.java

示例6: initAxisMargin

import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void initAxisMargin(Axis axis, int position) {
    int margin = 0;
    if (!axis.isInside() && (axis.isAutoGenerated() || !axis.getValues().isEmpty())) {
        margin = 0 + (this.axisMargin + this.labelDimensionForMarginsTab[position]);
    }
    insetContentRectWithAxesMargins(margin + getAxisNameMargin(axis, position), position);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:8,代码来源:AxesRenderer.java

示例7: initAxisMeasurements

import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void initAxisMeasurements(Axis axis, int position) {
    if (LEFT == position) {
        if (axis.isInside()) {
            labelBaselineTab[position] = computator.getContentRectMinusAllMargins().left + axisMargin;
            nameBaselineTab[position] = computator.getContentRectMinusAxesMargins().left - axisMargin
                    - labelTextDescentTab[position];
        } else {
            labelBaselineTab[position] = computator.getContentRectMinusAxesMargins().left - axisMargin;
            nameBaselineTab[position] = labelBaselineTab[position] - axisMargin
                    - labelTextDescentTab[position] - labelDimensionForMarginsTab[position];
        }
        separationLineTab[position] = computator.getContentRectMinusAllMargins().left;
    } else if (RIGHT == position) {
        if (axis.isInside()) {
            labelBaselineTab[position] = computator.getContentRectMinusAllMargins().right - axisMargin;
            nameBaselineTab[position] = computator.getContentRectMinusAxesMargins().right + axisMargin
                    + labelTextAscentTab[position];
        } else {
            labelBaselineTab[position] = computator.getContentRectMinusAxesMargins().right + axisMargin;
            nameBaselineTab[position] = labelBaselineTab[position] + axisMargin
                    + labelTextAscentTab[position] + labelDimensionForMarginsTab[position];
        }
        separationLineTab[position] = computator.getContentRectMinusAllMargins().right;
    } else if (BOTTOM == position) {
        if (axis.isInside()) {
            labelBaselineTab[position] = computator.getContentRectMinusAllMargins().bottom - axisMargin
                    - labelTextDescentTab[position];
            nameBaselineTab[position] = computator.getContentRectMinusAxesMargins().bottom + axisMargin
                    + labelTextAscentTab[position];
        } else {
            labelBaselineTab[position] = computator.getContentRectMinusAxesMargins().bottom + axisMargin
                    + labelTextAscentTab[position];
            nameBaselineTab[position] = labelBaselineTab[position] + axisMargin +
                    labelDimensionForMarginsTab[position];
        }
        separationLineTab[position] = computator.getContentRectMinusAllMargins().bottom;
    } else if (TOP == position) {
        if (axis.isInside()) {
            labelBaselineTab[position] = computator.getContentRectMinusAllMargins().top + axisMargin
                    + labelTextAscentTab[position];
            nameBaselineTab[position] = computator.getContentRectMinusAxesMargins().top - axisMargin
                    - labelTextDescentTab[position];
        } else {
            labelBaselineTab[position] = computator.getContentRectMinusAxesMargins().top - axisMargin
                    - labelTextDescentTab[position];
            nameBaselineTab[position] = labelBaselineTab[position] - axisMargin -
                    labelDimensionForMarginsTab[position];
        }
        separationLineTab[position] = computator.getContentRectMinusAllMargins().top;
    } else {
        throw new IllegalArgumentException("Invalid axis position: " + position);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:54,代码来源:AxesRenderer.java

示例8: initAxisMeasurements

import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void initAxisMeasurements(Axis axis, int position) {
    if (1 == position) {
        if (axis.isInside()) {
            this.labelBaselineTab[position] = (float) (this.computator.getContentRectMinusAllMargins().left + this.axisMargin);
            this.nameBaselineTab[position] = (float) ((this.computator.getContentRectMinusAxesMargins().left - this.axisMargin) - this.labelTextDescentTab[position]);
        } else {
            this.labelBaselineTab[position] = (float) (this.computator.getContentRectMinusAxesMargins().left - this.axisMargin);
            this.nameBaselineTab[position] = ((this.labelBaselineTab[position] - ((float) this.axisMargin)) - ((float) this.labelTextDescentTab[position])) - ((float) this.labelDimensionForMarginsTab[position]);
        }
        this.separationLineTab[position] = (float) this.computator.getContentRectMinusAllMargins().left;
    } else if (2 == position) {
        if (axis.isInside()) {
            this.labelBaselineTab[position] = (float) (this.computator.getContentRectMinusAllMargins().right - this.axisMargin);
            this.nameBaselineTab[position] = (float) ((this.computator.getContentRectMinusAxesMargins().right + this.axisMargin) + this.labelTextAscentTab[position]);
        } else {
            this.labelBaselineTab[position] = (float) (this.computator.getContentRectMinusAxesMargins().right + this.axisMargin);
            this.nameBaselineTab[position] = ((this.labelBaselineTab[position] + ((float) this.axisMargin)) + ((float) this.labelTextAscentTab[position])) + ((float) this.labelDimensionForMarginsTab[position]);
        }
        this.separationLineTab[position] = (float) this.computator.getContentRectMinusAllMargins().right;
    } else if (3 == position) {
        if (axis.isInside()) {
            this.labelBaselineTab[position] = (float) ((this.computator.getContentRectMinusAllMargins().bottom - this.axisMargin) - this.labelTextDescentTab[position]);
            this.nameBaselineTab[position] = (float) ((this.computator.getContentRectMinusAxesMargins().bottom + this.axisMargin) + this.labelTextAscentTab[position]);
        } else {
            this.labelBaselineTab[position] = (float) ((this.computator.getContentRectMinusAxesMargins().bottom + this.axisMargin) + this.labelTextAscentTab[position]);
            this.nameBaselineTab[position] = (this.labelBaselineTab[position] + ((float) this.axisMargin)) + ((float) this.labelDimensionForMarginsTab[position]);
        }
        this.separationLineTab[position] = (float) this.computator.getContentRectMinusAllMargins().bottom;
    } else if (position == 0) {
        if (axis.isInside()) {
            this.labelBaselineTab[position] = (float) ((this.computator.getContentRectMinusAllMargins().top + this.axisMargin) + this.labelTextAscentTab[position]);
            this.nameBaselineTab[position] = (float) ((this.computator.getContentRectMinusAxesMargins().top - this.axisMargin) - this.labelTextDescentTab[position]);
        } else {
            this.labelBaselineTab[position] = (float) ((this.computator.getContentRectMinusAxesMargins().top - this.axisMargin) - this.labelTextDescentTab[position]);
            this.nameBaselineTab[position] = (this.labelBaselineTab[position] - ((float) this.axisMargin)) - ((float) this.labelDimensionForMarginsTab[position]);
        }
        this.separationLineTab[position] = (float) this.computator.getContentRectMinusAllMargins().top;
    } else {
        throw new IllegalArgumentException("Invalid axis position: " + position);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:42,代码来源:AxesRenderer.java


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