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


Java PointerNeedle类代码示例

本文整理汇总了Java中org.jfree.chart.needle.PointerNeedle的典型用法代码示例。如果您正苦于以下问题:Java PointerNeedle类的具体用法?Java PointerNeedle怎么用?Java PointerNeedle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: testEquals

import org.jfree.chart.needle.PointerNeedle; //导入依赖的package包/类
/**
 * Check that the equals() method can distinguish all fields.
 */
public void testEquals() {
   PointerNeedle n1 = new PointerNeedle();
   PointerNeedle n2 = new PointerNeedle();
   assertTrue(n1.equals(n2));
   assertTrue(n2.equals(n1));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:10,代码来源:PointerNeedleTests.java

示例2: setSeriesNeedle

import org.jfree.chart.needle.PointerNeedle; //导入依赖的package包/类
/**
 * Sets the needle for a series.
 *
 * @param index  the series index.
 * @param type  the needle type.
 */
public void setSeriesNeedle(int index, int type) {
    switch (type) {
        case 0:
            setSeriesNeedle(index, new ArrowNeedle(true));
            setSeriesPaint(index, Color.red);
            this.seriesNeedle[index].setHighlightPaint(Color.white);
            break;
        case 1:
            setSeriesNeedle(index, new LineNeedle());
            break;
        case 2:
            MeterNeedle longNeedle = new LongNeedle();
            longNeedle.setRotateY(0.5);
            setSeriesNeedle(index, longNeedle);
            break;
        case 3:
            setSeriesNeedle(index, new PinNeedle());
            break;
        case 4:
            setSeriesNeedle(index, new PlumNeedle());
            break;
        case 5:
            setSeriesNeedle(index, new PointerNeedle());
            break;
        case 6:
            setSeriesPaint(index, null);
            setSeriesOutlineStroke(index, new BasicStroke(3));
            setSeriesNeedle(index, new ShipNeedle());
            break;
        case 7:
            setSeriesPaint(index, Color.blue);
            setSeriesNeedle(index, new WindNeedle());
            break;
        case 8:
            setSeriesNeedle(index, new ArrowNeedle(true));
            break;
        case 9:
            setSeriesNeedle(index, new MiddlePinNeedle());
            break;

        default:
            String message = "CompassPlot.setSeriesNeedle(...): unrecognised type.";
            throw new IllegalArgumentException(message);
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:53,代码来源:CompassPlot.java

示例3: setSeriesNeedle

import org.jfree.chart.needle.PointerNeedle; //导入依赖的package包/类
/**
 * Sets the needle for a series.  The needle type is one of the following:
 * <ul>
 * <li>0 = {@link ArrowNeedle};</li>
 * <li>1 = {@link LineNeedle};</li>
 * <li>2 = {@link LongNeedle};</li>
 * <li>3 = {@link PinNeedle};</li>
 * <li>4 = {@link PlumNeedle};</li>
 * <li>5 = {@link PointerNeedle};</li>
 * <li>6 = {@link ShipNeedle};</li>
 * <li>7 = {@link WindNeedle};</li>
 * <li>8 = {@link ArrowNeedle};</li>
 * <li>9 = {@link MiddlePinNeedle};</li>
 * </ul>
 * @param index  the series index.
 * @param type  the needle type.
 * 
 * @see #setSeriesNeedle(int)
 */
public void setSeriesNeedle(int index, int type) {
    switch (type) {
        case 0:
            setSeriesNeedle(index, new ArrowNeedle(true));
            setSeriesPaint(index, Color.red);
            this.seriesNeedle[index].setHighlightPaint(Color.white);
            break;
        case 1:
            setSeriesNeedle(index, new LineNeedle());
            break;
        case 2:
            MeterNeedle longNeedle = new LongNeedle();
            longNeedle.setRotateY(0.5);
            setSeriesNeedle(index, longNeedle);
            break;
        case 3:
            setSeriesNeedle(index, new PinNeedle());
            break;
        case 4:
            setSeriesNeedle(index, new PlumNeedle());
            break;
        case 5:
            setSeriesNeedle(index, new PointerNeedle());
            break;
        case 6:
            setSeriesPaint(index, null);
            setSeriesOutlineStroke(index, new BasicStroke(3));
            setSeriesNeedle(index, new ShipNeedle());
            break;
        case 7:
            setSeriesPaint(index, Color.blue);
            setSeriesNeedle(index, new WindNeedle());
            break;
        case 8:
            setSeriesNeedle(index, new ArrowNeedle(true));
            break;
        case 9:
            setSeriesNeedle(index, new MiddlePinNeedle());
            break;

        default:
            throw new IllegalArgumentException("Unrecognised type.");
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:65,代码来源:CompassPlot.java

示例4: setSeriesNeedle

import org.jfree.chart.needle.PointerNeedle; //导入依赖的package包/类
/**
 * Sets the needle for a series.  The needle type is one of the following:
 * <ul>
 * <li>0 = {@link ArrowNeedle};</li>
 * <li>1 = {@link LineNeedle};</li>
 * <li>2 = {@link LongNeedle};</li>
 * <li>3 = {@link PinNeedle};</li>
 * <li>4 = {@link PlumNeedle};</li>
 * <li>5 = {@link PointerNeedle};</li>
 * <li>6 = {@link ShipNeedle};</li>
 * <li>7 = {@link WindNeedle};</li>
 * <li>8 = {@link ArrowNeedle};</li>
 * <li>9 = {@link MiddlePinNeedle};</li>
 * </ul>
 * @param index  the series index.
 * @param type  the needle type.
 *
 * @see #setSeriesNeedle(int)
 */
public void setSeriesNeedle(int index, int type) {
    switch (type) {
        case 0:
            setSeriesNeedle(index, new ArrowNeedle(true));
            setSeriesPaint(index, Color.red);
            this.seriesNeedle[index].setHighlightPaint(Color.white);
            break;
        case 1:
            setSeriesNeedle(index, new LineNeedle());
            break;
        case 2:
            MeterNeedle longNeedle = new LongNeedle();
            longNeedle.setRotateY(0.5);
            setSeriesNeedle(index, longNeedle);
            break;
        case 3:
            setSeriesNeedle(index, new PinNeedle());
            break;
        case 4:
            setSeriesNeedle(index, new PlumNeedle());
            break;
        case 5:
            setSeriesNeedle(index, new PointerNeedle());
            break;
        case 6:
            setSeriesPaint(index, null);
            setSeriesOutlineStroke(index, new BasicStroke(3));
            setSeriesNeedle(index, new ShipNeedle());
            break;
        case 7:
            setSeriesPaint(index, Color.blue);
            setSeriesNeedle(index, new WindNeedle());
            break;
        case 8:
            setSeriesNeedle(index, new ArrowNeedle(true));
            break;
        case 9:
            setSeriesNeedle(index, new MiddlePinNeedle());
            break;

        default:
            throw new IllegalArgumentException("Unrecognised type.");
    }

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:65,代码来源:CompassPlot.java

示例5: setSeriesNeedle

import org.jfree.chart.needle.PointerNeedle; //导入依赖的package包/类
/**
 * Sets the needle for a series.  The needle type is one of the following:
 * <ul>
 * <li>0 = {@link ArrowNeedle};</li>
 * <li>1 = {@link LineNeedle};</li>
 * <li>2 = {@link LongNeedle};</li>
 * <li>3 = {@link PinNeedle};</li>
 * <li>4 = {@link PlumNeedle};</li>
 * <li>5 = {@link PointerNeedle};</li>
 * <li>6 = {@link ShipNeedle};</li>
 * <li>7 = {@link WindNeedle};</li>
 * <li>8 = {@link ArrowNeedle};</li>
 * <li>9 = {@link MiddlePinNeedle};</li>
 * </ul>
 * @param index  the series index.
 * @param type  the needle type.
 *
 * @see #setSeriesNeedle(int)
 */
public void setSeriesNeedle(int index, int type) {
    switch (type) {
        case 0:
            setSeriesNeedle(index, new ArrowNeedle(true));
            setSeriesPaint(index, Color.RED);
            this.seriesNeedle[index].setHighlightPaint(Color.WHITE);
            break;
        case 1:
            setSeriesNeedle(index, new LineNeedle());
            break;
        case 2:
            MeterNeedle longNeedle = new LongNeedle();
            longNeedle.setRotateY(0.5);
            setSeriesNeedle(index, longNeedle);
            break;
        case 3:
            setSeriesNeedle(index, new PinNeedle());
            break;
        case 4:
            setSeriesNeedle(index, new PlumNeedle());
            break;
        case 5:
            setSeriesNeedle(index, new PointerNeedle());
            break;
        case 6:
            setSeriesPaint(index, null);
            setSeriesOutlineStroke(index, new BasicStroke(3));
            setSeriesNeedle(index, new ShipNeedle());
            break;
        case 7:
            setSeriesPaint(index, Color.BLUE);
            setSeriesNeedle(index, new WindNeedle());
            break;
        case 8:
            setSeriesNeedle(index, new ArrowNeedle(true));
            break;
        case 9:
            setSeriesNeedle(index, new MiddlePinNeedle());
            break;

        default:
            throw new IllegalArgumentException("Unrecognised type.");
    }

}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:65,代码来源:CompassPlot.java


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