Skip to main content

Java3D & Eclipse RCP & SWT

10 replies [Last post]
Anonymous

Hi all.

I have posted quite a few messages here and got replies very quickly.
Thanks.

I was developping a Java3D program using j3d. I have constructed the scene
and branch and almost everything I need.

Now my damn Boss tells me to immigrate the whole application to Eclipse RCP
framework, which, i guess, means I have to use Eclipse to develop our
program to make it as a RCP. Thus I have to use Eclipse plugins and SWT.

Question 1:

I do not quite know about Eclipse RCP framework. I just use it as a Java
IDE. So, if I want to use Eclipse to build my program as a RCP, does it mean
that I have to use SWT?? my boss want the GUI to be like Eclipse (it is very
good tho). So, as long as I use Eclipse RCP framework, my program will look
like Eclipse, right?

Question 2:

If I go Eclipse RCP, I cannot use Java3D lib any more, right? it seems not
supporting SWT. I have to go Aviatrix3D & JOGL right? If it is right, does
that mean I have to rewrite my 3D codes all? How hard is it? What I can find
about Aviatrix3D is only a simple tutorial on j3d.org, and it seems not many
ppl are using Aviatrix3D. Anyone here can give me some suggestions?

Because my boss keep asking me whether it is doable or not or how hard will
it be, I really do not have time to investigate Aviatrix3D. So could someone
here help me out?

Personelly, I like Eclipse GUI and I really want to go that way if it is not
that hard to rewrite the codes and learn Aviatrix3D.

Thanks, please help
--
View this message in context: http://www.nabble.com/Java3D---Eclipse-RCP---SWT-tf4669625.html#a13339303
Sent from the java.net - java3d interest mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
aristovski
Offline
Joined: 2005-11-05
Points: 0

http://java3d-eclipse.sourceforge.net/ is an Eclipse plugin. It doesn't use swing, it's SWT.

For setting up the view, you need to use org.eclipse.swt.awt.SWT_AWT but it's pretty straight-forward.

This is the basic setup:

