當前位置: 首頁>>代碼示例>>Java>>正文


Java ValueMarker.setStroke方法代碼示例

本文整理匯總了Java中org.jfree.chart.plot.ValueMarker.setStroke方法的典型用法代碼示例。如果您正苦於以下問題:Java ValueMarker.setStroke方法的具體用法?Java ValueMarker.setStroke怎麽用?Java ValueMarker.setStroke使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.plot.ValueMarker的用法示例。


在下文中一共展示了ValueMarker.setStroke方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testGetSetStroke

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
/**
 * Some checks for the getStroke() and setStroke() methods.
 */
public void testGetSetStroke() {
    // we use ValueMarker for the tests, because we need a concrete 
    // subclass...
    ValueMarker m = new ValueMarker(1.1);
    m.addChangeListener(this);
    this.lastEvent = null;
    assertEquals(new BasicStroke(0.5f), m.getStroke());
    m.setStroke(new BasicStroke(1.1f));
    assertEquals(new BasicStroke(1.1f), m.getStroke());
    assertEquals(m, this.lastEvent.getMarker());
    
    // check null argument...
    try {
        m.setStroke(null);
        fail("Expected an IllegalArgumentException for null.");
    }
    catch (IllegalArgumentException e) {
        assertTrue(true);
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:24,代碼來源:MarkerTests.java

示例2: testGetSetStroke

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
/**
 * Some checks for the getStroke() and setStroke() methods.
 */
public void testGetSetStroke() {
    // we use ValueMarker for the tests, because we need a concrete
    // subclass...
    ValueMarker m = new ValueMarker(1.1);
    m.addChangeListener(this);
    this.lastEvent = null;
    assertEquals(new BasicStroke(0.5f), m.getStroke());
    m.setStroke(new BasicStroke(1.1f));
    assertEquals(new BasicStroke(1.1f), m.getStroke());
    assertEquals(m, this.lastEvent.getMarker());

    // check null argument...
    try {
        m.setStroke(null);
        fail("Expected an IllegalArgumentException for null.");
    }
    catch (IllegalArgumentException e) {
        assertTrue(true);
    }
}
 
開發者ID:SpoonLabs,項目名稱:astor,代碼行數:24,代碼來源:MarkerTests.java

示例3: Curva3

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
public Curva3() {
    super();
    KCritico = 10.0;
    PCritico = 0.9472;
    puntoXInicio = 9.495;
    puntoXFin = puntoXInicio + PCritico;
    puntoYInicio = 0.0;
    puntoYFin = 1.80;
    comment.setText(title[0]);
    marcadores = new ValueMarker[2];
    marcadores[0] = new ValueMarker(step[1]);
    marcadores[1] = new ValueMarker(step[2]);
    for(ValueMarker marcador : marcadores) {
        marcador.setStroke(new BasicStroke(1.0f));
        marcador.setPaint(Color.BLACK);
    }
}
 
開發者ID:pablopatarca,項目名稱:proyecto-teoria-control-utn-frro,代碼行數:18,代碼來源:Curva3.java

示例4: Curva2

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
public Curva2() {
    super();
    KCritico = 8.0;
    PCritico = 3.63;
    puntoXInicio = 30.745;
    puntoXFin = puntoXInicio + PCritico;
    puntoYInicio = 0.0;
    puntoYFin = 1.80;
    comment.setText(title[0]);
    marcadores = new ValueMarker[2];
    marcadores[0] = new ValueMarker(step[1]);
    marcadores[1] = new ValueMarker(step[2]);
    for(ValueMarker marcador : marcadores) {
        marcador.setStroke(new BasicStroke(1.0f));
        marcador.setPaint(Color.BLACK);
    }
}
 
開發者ID:pablopatarca,項目名稱:proyecto-teoria-control-utn-frro,代碼行數:18,代碼來源:Curva2.java

示例5: Curva1

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
public Curva1() {
    super();
    KCritico = 10.0;
    PCritico = 1.895;
    puntoXInicio = 26.53;
    puntoXFin = puntoXInicio + PCritico;
    puntoYInicio = -0.50;
    puntoYFin = 2.25;
    comment.setText(title[0]);
    marcadores = new ValueMarker[2];
    marcadores[0] = new ValueMarker(step[1]);
    marcadores[1] = new ValueMarker(step[2]);
    for(ValueMarker marcador : marcadores) {
        marcador.setStroke(new BasicStroke(1.0f));
        marcador.setPaint(Color.BLACK);
    }
}
 
開發者ID:pablopatarca,項目名稱:proyecto-teoria-control-utn-frro,代碼行數:18,代碼來源:Curva1.java

示例6: addSliceMarker

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
/**
 * adds the slice marker to the plot
 */
private void addSliceMarker() {
    sliceMarker = new ValueMarker(currentSlice);
    sliceMarker.setPaint(Color.gray);
    sliceMarker.setStroke(new BasicStroke(1.0f, // Width
            BasicStroke.CAP_SQUARE, // End cap
            BasicStroke.JOIN_MITER, // Join style
            10.0f, // Miter limit
            new float[]{10.0f, 10.0f}, // Dash pattern
            0.0f)); // Dash phase
    sliceMarker.setLabel("Slice");
    plot.addDomainMarker(sliceMarker);
}
 
開發者ID:fact-project,項目名稱:fact-tools,代碼行數:16,代碼來源:MainPlotPanel.java

示例7: addKillEvent

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
private static void addKillEvent(XYPlot xyplot, long pos) {
    ValueMarker vm = new ValueMarker(pos);
    vm.setPaint(ChartColor.VERY_DARK_GREEN);
    vm.setLabelOffset(new RectangleInsets(10.0D, 1.0D, 1.0D, 1.0D));
    vm.setLabel("Container Kill Event");
    vm.setStroke(new BasicStroke(2));
    xyplot.addDomainMarker(vm);
}
 
開發者ID:project-flink,項目名稱:flink-perf,代碼行數:9,代碼來源:KafkaFT.java

示例8: addIllegalEvent

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
private static void addIllegalEvent(XYPlot xyplot, long pos) {
    ValueMarker vm = new ValueMarker(pos);
    vm.setPaint(ChartColor.LIGHT_YELLOW);
    vm.setLabelOffset(new RectangleInsets(10.0D, 1.0D, 1.0D, 1.0D));
    vm.setLabel("Illegal State");
    vm.setStroke(new BasicStroke(2));
    xyplot.addDomainMarker(vm);
}
 
開發者ID:project-flink,項目名稱:flink-perf,代碼行數:9,代碼來源:KafkaFT.java

示例9: makeMarker

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
protected ValueMarker makeMarker( final double value )
{
    final ValueMarker valueMarker = new ValueMarker( value );
    valueMarker.setStroke( new BasicStroke ( 2f ) );
    valueMarker.setPaint( new Color( 0f/255f, 0f/255f, 255f/255f ) );
    valueMarker.setLabel( " Distance=" + value );
    valueMarker.setLabelPaint( Color.BLUE );
    valueMarker.setLabelAnchor( RectangleAnchor.TOP );
    valueMarker.setLabelTextAnchor( TextAnchor.TOP_LEFT );

    return valueMarker;
}
 
開發者ID:fiji,項目名稱:SPIM_Registration,代碼行數:13,代碼來源:MouseListenerValue.java

示例10: makeMarker

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
protected ValueMarker makeMarker( final int timePoint )
{
    final ValueMarker valueMarker = new ValueMarker( timePoint );
    valueMarker.setStroke( new BasicStroke ( 1.5f ) );
    valueMarker.setPaint( new Color( 0.0f, 93f/255f, 9f/255f ) );
    valueMarker.setLabel( " Reference\n Timepoint " + timePoint );
    valueMarker.setLabelAnchor(RectangleAnchor.BOTTOM );
    valueMarker.setLabelTextAnchor( TextAnchor.BOTTOM_LEFT );
    
    return valueMarker;
}
 
開發者ID:fiji,項目名稱:SPIM_Registration,代碼行數:12,代碼來源:MouseListenerTimelapse.java

示例11: formatMarker

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
private void formatMarker(ValueMarker marker) {
    marker.setStroke(Styles.ANNOTATION_STROKE);
    marker.setPaint(Styles.ANNOTATION_COLOR);
    marker.setLabelFont(Styles.ANNOTATION_FONT);
    marker.setLabelPaint(Styles.ANNOTATION_COLOR);
}
 
開發者ID:nmonvisualizer,項目名稱:nmonvisualizer,代碼行數:7,代碼來源:LineChartAnnotationDialog.java

示例12: setMarkers

import org.jfree.chart.plot.ValueMarker; //導入方法依賴的package包/類
public void setMarkers(double k, double tau){
    
    marcadoresCurva = new ValueMarker[2];
    
    double m = funcionDerivadaPrimera(tau);
    double h = funcionCurva(tau) - (tau*m);
    
    T = (k-h)/m;
    L = (-1*h)/m;
    
    double esCeroEn = tau*(3-Math.E);
    
    System.out.println(esCeroEn);
    System.out.println(T-L);
    
    marcadoresCurva[0] = new ValueMarker(esCeroEn);
    marcadoresCurva[1] = new ValueMarker(T);
    
    for(ValueMarker marcador : marcadoresCurva) {
        marcador.setStroke(new BasicStroke(1.0f));
        marcador.setPaint(Color.BLACK);
    }
    
}
 
開發者ID:pablopatarca,項目名稱:proyecto-teoria-control-utn-frro,代碼行數:25,代碼來源:CurveGenerator.java


注:本文中的org.jfree.chart.plot.ValueMarker.setStroke方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。