/********************************************************************** # Copyright (c) EWA Systems Inc. 1998 - 2005 All Rights Reserved # No part of this program may be photocopied, reproduced, # or translated to another programming language without # the prior written consent of EWA Systems. **********************************************************************/ package com.ewasystems.chart.test; import java.awt.Color; import java.awt.Dimension; import java.util.ArrayList; import java.util.Random; import com.ewasystems.chart.Chart; import com.ewasystems.chart.JFrameChart; import com.ewasystems.chart.waferplot.AxesWafer; import com.ewasystems.chart.waferplot.WaferDefect; import com.ewasystems.chart.waferplot.WaferDie; /** *

Title: Sample Wafer Plot

*

Copyright: (c) 1998 - 2005

*

Company: EWA Systems, Inc.

* @author Lincoln Evans-Beauchamp * @version 1.0 */ public class SampleWaferPlot extends JFrameChart { public SampleWaferPlot() { Chart chart = getChart(); AxesWafer wafer = new AxesWafer(chart); wafer.radius = 215d; Random r = new Random(); ArrayList[] bins = new ArrayList[5]; bins[0] = new ArrayList(); bins[1] = new ArrayList(); bins[2] = new ArrayList(); bins[3] = new ArrayList(); bins[4] = new ArrayList(); for (int x=-7; x<8; x++) { for (int y=-7; y<8; y++) { if ((Math.abs(y) > 6) && (Math.abs(x) > 3)) continue; if ((Math.abs(y) > 5) && (Math.abs(x) > 5)) continue; if ((Math.abs(y) > 4) && (Math.abs(x) > 6)) continue; if ((Math.abs(y) > 3) && (Math.abs(x) > 6)) continue; bins[r.nextInt(5)].add(new int[] {x , y}); } } for (int i=0; i<5; i++) { int[] x = new int[bins[i].size()]; int[] y = new int[bins[i].size()]; for (int j=0; j