import java.awt.*; public class ResistorView extends ComponentView { private String value; private Polygon shape; private Point textPosition; public ResistorView (Point a, Point b, int v){ center = new Point((a.x+b.x)/2, (a.y+b.y)/2); int h = (Math.abs(a.x-b.x)+Math.abs(a.y-b.y)); int[] x = {10,0,0,5,5,-5,-5,0,0,-10,-10,0,0,-5,-5,5,5,0,0,10}; int[] y = {-25,-25,-45,-45,-55,-55,-45,-45,-25,-25,25,25, 45,45,55,55,45,45,25,25}; for (int i=0; i