Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ice-dev] Standalone JavaFX example in EAVP?

Jay,


The FXShapeController is used by the FXGeometryCanvas. The code itself is quite large, but here's a small code snippet of using it to add a rectangular prism.


//Get the shape provider from the FXShapeControllerProviderFactory

​IControllerProvider<FXShapeController> provider = factory.createProvider(new ShapeMesh());


//Create a root shape

ShapeMesh rootMesh = new ShapeMesh();

FXShapeController root = provider.createController(rootMesh);

root.setRoot(true);


//Create a shape to display in the scene

ShapeMesh rectMesh = new ShapeMesh();

FXShapeController rect = provider.createController(rectMesh);


//Add the shape as a child of the root

root.addEntity(rect);


//Make the shape into a rectangular prism with the dimensions 50 x 50 x 200

rect.setProperty(MeshProperty.TYPE, ShapeType.Cube.toString()).

rect.setScale(50, 50, 200);


Robert



From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Jay Jay Billings <jayjaybillings@xxxxxxxxx>
Sent: Friday, February 26, 2016 10:26 AM
To: ice developer discussions
Subject: Re: [ice-dev] Standalone JavaFX example in EAVP?
 
Thanks Robert,

Do you have an small example of a Controller lying around or could you create one if you have a few spare minutes?

Jay

On Fri, Feb 26, 2016 at 10:19 AM, Smith, Robert W. <smithrw@xxxxxxxx> wrote:

Jay,


It should be very easy. The FXGeometryVizService accepts an IController when creating its canvas. ICE classes like GeometryComponent just manage the root IController. Assuming that you have your IController ready, you can draw a Geometry Editor in an arbitrary SWT composite by simply doing:

 

IVizCanvas canvas = service.createCanvas(someController);

canvas.draw(someComposite);


Robert


From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Jay Jay Billings <jayjaybillings@xxxxxxxxx>
Sent: Friday, February 26, 2016 10:12 AM
To: ice developer discussions; HÃ¥vard Heierli-Nesse
Subject: [ice-dev] Standalone JavaFX example in EAVP?
 
Robert,

How hard do you think it would be to put together a standalone example using EAVP that doesn't use ICE Items? Havard and I have been chatting in another thread about it. We would like to put together a little plugin that reads some description of a geometry and loads it into the JavaFXVizService.

We can talk more about this in person if you want.

Jay

--
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings

_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev



--
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings

Back to the top