In your public void createPartControl(Composite parent) {
do something like this:

// create swt container:
SWT_AWT_container = new Composite(parent, SWT.EMBEDDED);
// set bounds (here showing bounds to cover parent's area)
final Rectangle sh3dbnds = parent.getBounds();
sh3dbnds.x = sh3dbnds.y = 0;
SWT_AWT_container.setBounds(sh3dbnds);

// ----------------
awt = SWT_AWT.new_Frame(SWT_AWT_container);
//-----------------
final Rectangle bounds = SWT_AWT_container.getBounds();
awt.setBounds(0, 0, bounds.width, bounds.height);

awt.setLayout(new BorderLayout());

// create your scene:
final Canvas3D c = initializeJava3D();

awt.add(c, BorderLayout.CENTER);

Dmitri Darine

Jack in Lost wrote:
> Now my damn Boss tells me to immigrate the whole application to Eclipse RCP
> framework, which, i guess, means I have to use Eclipse to develop our
> program to make it as a RCP. Thus I have to use Eclipse plugins and SWT.
>
What if you convince the damn boss to migrate to Netbeans platform RCP
instead of Eclipse RCP?
http://www.netbeans.org/products/platform/screenshots.html

Then you don't need to deal with SWT. And I guess it will work even on Mac.

DD

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

aristovski
Offline
Joined: 2005-11-05
Points: 0

There is a java3d-eclipse plugin:
http://java3d-eclipse.sourceforge.net/
You can give it a try.

Jack in Lost

I guess the plugin is only for Swing not SWT.

Is netbean good? It has been not good (comparing to Eclipse) for a long
time.

java3d-interest wrote:
>
> There is a java3d-eclipse plugin:
> http://java3d-eclipse.sourceforge.net/
> You can give it a try.
> [Message sent by forum member 'aristovski' (aristovski)]
>
> http://forums.java.net/jive/thread.jspa?messageID=242453
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>

--
View this message in context: http://www.nabble.com/Java3D---Eclipse-RCP---SWT-tf4669625.html#a13460067
Sent from the java.net - java3d interest mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Ryan Janzen

Flame on?

-----Original Message-----
From: Jack in Lost [mailto:freepastry@googlemail.com]
Sent: October 28, 2007 7:01 PM
To: interest@java3d.dev.java.net
Subject: Re: Java3D & Eclipse RCP & SWT

I guess the plugin is only for Swing not SWT.

Is netbean good? It has been not good (comparing to Eclipse) for a long
time.

java3d-interest wrote:
>
> There is a java3d-eclipse plugin:
> http://java3d-eclipse.sourceforge.net/
> You can give it a try.
> [Message sent by forum member 'aristovski' (aristovski)]
>
> http://forums.java.net/jive/thread.jspa?messageID=242453
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>

--
View this message in context:
http://www.nabble.com/Java3D---Eclipse-RCP---SWT-tf4669625.html#a13460067
Sent from the java.net - java3d interest mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

puybaret
Offline
Joined: 2004-12-04
Points: 0

I don't know RCP, but what I can say is that I already tried to use Java 3D 1.3.2 in a SWT/JFace GUI with success, thanks to org.eclipse.swt.awt.SWT_AWT class.

Look at line #272 in http://sweethome3d.cvs.sourceforge.net/sweethome3d/SweetHome3D/test/com/... :

[code] Composite homeComponent3DParent = new Composite(this.planView3DSashForm, SWT.EMBEDDED);
try {
// Add a Swing HomeComponent3D component with SWT/AWT bridge
Frame frame = SWT_AWT.new_Frame(homeComponent3DParent);
frame.add(new HomeComponent3D(home));
} catch (SWTError ex) {
// ...
}[/code]

(HomeComponent3D is a JComponent class that embeds a Canvas3D instance, see
http://sweethome3d.cvs.sourceforge.net/sweethome3d/SweetHome3D/src/com/e... )

If you want to test it, download version 0.7 (http://downloads.sourceforge.net/sweethome3d/SweetHome3D-0.7-src.zip ) or version 0.8 (http://downloads.sourceforge.net/sweethome3d/SweetHome3D-0.8-src.zip ) of Sweet Home 3D, and run com.eteks.sweethome3d.test.JFaceHomeControllerTest or com.eteks.sweethome3d.jface.SweetHome3D classes (if you use Eclipse 3.3, you'll have to add to project classpath a library containing org.eclipse.swt.*, org.eclipse.jface.*, org.eclipse.core.commands, org.eclipse.core.runtime and org.eclipse.equinox.common packages).

I hope this will avoid you to change all your 3D code. :)

Alan Hudson

java3d-interest@javadesktop.org wrote:
> I don't know RCP, but what I can is that I already tried to use Java 3D 1.3.2 in a SWT/JFace GUI with success, thanks to org.eclipse.swt.awt.SWT_AWT class.
>

This works fine on Windows. It will lock a Macintosh box. So depends
on whether you need cross-platform.

--
Alan Hudson

President Yumetech, Inc. www.yumetech.com
President Web3D Consortium www.web3d.org
206 340 8900

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

puybaret
Offline
Joined: 2004-12-04
Points: 0

I don't agree. It works on Mac OS X, I tried it.

Alan Hudson

java3d-interest@javadesktop.org wrote:
> I don't agree. It works on Mac OS X, I tried it.

We tested this about a year ago so perhaps something has changed. My
understanding of the situation is that Mac's have a dedicated UI thread.
AWT and SWT both try to grab it. We had to make sure that AWT didn't
startup otherwise it locked a Mac.

--
Alan Hudson

President Yumetech, Inc. www.yumetech.com
President Web3D Consortium www.web3d.org
206 340 8900

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

puybaret
Offline
Joined: 2004-12-04
Points: 0

Yes it changed, once the AWT / SWT bridge was (partially) corrected ;)
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384 and its little brother https://bugs.eclipse.org/bugs/show_bug.cgi?id=145890