HTTP/1.1 200 OK Date: Tue, 12 Jun 2001 17:29:22 GMT Server: Apache/1.3.12 (Unix) ApacheJServ/1.1.2 Set-Cookie: Apache=204.210.50.240.245209923669628; path=/ Last-Modified: Tue, 21 May 1996 20:08:46 GMT ETag: "a18f9-ba4-31a222ce" Accept-Ranges: bytes Content-Length: 2980 Connection: close Content-Type: text/plain //**************************************************************************** // ---- version information ---- // // Pin.java v 1.00 b1 // Written by: I. van Rienen / E-mail ivr@bart.nl // URL: http://www/bart.nl/~ivr // Initial release: // Released in public domain: // // ---- Description ---- // Java class Pin, used in PinGrid and contains ElectronicComponent // Used to make a PinGrid[][] // // This program and the Java source is in the public domain. // Permission to use, copy, modify, and distribute this software // and its documentation for NON-COMMERCIAL purposes and // without fee is hereby granted. // // Copyright 1996 // // Iwan van Rienen // Joan Maetsuyckerstr. 145 // 2593 ZG The Hague // The Netherlands // // I am not responsible for any bugs in this program and // possible damage to hard- or software when using this program. //**************************************************************************** import java.applet.Applet; import java.awt.*; import java.util.Vector; class Pin { Vector Components; // --------------------------------------------------------------------------- // The constructor of the Pin class. // --------------------------------------------------------------------------- public Pin () { Components = new Vector(); } // --------------------------------------------------------------------------- // add Components to this Pin // --------------------------------------------------------------------------- public void AddComponent (ElectronicComponent ActComponent) { Components.addElement(ActComponent); } // --------------------------------------------------------------------------- // Remove components from this Pin // --------------------------------------------------------------------------- public void RemoveComponent (ElectronicComponent ActComponent) { for (int ix = 0; ix < Components.size(); ix++) { if (Components.elementAt(ix) == ActComponent) { Components.removeElementAt(ix); // System.out.println ("Component found and removed from grid."); return; } } // System.out.println ("**** Error - can't remove component from grid"); } // --------------------------------------------------------------------------- // Set all components up before simulating. this is done once // before simulating and will set up the linked-lists between the components // --------------------------------------------------------------------------- public void SimulateSetUp(int x, int y) { int ix; ElectronicComponent ActComponent; for (ix = 0; ix < Components.size(); ix++) { ActComponent = (ElectronicComponent)Components.elementAt(ix); ActComponent.SimulateSetUp(x, y, Components); } } }