public interface RemoteRenderer
RemoteRendererinterface provides methods to notify the
StateManagerwhen to render an image to a remoted view, as well as methods to configure the format of the rendered images before streaming.
The methods in this interface expect the view's name as a parameter. This is
the name you chose for the applicable view when you registered it using
About the Timing of View Updates
Your application needs to know when to stream a new image to a view. To do this, you add either the
renderViewDeferred method to an event handler. As their name
indicates, the main difference between the two methods is timing. In one
case, the call to
is immediate, in the other instance, it is deferred. Using the deferred
method is the most common, as it is less resource-intensive: the service does
not need to spend time churning image bits that may not be needed by the
client right away.
About View Interactivity Modes
The purpose of the view interactivity modes is to make it possible to send images of lower quality when the end user is interacting with a view, and to restore full quality when interaction stops. This way, the size of the view updates during interaction can be smaller. The interactivity mode is set using the
Once this is in place, you can configure the image quality values for the
interactive and non-interactive modes using EncoderFormat objects in the
|Modifier and Type||Method and Description|
Sets the interactive mode for the specified view to either
void renderViewDeferred(java.lang.String viewName)
StateManagerthat the image in the specified view has been updated and needs to be rendered; the view image bits will be acquired later via the view's
renderViewinterface. The timing of the call to
renderViewis not configurable; this is handled automatically by PureWeb.
void renderViewImmediate(java.lang.String viewName)
StateManagerthat the image in the specified view has been been updated and needs to be rendered; the view image bits will be acquired immediately via the view's
renderViewinterface. This must be called on the UI thread.
void setViewInteracting(java.lang.String viewName, boolean isInteracting)
setViewInteracting method is used to notify the
StateManager when user interaction begins and
when it stops. For example, you could set the interactive mode to
true on a mouse down event, and set it back to
false on a mouse up event.
© 2010 - 2018 Calgary Scientific Inc. All Rights Reserved.
This documentation shall not wholly or in part, in any form or by any means, electronic, mechanical, including photocopying, be reproduced or transmitted without the authorized, written consent of Calgary Scientific.