[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl GLView.java,1.31,1.32
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-01-04 14:30:17
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21783/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: Replaced created/remove/modified from Notifier with changed/update Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** GLView.java 23 Dec 2005 11:19:20 -0000 1.31 --- GLView.java 4 Jan 2006 14:29:51 -0000 1.32 *************** *** 12,15 **** --- 12,16 ---- import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Camera; + import net.sourceforge.bprocessor.model.Observer; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.kernel.notification.NotificationListener; *************** *** 45,49 **** * The 3D display */ ! public class GLView implements MouseListener, NotificationListener { /** The logger */ private static Logger log = Logger.getLogger(GLView.class); --- 46,50 ---- * The 3D display */ ! public class GLView implements MouseListener, NotificationListener, Observer { /** The logger */ private static Logger log = Logger.getLogger(GLView.class); *************** *** 67,70 **** --- 68,72 ---- log.info("Using JOGL version " + Version.getVersion()); Notifier.getInstance().addListener(this); + Project.getInstance().addObserver(this); GLCapabilities glCap = new GLCapabilities(); glCap.setDoubleBuffered(true); *************** *** 361,377 **** */ public boolean isNotificationEnabled(String type) { ! if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED) || ! type.equals(Notification.FUNCTIONAL_SPACE_DELETED) || ! type.equals(Notification.FUNCTIONAL_SPACE_SELECTED) || type.equals(Notification.FUNCTIONAL_SPACE_DESELECTED) || - type.equals(Notification.FUNCTIONAL_SPACE_MODIFIED) || - type.equals(Notification.CONSTRUCTION_SPACE_CREATED) || - type.equals(Notification.CONSTRUCTION_SPACE_DELETED) || type.equals(Notification.CONSTRUCTION_SPACE_SELECTED) || ! type.equals(Notification.CONSTRUCTION_SPACE_DESELECTED) || ! type.equals(Notification.CONSTRUCTION_SPACE_MODIFIED)) { return true; } return false; } } --- 363,381 ---- */ public boolean isNotificationEnabled(String type) { ! if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED) || type.equals(Notification.FUNCTIONAL_SPACE_DESELECTED) || type.equals(Notification.CONSTRUCTION_SPACE_SELECTED) || ! type.equals(Notification.CONSTRUCTION_SPACE_DESELECTED)) { return true; } return false; } + + /** + * Update this view + * @param entity The changed entity + */ + public void update(Object entity) { + repaint(); + } } |