Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 27685 Details for
Bug 110757
[OpenGL] Support the JOGL GLDrawable API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Code example using SWT_AWT
ToolPath.java (text/plain), 1.76 KB, created by
Vicente
on 2005-09-29 12:10:15 EDT
(
hide
)
Description:
Code example using SWT_AWT
Filename:
MIME Type:
Creator:
Vicente
Created:
2005-09-29 12:10:15 EDT
Size:
1.76 KB
patch
obsolete
>package aquaCAM.views; > >import java.awt.Frame; >import java.awt.event.WindowAdapter; >import java.awt.event.WindowEvent; > >import net.java.games.jogl.Animator; >import net.java.games.jogl.GLCanvas; >import net.java.games.jogl.GLCapabilities; >import net.java.games.jogl.GLDrawableFactory; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.awt.SWT_AWT; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.ui.part.ViewPart; > >public class ToolPath extends ViewPart { > > public static final String ID = "aquaCAM.views.ToolPath"; // TODO Needs to be whatever is mentioned in plugin.xml > > private Composite composite = null; > > @Override > public void createPartControl(Composite parent) { > // TODO Auto-generated method stub > composite = new Composite(parent, SWT.NO_BACKGROUND | SWT.EMBEDDED); > > Frame frame = SWT_AWT.new_Frame(composite); > > //Frame frame = new Frame("Gear Demo"); > GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); > > canvas.addGLEventListener(new Gears()); > > frame.add(canvas); > frame.setSize(300, 300); > final Animator animator = new Animator(canvas); > frame.addWindowListener(new WindowAdapter() { > public void windowClosing(WindowEvent e) { > // Run this on another thread than the AWT event queue to > // make sure the call to Animator.stop() completes before > // exiting > new Thread(new Runnable() { > public void run() { > animator.stop(); > System.exit(0); > } > }).start(); > } > }); > frame.show(); > animator.start(); > } > > @Override > public void setFocus() { > // TODO Auto-generated method stub > > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 110757
: 27685 |
28912
|
30386
|
30511