本文整理汇总了Java中de.erichseifert.gral.plots.points.PointRenderer.isValueVisible方法的典型用法代码示例。如果您正苦于以下问题:Java PointRenderer.isValueVisible方法的具体用法?Java PointRenderer.isValueVisible怎么用?Java PointRenderer.isValueVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.erichseifert.gral.plots.points.PointRenderer
的用法示例。
在下文中一共展示了PointRenderer.isValueVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValue
import de.erichseifert.gral.plots.points.PointRenderer; //导入方法依赖的package包/类
/**
* Returns a graphical representation of the value label to be drawn for
* the specified data value.
* @param data Information on axes, renderers, and values.
* @param shape Outline that describes the bounds for the value label.
* @return Component that can be used to draw the value label.
*/
@Override
public Drawable getValue(final PointData data, final Shape shape) {
return new AbstractDrawable() {
/** Version id for serialization. */
private static final long serialVersionUID1 = -1133369168849171793L;
public void draw(DrawingContext context) {
PointRenderer renderer = BarRenderer.this;
Row row = data.row;
if (renderer.isValueVisible()) {
int colValue = renderer.getValueColumn();
drawValueLabel(context, shape, row, data.index, colValue);
}
}
};
}
示例2: getValue
import de.erichseifert.gral.plots.points.PointRenderer; //导入方法依赖的package包/类
@Override
public Drawable getValue(final PointData data, final Shape shape) {
return new AbstractDrawable() {
/** Version id for serialization. */
private static final long serialVersionUID1 = 8389872806138135038L;
public void draw(DrawingContext context) {
PointRenderer renderer = PieSliceRenderer.this;
Row row = data.row;
if (shape == null) {
return;
}
Slice slice = getSlice(data);
if (!slice.visible) {
return;
}
PlotArea plotArea = plot.getPlotArea();
double plotAreaSize = Math.min(
plotArea.getWidth(), plotArea.getHeight())/2.0;
double radiusRel = plot.getRadius();
double radius1 = plotAreaSize*radiusRel;
if (renderer.isValueVisible()) {
drawValueLabel(context, slice, radius1, row, data.index);
}
}
};
}