public class ViewFactory
extends java.lang.Object
ViewAppState
s for components
including GeometryComponent
s, MeshComponent
s, and
PlantComposite
s. To embed the view in an SWT
Composite
, see
ViewAppState.createComposite(org.eclipse.swt.widgets.Composite)
.Constructor and Description |
---|
ViewFactory()
The default constructor.
|
ViewFactory(boolean staticFallBack)
A constructor that allows the
ViewFactory to create its own
MasterApplication if the OSGi-provided
MasterApplication is not available. |
Modifier and Type | Method and Description |
---|---|
MeshAppState |
createMeshView(MeshComponent mesh)
Creates a
MeshAppState for the specified
MeshComponent . |
PlantAppState |
createPlantView(PlantComposite plant)
Creates a
PlantAppState for the specified
PlantComposite . |
void |
disposeView(ViewAppState view)
Disposes of the specified view.
|
public ViewFactory()
public ViewFactory(boolean staticFallBack)
ViewFactory
to create its own
MasterApplication
if the OSGi-provided
MasterApplication
is not available.
Note: This is not intended for use inside ICE but inside
static applications. In ICE, the MasterApplication
is
created only via an OSGi-provided factory.
Note 2: If you use more than one ViewFactory
with
staticFallBack
set to true
and without running
OSGi, then your program may not work properly. jME does not support
multiple SimpleApplication
s running simultaneously.
staticFallBack
- If true, then this factory will create its own
MasterApplication
when it cannot acquire one via
OSGi.public MeshAppState createMeshView(MeshComponent mesh)
MeshAppState
for the specified
MeshComponent
.mesh
- The root MeshComponent
or mesh that contains
edges, vertices, and other MeshComponent
s.MeshAppState
, or null if there is no core
MasterApplication
in the background.public PlantAppState createPlantView(PlantComposite plant)
PlantAppState
for the specified
PlantComposite
.plant
- The root PlantComponent
or plant that can contain
several PlantComponent
s.PlantAppState
, or null if there is no core
MasterApplication
in the background.public void disposeView(ViewAppState view)
view
- The view to dispose.