Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31377
Modified Files:
GLView.java
Log Message:
Added reset of view on view and tool change
Index: GLView.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** GLView.java 11 Aug 2005 13:23:20 -0000 1.7
--- GLView.java 17 Aug 2005 09:10:10 -0000 1.8
***************
*** 15,22 ****
import net.sourceforge.bprocessor.gui.GUI;
- import net.java.games.jogl.Animator;
import net.java.games.jogl.GLCapabilities;
import net.java.games.jogl.GLDrawableFactory;
! import net.java.games.jogl.GLJPanel;
import org.apache.log4j.Logger;
--- 15,21 ----
import net.sourceforge.bprocessor.gui.GUI;
import net.java.games.jogl.GLCapabilities;
import net.java.games.jogl.GLDrawableFactory;
! import net.java.games.jogl.GLCanvas;
import org.apache.log4j.Logger;
***************
*** 30,34 ****
/** GL canvas */
! private GLJPanel glc;
/** current event listener */
--- 29,33 ----
/** GL canvas */
! private GLCanvas glc;
/** current event listener */
***************
*** 37,43 ****
/** current working tool */
private Tool tool;
-
- /** The animator */
- private Animator animator;
/**
--- 36,39 ----
***************
*** 49,53 ****
glCap.setDoubleBuffered(true);
glCap.setHardwareAccelerated(true);
! glc = GLDrawableFactory.getFactory().createGLJPanel(glCap);
view = ViewFactory.getFactory(this).getDefault();
--- 45,49 ----
glCap.setDoubleBuffered(true);
glCap.setHardwareAccelerated(true);
! glc = GLDrawableFactory.getFactory().createGLCanvas(glCap);
view = ViewFactory.getFactory(this).getDefault();
***************
*** 60,65 ****
glc.addMouseMotionListener(tool);
glc.addKeyListener(tool);
- animator = new Animator(glc);
- start();
GUI.getInstance().registerPanel(glc, GUI.SPLIT_MIDDLE);
--- 56,59 ----
***************
*** 68,87 ****
/**
- * Start the animator
- *
- */
- public void start() {
- animator.start();
- }
-
- /**
- * Stop the animator
- *
- */
- public void stop() {
- animator.stop();
- }
-
- /**
* Change the tool
* @param mode The new tool
--- 62,65 ----
***************
*** 99,102 ****
--- 77,81 ----
log.error("[changeMode] tool was null");
}
+ getView().reset();
}
***************
*** 115,118 ****
--- 94,98 ----
glc.addGLEventListener(view);
}
+ getView().reset();
this.repaint();
}
|