public interface IEmbeddedViewClient
ViewAppState
s) that use
EmbeddedView
s. EmbeddedView
s can register and unregister
a single IEmbeddedViewClient
. The methods provided by this
interface enable the EmbeddedView
to hook up to the client.
For some of these operations, the implementation should not worry about
operating on the render thread. These operations will have a note in their
documentation.
Note: Each EmbeddedView
can support only a single
IEmbeddedViewClient
at a time, but the reverse is not
necessarily true depending on your implementation of this interface.
Modifier and Type | Method and Description |
---|---|
com.jme3.scene.Node |
createHUD(EmbeddedView view)
Creates a new GUI or HUD
Node . |
java.lang.Object |
createViewCamera(EmbeddedView view)
Creates a new interactive camera for an
EmbeddedView . |
void |
disposeHUD(EmbeddedView view)
Disposes the HUD
Node associated with the specified
EmbeddedView . |
void |
disposeViewCamera(EmbeddedView view)
Disposes specified interactive camera associated with the specified
EmbeddedView . |
com.jme3.scene.Node |
getSceneRoot(EmbeddedView view)
Gets the root
Node for the client's scene. |
void |
updateHUD(EmbeddedView view,
int width,
int height)
Notifies the client that a HUD must be updated based on the provided
width and height of the associated
EmbeddedView 's underlying
AwtPanel . |
void |
updateViewCamera(EmbeddedView view,
boolean enabled)
Notifies the client that a camera must be updated.
|
void |
viewActivated(EmbeddedView view)
Notifies the client that the
EmbeddedView (i.e., the
underlying AwtPanel ) has been activated. |
void |
viewDeactivated(EmbeddedView view)
Notifies the client that the
EmbeddedView (i.e., the
underlying AwtPanel ) has been deactivated. |
void |
viewResized(EmbeddedView view,
int width,
int height)
Notifies the client that the
EmbeddedView 's underlying
AwtPanel has been resized. |
com.jme3.scene.Node getSceneRoot(EmbeddedView view)
Node
for the client's scene. This is the
Node
that will be shown in the EmbeddedView
's
main ViewPort
.view
- The EmbeddedView
that is requesting the root
Node
.Node
for the client's scene.com.jme3.scene.Node createHUD(EmbeddedView view)
Node
. This is necessary because the
coordinates of objects in the HUD associated with each
EmbeddedView
must be updated when the underlying
AwtPanel
changes size.
Note: This method is called from the render thread.
view
- The EmbeddedView
that is requesting the GUI/HUD
Node
.Node
.void updateHUD(EmbeddedView view, int width, int height)
EmbeddedView
's underlying
AwtPanel
.
Note: This method is called from the render thread.
view
- The EmbeddedView
whose size has changed.width
- The new width of the EmbeddedView
's
AwtPanel
.height
- The new width of the EmbeddedView
's
AwtPanel
.void disposeHUD(EmbeddedView view)
Node
associated with the specified
EmbeddedView
.
Note: This method is called from the render thread.
view
- The EmbeddedView
that is detaching from the
GUI/HUD Node
.java.lang.Object createViewCamera(EmbeddedView view)
EmbeddedView
. This
is necessary because each EmbeddedView
is associated with a
unique camera, and each camera should be enabled or disabled along with
the view's underlying AwtPanel
.
Note: This method is called from the render thread.
view
- The EmbeddedView
that is requesting an
interactive camera.void updateViewCamera(EmbeddedView view, boolean enabled)
EmbeddedView
's underlying
AwtPanel
has gained or lost focus to enable or disable the
specified camera.view
- The EmbeddedView
that has gained or lost focus.enabled
- Whether or not to enable the interactive camera.void disposeViewCamera(EmbeddedView view)
EmbeddedView
.
Note: This method is called from the render thread.
view
- The EmbeddedView
that is removing the interactive
camera.void viewResized(EmbeddedView view, int width, int height)
EmbeddedView
's underlying
AwtPanel
has been resized.
Note: This method is called from the render thread.
view
- The EmbeddedView
whose size has changed.width
- The new width of the EmbeddedView
's
AwtPanel
.height
- The new width of the EmbeddedView
's
AwtPanel
.void viewActivated(EmbeddedView view)
EmbeddedView
(i.e., the
underlying AwtPanel
) has been activated.view
- The activated view.void viewDeactivated(EmbeddedView view)
EmbeddedView
(i.e., the
underlying AwtPanel
) has been deactivated.view
- The deactivated view.