Java 类org.jfree.chart.needle.MeterNeedle 实例源码

项目:parabuild-ci    文件:CompassPlot.java   
/**
 * Sets the needle for a series.
 *
 * @param index  the series index.
 * @param needle  the needle.
 */
public void setSeriesNeedle(int index, MeterNeedle needle) {

    if ((needle != null) && (index < this.seriesNeedle.length)) {
        this.seriesNeedle[index] = needle;
    }
    notifyListeners(new PlotChangeEvent(this));

}
项目:parabuild-ci    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param data  the new dataset.
 * @param needle  the needle.
 */
public void addData(ValueDataset data, MeterNeedle needle) {

    if (data != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = data;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        data.addChangeListener(this);
    }
}
项目:parabuild-ci    文件:CompassPlot.java   
/**
 * Sets the needle for a series and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param index  the series index.
 * @param needle  the needle.
 */
public void setSeriesNeedle(int index, MeterNeedle needle) {

    if ((needle != null) && (index < this.seriesNeedle.length)) {
        this.seriesNeedle[index] = needle;
    }
    notifyListeners(new PlotChangeEvent(this));

}
项目:parabuild-ci    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:ccu-historian    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:jfreechart    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset ({@code null} ignored).
 * @param needle  the needle ({@code null} permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:aya-lang    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:HTML5_WebSite    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:populus    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:PI    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:nabs    文件:CompassPlot.java   
/**
 * Sets the needle for a series and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param index  the series index.
 * @param needle  the needle.
 */
public void setSeriesNeedle(int index, MeterNeedle needle) {

    if ((needle != null) && (index < this.seriesNeedle.length)) {
        this.seriesNeedle[index] = needle;
    }
    notifyListeners(new PlotChangeEvent(this));

}
项目:nabs    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:ECG-Viewer    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:astor    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:opensim-gui    文件:CompassPlot.java   
/**
 * Sets the needle for a series.
 *
 * @param index  the series index.
 * @param needle  the needle.
 */
public void setSeriesNeedle(int index, MeterNeedle needle) {

    if ((needle != null) && (index < this.seriesNeedle.length)) {
        this.seriesNeedle[index] = needle;
    }
    notifyListeners(new PlotChangeEvent(this));

}
项目:opensim-gui    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:group-five    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:manydesigns.cn    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:buffer_bci    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:buffer_bci    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:proyecto-teoria-control-utn-frro    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:Memetic-Algorithm-for-TSP    文件:CompassPlot.java   
/**
 * Adds a dataset to the compass.
 *
 * @param dataset  the new dataset (<code>null</code> ignored).
 * @param needle  the needle (<code>null</code> permitted).
 */
public void addDataset(ValueDataset dataset, MeterNeedle needle) {

    if (dataset != null) {
        int i = this.datasets.length + 1;
        ValueDataset[] t = new ValueDataset[i];
        MeterNeedle[] p = new MeterNeedle[i];
        i = i - 2;
        for (; i >= 0; --i) {
            t[i] = this.datasets[i];
            p[i] = this.seriesNeedle[i];
        }
        i = this.datasets.length;
        t[i] = dataset;
        p[i] = ((needle != null) ? needle : p[i - 1]);

        ValueDataset[] a = this.datasets;
        MeterNeedle[] b = this.seriesNeedle;
        this.datasets = t;
        this.seriesNeedle = p;

        for (--i; i >= 0; --i) {
            a[i] = null;
            b[i] = null;
        }
        dataset.addChangeListener(this);
    }
}
项目:parabuild-ci    文件:CompassPlot.java   
/**
 * 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);
    }

}
项目:parabuild-ci    文件:MeterNeedleTests.java   
/**
 * Check that the equals() method can distinguish all fields.
 */
public void testEquals() {
    MeterNeedle n1 = new LineNeedle();
    MeterNeedle n2 = new LineNeedle();
    assertTrue(n1.equals(n2));

    n1.setFillPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setFillPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.blue));
    assertTrue(n1.equals(n2));

    n1.setOutlinePaint(new GradientPaint(5.0f, 6.0f, Color.red, 7.0f, 8.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setOutlinePaint(new GradientPaint(5.0f, 6.0f, Color.red, 7.0f, 8.0f, Color.blue));
    assertTrue(n1.equals(n2));

    n1.setHighlightPaint(new GradientPaint(9.0f, 0.0f, Color.red, 1.0f, 2.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setHighlightPaint(new GradientPaint(9.0f, 0.0f, Color.red, 1.0f, 2.0f, Color.blue));
    assertTrue(n1.equals(n2));

    Stroke s = new BasicStroke(1.23f);
    n1.setOutlineStroke(s);
    assertFalse(n1.equals(n2));
    n2.setOutlineStroke(s);
    assertTrue(n1.equals(n2));

    n1.setRotateX(1.23);
    assertFalse(n1.equals(n2));
    n2.setRotateX(1.23);
    assertTrue(n1.equals(n2));

    n1.setRotateY(4.56);
    assertFalse(n1.equals(n2));
    n2.setRotateY(4.56);
    assertTrue(n1.equals(n2));

    n1.setSize(11);
    assertFalse(n1.equals(n2));
    n2.setSize(11);
    assertTrue(n1.equals(n2));
}
项目:parabuild-ci    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:ccu-historian    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:jfreechart    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:aya-lang    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:HTML5_WebSite    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:populus    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:PI    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:nabs    文件:MeterNeedleTests.java   
/**
 * Check that the equals() method can distinguish all fields.
 */
public void testEquals() {
    MeterNeedle n1 = new LineNeedle();
    MeterNeedle n2 = new LineNeedle();
    assertTrue(n1.equals(n2));

    n1.setFillPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setFillPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.blue));
    assertTrue(n1.equals(n2));

    n1.setOutlinePaint(new GradientPaint(5.0f, 6.0f, Color.red, 7.0f, 8.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setOutlinePaint(new GradientPaint(5.0f, 6.0f, Color.red, 7.0f, 8.0f, Color.blue));
    assertTrue(n1.equals(n2));

    n1.setHighlightPaint(new GradientPaint(9.0f, 0.0f, Color.red, 1.0f, 2.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setHighlightPaint(new GradientPaint(9.0f, 0.0f, Color.red, 1.0f, 2.0f, Color.blue));
    assertTrue(n1.equals(n2));

    Stroke s = new BasicStroke(1.23f);
    n1.setOutlineStroke(s);
    assertFalse(n1.equals(n2));
    n2.setOutlineStroke(s);
    assertTrue(n1.equals(n2));

    n1.setRotateX(1.23);
    assertFalse(n1.equals(n2));
    n2.setRotateX(1.23);
    assertTrue(n1.equals(n2));

    n1.setRotateY(4.56);
    assertFalse(n1.equals(n2));
    n2.setRotateY(4.56);
    assertTrue(n1.equals(n2));

    n1.setSize(11);
    assertFalse(n1.equals(n2));
    n2.setSize(11);
    assertTrue(n1.equals(n2));
}
项目:nabs    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:ECG-Viewer    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:astor    文件:MeterNeedleTests.java   
/**
 * Check that the equals() method can distinguish all fields.
 */
public void testEquals() {
    MeterNeedle n1 = new LineNeedle();
    MeterNeedle n2 = new LineNeedle();
    assertTrue(n1.equals(n2));

    n1.setFillPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setFillPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.blue));
    assertTrue(n1.equals(n2));

    n1.setOutlinePaint(new GradientPaint(5.0f, 6.0f, Color.red, 7.0f, 8.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setOutlinePaint(new GradientPaint(5.0f, 6.0f, Color.red, 7.0f, 8.0f, Color.blue));
    assertTrue(n1.equals(n2));

    n1.setHighlightPaint(new GradientPaint(9.0f, 0.0f, Color.red, 1.0f, 2.0f, Color.blue));
    assertFalse(n1.equals(n2));
    n2.setHighlightPaint(new GradientPaint(9.0f, 0.0f, Color.red, 1.0f, 2.0f, Color.blue));
    assertTrue(n1.equals(n2));

    Stroke s = new BasicStroke(1.23f);
    n1.setOutlineStroke(s);
    assertFalse(n1.equals(n2));
    n2.setOutlineStroke(s);
    assertTrue(n1.equals(n2));

    n1.setRotateX(1.23);
    assertFalse(n1.equals(n2));
    n2.setRotateX(1.23);
    assertTrue(n1.equals(n2));

    n1.setRotateY(4.56);
    assertFalse(n1.equals(n2));
    n2.setRotateY(4.56);
    assertTrue(n1.equals(n2));

    n1.setSize(11);
    assertFalse(n1.equals(n2));
    n2.setSize(11);
    assertTrue(n1.equals(n2));
}
项目:astor    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:opensim-gui    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:group-five    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:manydesigns.cn    文件:CompassPlot.java   
/**
 * 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.");
    }

}
项目:buffer_bci    文件:CompassPlot.java   
/**
 * 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.");
    }

}