[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl GLView.java,1.20,1.21
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-11-04 09:39:03
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7589/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: - Removed rounding to mm to improve hitdection when working on extruded surfaces - Requests keyboard foucs on mousenter Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** GLView.java 30 Oct 2005 15:55:40 -0000 1.20 --- GLView.java 4 Nov 2005 09:38:55 -0000 1.21 *************** *** 18,21 **** --- 18,22 ---- import net.sourceforge.bprocessor.gui.GUI; + import net.java.games.jogl.GLCanvas; import net.java.games.jogl.GLCapabilities; import net.java.games.jogl.GLDrawable; *************** *** 26,29 **** --- 27,34 ---- import java.awt.Dimension; import java.awt.BorderLayout; + import java.awt.KeyboardFocusManager; + import java.awt.event.MouseEvent; + import java.awt.event.MouseListener; + import javax.swing.JTextField; import javax.swing.JPanel; *************** *** 36,45 **** * The 3D display */ ! public class GLView { /** The logger */ private static Logger log = Logger.getLogger(GLView.class); /** GL canvas */ ! private GLDrawable glc; /** current event listener */ --- 41,50 ---- * The 3D display */ ! public class GLView implements MouseListener { /** The logger */ private static Logger log = Logger.getLogger(GLView.class); /** GL canvas */ ! private GLCanvas glc; /** current event listener */ *************** *** 61,64 **** --- 66,71 ---- glCap.setHardwareAccelerated(true); glc = GLDrawableFactory.getFactory().createGLCanvas(glCap); + KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); + JPanel jp = new JPanel(); jp.setPreferredSize(new Dimension(450, 450)); *************** *** 80,84 **** glc.addMouseMotionListener(tool); glc.addKeyListener(tool); ! GUI.getInstance().registerPanel(jp, GUI.SPLIT_MIDDLE); glc.setAutoSwapBufferMode(false); --- 87,91 ---- glc.addMouseMotionListener(tool); glc.addKeyListener(tool); ! glc.addMouseListener(this); GUI.getInstance().registerPanel(jp, GUI.SPLIT_MIDDLE); glc.setAutoSwapBufferMode(false); *************** *** 257,259 **** --- 264,302 ---- } } + + /** + * @param arg0 Event + */ + public void mouseClicked(MouseEvent arg0) { + + } + + /** + * @param arg0 Event + */ + public void mousePressed(MouseEvent arg0) { + + } + + /** + * @param arg0 Event + */ + public void mouseReleased(MouseEvent arg0) { + + } + + /** + * @param arg0 Event + */ + public void mouseEntered(MouseEvent arg0) { + + glc.requestFocusInWindow(); + } + + /** + * @param arg0 Event + */ + public void mouseExited(MouseEvent arg0) { + + } } |