Commit b107b0e1 authored by Robert Smith's avatar Robert Smith
Browse files

Split JavaFX packages



Split the viz.service.javafx package into the shared viz.service.javafx
package and individual packages for the javafx implementations of the
geometry and mesh editors: viz.service.javafx.geometry and
viz.service.javafx.mesh.
Signed-off-by: Robert Smith's avatarRobert Smith <SmithRW@ornl.gov>
parent 9abed7db
...@@ -113,6 +113,7 @@ Import-Package: com.jme3.animation, ...@@ -113,6 +113,7 @@ Import-Package: com.jme3.animation,
org.eclipse.core.runtime.jobs, org.eclipse.core.runtime.jobs,
org.eclipse.ice.datastructures.ICEObject, org.eclipse.ice.datastructures.ICEObject,
org.eclipse.ice.reactor.plant, org.eclipse.ice.reactor.plant,
org.eclipse.ice.viz.service.geometry.plantView,
org.eclipse.ice.viz.service.geometry.shapes, org.eclipse.ice.viz.service.geometry.shapes,
org.eclipse.ice.viz.service.jme3.application, org.eclipse.ice.viz.service.jme3.application,
org.eclipse.ice.viz.service.jme3.internal, org.eclipse.ice.viz.service.jme3.internal,
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
package org.eclipse.ice.client.widgets.jme; package org.eclipse.ice.client.widgets.jme;
import org.eclipse.ice.client.widgets.reactoreditor.plant.PlantAppState; import org.eclipse.ice.client.widgets.reactoreditor.plant.PlantAppState;
import org.eclipse.ice.datastructures.form.MeshComponent;
import org.eclipse.ice.reactor.plant.PlantComposite; import org.eclipse.ice.reactor.plant.PlantComposite;
import org.eclipse.ice.viz.service.geometry.plantView.IPlantView;
import org.eclipse.ice.viz.service.jme3.application.MasterApplication; import org.eclipse.ice.viz.service.jme3.application.MasterApplication;
import org.eclipse.ice.viz.service.jme3.application.ViewAppState; import org.eclipse.ice.viz.service.jme3.application.ViewAppState;
import org.eclipse.ice.viz.service.jme3.internal.MasterApplicationHolder; import org.eclipse.ice.viz.service.jme3.internal.MasterApplicationHolder;
...@@ -26,7 +26,7 @@ import org.eclipse.ice.viz.service.jme3.internal.MasterApplicationHolder; ...@@ -26,7 +26,7 @@ import org.eclipse.ice.viz.service.jme3.internal.MasterApplicationHolder;
* <code>Composite</code>, see * <code>Composite</code>, see
* {@link ViewAppState#createComposite(org.eclipse.swt.widgets.Composite)}. * {@link ViewAppState#createComposite(org.eclipse.swt.widgets.Composite)}.
* *
* @author Jordan * @author Jordan, Robert Smith
* *
*/ */
public class ViewFactory { public class ViewFactory {
...@@ -80,35 +80,33 @@ public class ViewFactory { ...@@ -80,35 +80,33 @@ public class ViewFactory {
} }
/** /**
// * Creates a {@link MeshAppState} for the specified * // * Creates a {@link MeshAppState} for the specified // *
// * <code>MeshComponent</code>. * <code>MeshComponent</code>. // * // * @param mesh // * The root
// * * <code>MeshComponent</code> or mesh that contains // * edges, vertices,
// * @param mesh * and other <code>MeshComponent</code>s. // * @return A new
// * The root <code>MeshComponent</code> or mesh that contains * <code>MeshAppState</code>, or null if there is no core // *
// * edges, vertices, and other <code>MeshComponent</code>s. * <code>MasterApplication</code> in the background. //
// * @return A new <code>MeshAppState</code>, or null if there is no core */
// * <code>MasterApplication</code> in the background. // public MeshAppState createMeshView(MeshComponent mesh) {
// */ //
// public MeshAppState createMeshView(MeshComponent mesh) { // MeshAppState view = null;
// //
// MeshAppState view = null; // if (app != null) {
// //
// if (app != null) { // // If necessary, wait until the MasterApplication has started before
// // // trying to add a new AppState, or nothing may initialize.
// // If necessary, wait until the MasterApplication has started before // if (!app.isInitialized()) {
// // trying to add a new AppState, or nothing may initialize. // app.blockUntilInitialized(0);
// if (!app.isInitialized()) { // }
// app.blockUntilInitialized(0); //
// } // view = new MeshAppState();
// // view.start(app);
// view = new MeshAppState(); //
// view.start(app); // view.setMesh(mesh);
// // }
// view.setMesh(mesh); //
// } // return view;
// // }
// return view;
// }
/** /**
* Creates a {@link PlantAppState} for the specified * Creates a {@link PlantAppState} for the specified
...@@ -120,7 +118,7 @@ public class ViewFactory { ...@@ -120,7 +118,7 @@ public class ViewFactory {
* @return A new <code>PlantAppState</code>, or null if there is no core * @return A new <code>PlantAppState</code>, or null if there is no core
* <code>MasterApplication</code> in the background. * <code>MasterApplication</code> in the background.
*/ */
public PlantAppState createPlantView(PlantComposite plant) { public IPlantView createPlantView(PlantComposite plant) {
PlantAppState view = null; PlantAppState view = null;
......
...@@ -34,7 +34,6 @@ Import-Package: com.jme3.app, ...@@ -34,7 +34,6 @@ Import-Package: com.jme3.app,
org.eclipse.ice.viz.service.geometry.shapes, org.eclipse.ice.viz.service.geometry.shapes,
org.eclipse.ice.viz.service.geometry.widgets, org.eclipse.ice.viz.service.geometry.widgets,
org.eclipse.ice.viz.service.internal, org.eclipse.ice.viz.service.internal,
org.eclipse.ice.viz.service.javafx.mesh,
org.eclipse.ice.viz.service.jme3.mesh, org.eclipse.ice.viz.service.jme3.mesh,
org.eclipse.ice.viz.service.mesh.datastructures, org.eclipse.ice.viz.service.mesh.datastructures,
org.eclipse.ice.viz.service.mesh.properties, org.eclipse.ice.viz.service.mesh.properties,
......
...@@ -175,7 +175,7 @@ public class ICEGeometryPage extends ICEFormPage ...@@ -175,7 +175,7 @@ public class ICEGeometryPage extends ICEFormPage
.getForm(); .getForm();
Composite parent = pageForm.getBody(); Composite parent = pageForm.getBody();
// Get JME3 Geometry service from factory // Get Geometry service from factory
IVizServiceFactory factory = editor.getVizServiceFactory(); IVizServiceFactory factory = editor.getVizServiceFactory();
service = factory.get("ICE Geometry Editor"); service = factory.get("ICE Geometry Editor");
((ShapeTreeView) getSite().getWorkbenchWindow().getActivePage() ((ShapeTreeView) getSite().getWorkbenchWindow().getActivePage()
......
...@@ -8,10 +8,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.7 ...@@ -8,10 +8,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: org.eclipse.ice.datastructures.ICEObject, Import-Package: org.eclipse.ice.datastructures.ICEObject,
org.eclipse.ice.datastructures.form, org.eclipse.ice.datastructures.form,
org.eclipse.ice.item, org.eclipse.ice.item,
org.eclipse.ice.item.jobLauncher, org.eclipse.ice.item.jobLauncher
org.eclipse.ice.viz.service.datastructures,
org.eclipse.ice.viz.service.mesh.datastructures,
org.eclipse.ice.viz.service.modeling
Require-Bundle: org.junit;bundle-version="4.8.2", Require-Bundle: org.junit;bundle-version="4.8.2",
org.eclipse.core.resources;bundle-version="3.7.100", org.eclipse.core.resources;bundle-version="3.7.100",
org.eclipse.ice.item;bundle-version="2.0.0", org.eclipse.ice.item;bundle-version="2.0.0",
......
...@@ -8,13 +8,9 @@ Import-Package: org.eclipse.ice.datastructures.ICEObject, ...@@ -8,13 +8,9 @@ Import-Package: org.eclipse.ice.datastructures.ICEObject,
org.eclipse.ice.datastructures.form, org.eclipse.ice.datastructures.form,
org.eclipse.ice.item, org.eclipse.ice.item,
org.eclipse.ice.item.jobLauncher, org.eclipse.ice.item.jobLauncher,
org.eclipse.ice.viz.service.datastructures,
org.eclipse.ice.viz.service.datastructures.VizObject, org.eclipse.ice.viz.service.datastructures.VizObject,
org.eclipse.ice.viz.service.geometry.shapes,
org.eclipse.ice.viz.service.javafx.geometry.datatypes,
org.eclipse.ice.viz.service.javafx.mesh.datatypes,
org.eclipse.ice.viz.service.mesh.datastructures,
org.eclipse.ice.viz.service.modeling, org.eclipse.ice.viz.service.modeling,
org.eclipse.ice.viz.service.mesh.datastructures,
org.slf4j;version="1.7.2" org.slf4j;version="1.7.2"
Service-Component: OSGI-INF/nekModelComponent.xml, Service-Component: OSGI-INF/nekModelComponent.xml,
OSGI-INF/nek5000LauncherComponent.xml OSGI-INF/nek5000LauncherComponent.xml
......
...@@ -25,7 +25,6 @@ import org.eclipse.ice.datastructures.form.AllowedValueType; ...@@ -25,7 +25,6 @@ import org.eclipse.ice.datastructures.form.AllowedValueType;
import org.eclipse.ice.datastructures.form.DataComponent; import org.eclipse.ice.datastructures.form.DataComponent;
import org.eclipse.ice.datastructures.form.Entry; import org.eclipse.ice.datastructures.form.Entry;
import org.eclipse.ice.datastructures.form.MeshComponent; import org.eclipse.ice.datastructures.form.MeshComponent;
import org.eclipse.ice.viz.service.javafx.mesh.datatypes.FXMeshControllerFactory;
import org.eclipse.ice.viz.service.mesh.datastructures.BoundaryCondition; import org.eclipse.ice.viz.service.mesh.datastructures.BoundaryCondition;
import org.eclipse.ice.viz.service.mesh.datastructures.BoundaryConditionType; import org.eclipse.ice.viz.service.mesh.datastructures.BoundaryConditionType;
import org.eclipse.ice.viz.service.mesh.datastructures.NekPolygonController; import org.eclipse.ice.viz.service.mesh.datastructures.NekPolygonController;
...@@ -111,14 +110,11 @@ public class NekReader { ...@@ -111,14 +110,11 @@ public class NekReader {
* elements, number of fluid elements, number of passive scalar sets). * elements, number of fluid elements, number of passive scalar sets).
*/ */
private ProblemProperties properties; private ProblemProperties properties;
// TODO Replace this hardcoded factory with one chosen by the user to
// genereate the correct views
/** /**
* The factory which the reader will use to produce views and controllers * The factory which the reader will use to produce views and controllers
* for the objects it generates. * for the objects it generates.
*/ */
private IControllerFactory factory = new FXMeshControllerFactory(); private IControllerFactory factory;
/** /**
* Nullary constructor. * Nullary constructor.
......
...@@ -280,9 +280,9 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U ...@@ -280,9 +280,9 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
<plugin id="org.eclipse.ice.viz" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.ice.viz" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.ice.viz.service" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service.geometry" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.ice.viz.service.geometry" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service.javafx" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.ice.viz.service.javafx.geometry" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service.javafx.mesh" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service.jme3" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.ice.viz.service.jme3" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service.mesh" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service.paraview" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.ice.viz.service.paraview" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service.paraview.web" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.ice.viz.service.paraview.web" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service.visit" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.ice.viz.service.visit" autoStart="true" startLevel="0" />
......
...@@ -4,8 +4,7 @@ Bundle-Name: Geometry Visualization Service Plugin ...@@ -4,8 +4,7 @@ Bundle-Name: Geometry Visualization Service Plugin
Bundle-SymbolicName: org.eclipse.ice.viz.service.geometry;singleton:=true Bundle-SymbolicName: org.eclipse.ice.viz.service.geometry;singleton:=true
Bundle-Version: 2.1.8 Bundle-Version: 2.1.8
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Service-Component: OSGI-INF/ControllerFactory.xml, Service-Component: OSGI-INF/ControllerFactory.xml
OSGI-INF/vizGeometryService.xml
Import-Package: com.jme3.app, Import-Package: com.jme3.app,
com.jme3.asset, com.jme3.asset,
com.jme3.export, com.jme3.export,
...@@ -31,7 +30,8 @@ Import-Package: com.jme3.app, ...@@ -31,7 +30,8 @@ Import-Package: com.jme3.app,
org.eclipse.jface.databinding.swt, org.eclipse.jface.databinding.swt,
org.slf4j;version="1.7.2", org.slf4j;version="1.7.2",
visit.java.client visit.java.client
Export-Package: org.eclipse.ice.viz.service.geometry.shapes, Export-Package: org.eclipse.ice.viz.service.geometry.plantView,
org.eclipse.ice.viz.service.geometry.shapes,
org.eclipse.ice.viz.service.geometry.widgets org.eclipse.ice.viz.service.geometry.widgets
Bundle-Vendor: Oak Ridge National Laboratory Bundle-Vendor: Oak Ridge National Laboratory
Eclipse-ExtensibleAPI: true Eclipse-ExtensibleAPI: true
......
/*******************************************************************************
* Copyright (c) 2016 UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Robert Smith
*******************************************************************************/
package org.eclipse.ice.viz.service.geometry.plantView;
import org.eclipse.swt.widgets.Composite;
import com.jme3.math.Vector3f;
/**
* An interface for classes which create the graphical representations for Plant
* Views and maintain their current state.
*
* @author Jordan Deyton, Robert Smith
*
*/
public interface IPlantView {
/**
* Creates a new SWT {@link Composite} with this object's associated Plant
* View embedded within it.
*
* @param parent
* The parent <code>Composite</code>.
* @return The <code>Composite</code> that has an embedded visualization
* managed by this <code>PlantState</code>. This
* <code>Composite</code>'s layout should be set by the caller.
* <b>This <code>Composite</code> should be disposed when it is no
* longer required</b>.
*/
public Composite createComposite(Composite parent);
/**
* Exports the view to an image file. The user is prompted for the image
* location.
*/
public void exportImage();
/**
* Resets the plant view's camera to its default position and orientation.
*
* @see #setDefaultCameraPosition(Vector3f)
* @see #setDefaultCameraOrientation(Vector3f, Vector3f)
*/
public void resetCamera();
/**
* Sets the default orientation of the view's camera. The vectors formed by
* the direction coordinates and the up coordinates must be orthogonal, or
* else an exception will be thrown.
*
* @param directionX
* The x direction of the new default direction in which the
* camera will point.
* @param directionX
* The x direction of the new default direction in which the
* camera will point.
* @param directionX
* The x direction of the new default direction in which the
* camera will point.
* @param upX
* The x direction of the new default up direction.
* @param upY
* The y direction of the new default up direction.
* @param upZ
* The z direction of the new default up direction.
*/
public void setDefaultCameraOrientation(float directionX, float directionY,
float directionZ, float upX, float upY, float upZ);
/**
* Sets the default position of the view's camera.
*
* @param x
* The new default position x coordinate.
* @param y
* The new default position y coordinate.
* @param z
* The new default position z coordinate.
*/
public void setDefaultCameraPosition(float x, float y, float z);
/**
* Sets all rendered plant components to be viewed as wireframes or as solid
* objects.
*
* @param wireframe
* If true, plant components will be rendered with wireframes. If
* false, they will be rendered solid.
*/
public void setWireframe(boolean wireframe);
/**
* Moves the camera forward or backward.
*
* @param distance
* If positive, the camera moves forward. If negative, the camera
* moves backward.
*/
public void thrustCamera(float distance);
/**
* Moves the camera right or left.
*
* @param distance
* If positive, the camera moves right. If negative, the camera
* moves left.
*/
public void strafeCamera(float distance);
/**
* Moves the camera up or down.
*
* @param distance
* If positive, the camera moves up. If negative, the camera
* moves down.
*/
public void raiseCamera(float distance);
/**
* Rotates (rolls) the camera right or left.
*
* @param radians
* If positive, the camera rolls right. If negative, the camera
* rolls left.
*/
public void rollCamera(float radians);
/**
* Changes the pitch of the camera (rotates up and down).
*
* @param radians
* If positive, the camera pitches up. If negative, the camera
* pitches down.
*/
public void pitchCamera(float radians);
/**
* Changes the yaw of the camera right or left.
*
* @param radians
* If positive, the camera rotates right. If negative, the camera
* rotates left.
*/
public void yawCamera(float radians);
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry excluding="org/eclipse/ice/viz/service/geometry/shapes/Tube.java|org/eclipse/ice/viz/service/geometry/widgets/RenderShape.java" kind="src" path="src"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.ice.viz.service.mesh"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.ice.viz.service.javafx.geometry</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JavaFX Geometry Visualization Services Plugin
Bundle-SymbolicName: org.eclipse.ice.viz.service.javafx.geometry;singleton:=true
Bundle-Version: 2.1.7.20150825
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Service-Component: OSGI-INF/vizGeometryService.xml
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-Vendor: Oak Ridge National Laboratory
Eclipse-ExtensibleAPI: true
Import-Package: org.eclipse.ice.viz.service,
org.eclipse.ice.viz.service.datastructures.VizObject,
org.eclipse.ice.viz.service.geometry.shapes,
org.eclipse.ice.viz.service.geometry.widgets,
org.eclipse.ice.viz.service.javafx.canvas,
org.eclipse.ice.viz.service.javafx.internal,
org.eclipse.ice.viz.service.javafx.scene.base,
org.eclipse.ice.viz.service.javafx.scene.model,
org.eclipse.ice.viz.service.javafx.viewer,
org.eclipse.ice.viz.service.modeling
Export-Package: org.eclipse.ice.viz.service.javafx.geometry,
org.eclipse.ice.viz.service.javafx.geometry.datatypes
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment