View Javadoc
1 /***************************************************************************** 2 * Virtual Mockup for Machine Vision 3 * Copyright (C) 2001-2003 Fabio R. de Miranda, João E. Kogler Jr., 4 * Carlos S. Santos. 5 * Virtual Mockup for Machine Vision Project funded by SENAC-SP 6 * 7 * Permission is granted to redistribute and/or modify this 8 * software under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This software is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License (http://www.gnu.org/copyleft/lesser.html) 16 * for more details. 17 * 18 *****************************************************************************/ 19 20 package camera3d.event; 21 22 23 import camera3d.event.SceneObjectsChangedEvent; 24 import java.util.List; 25 import java.util.ArrayList; 26 27 /*** 28 * Event generated by J3DBase anytime a SceneObjectsChangeListener is registered 29 * with it. The new listener will not know of the objects already in the scene, 30 * thus an InitialListEvent event is fired to inform it of them. The event reaches 31 * exclusively the new listener, and none of the listener already registered with 32 * the J3DBase object. 33 * @author Fábio Roberto de Miranda, Carlos da Silva dos Santos 34 * @version 1.0 35 */ 36 public class InitialListEvent extends SceneObjectsChangedEvent { 37 /* the designation "SceneObjectsChangedEvent" is a misnomer, as there is 38 no change in the list of objects when we fire this event */ 39 40 /*** List of Objects contained in the scene graph at the moment a new listener 41 * is added to a J3DBase object.*/ 42 private List initialList = new ArrayList(); 43 44 /*** 45 * Creates a new event. 46 */ 47 public InitialListEvent(Object source) { 48 super(source); 49 } 50 51 /*** 52 * Returns list of objects in the scene. 53 */ 54 public List getInitialList(){ 55 return this.initialList; 56 } 57 58 /*** 59 * Sets list of scene objects. 60 */ 61 public void setInitialList(List initialList){ 62 this.initialList.clear(); 63 this.initialList.addAll(initialList); 64 } 65 }

This page was automatically generated by Maven