de.jreality.ui.viewerapp
Class ViewerApp

java.lang.Object
  extended by de.jreality.ui.viewerapp.ViewerApp

Deprecated. use JRViewer instead

public class ViewerApp
extends java.lang.Object

Factory class for jReality Viewer applications, which display a JrScene.
The scene is created from a given SceneGraphComponent or geometry, an existing scene graph or JrScene.
There are several constructors for this purpose.
Note that when using the default JrScene, some tools may already be included in the scene. To avoid this use the appropriate constructors or static methods.

The application's properties can be set the following way:

 ViewerApp va = new ViewerApp(...);
 va.setAttachNavigator(true);
 va.setExternalNavigator(false);
 va.setAttachBeanShell(false);
 va.setCreateMenu(true);
 va.setShowMenu(false);
 [setting more properties]
 
Editing the ViewerApp's default menu can be achieved via the appropriate menu methods:
 ViewerAppMenu menu = va.getMenu();
 menu.removeMenu(ViewerAppMenu.APP_MENU);
 menu.addAction(ViewerAppMenu.FILE_MENU, action);
 [...]
 
After setting properties always call update()!

To display the scene call display().
There are static methods to display a geometry or an existing scene graph easily.

To create your own viewer application use the factory to set up the viewer and additional features and extract needed components for use in a different context.

Author:
weissman, msommer

Field Summary
static java.awt.Color[] defaultBackgroundColor
          Deprecated.  
 
Constructor Summary
ViewerApp(JrScene scene)
          Deprecated. Use this constructor to display an existing JrScene.
ViewerApp(SceneGraphComponent root, SceneGraphPath cameraPath, SceneGraphPath emptyPick, SceneGraphPath avatar)
          Deprecated. Use this constructor to display an existing scene graph by creating a new JrScene with given parameters.
ViewerApp(SceneGraphNode node)
          Deprecated. Use this constructor to display a SceneGraphComponent or Geometry using the ViewerApp's default JrScene.
Note that the default scene already includes some standard tools.
ViewerApp(Viewer[] vs)
          Deprecated.  
 
Method Summary
 void addAccessory(java.awt.Component c)
          Deprecated.  
 void addAccessory(java.awt.Component c, java.lang.String title)
          Deprecated.  
 void addAccessory(java.awt.Component c, java.lang.String title, boolean scrolling)
          Deprecated.  
 javax.swing.JFrame display()
          Deprecated. Display the scene in a JFrame.
static ViewerApp display(SceneGraphComponent root, SceneGraphPath cameraPath, SceneGraphPath emptyPick, SceneGraphPath avatar)
          Deprecated. Displays an existing scene graph by creating a new JrScene with given parameters.
static ViewerApp display(SceneGraphNode node)
          Deprecated. Displays a specified SceneGraphComponent or Geometry using the jReality viewer and the ViewerApp's default JrScene.
 void dispose()
          Deprecated.  
 java.awt.Component getBeanShell()
          Deprecated. Get the bean shell.
 java.awt.Component getComponent()
          Deprecated. renamed to getContent()
 java.awt.Component getContent()
          Deprecated. Get the ViewerApp frame's content.
 Viewer getCurrentViewer()
          Deprecated. It's useful to get a hold of the active backend.
 javax.swing.JFrame getFrame()
          Deprecated. Get current frame displaying the scene.
 JrScene getJrScene()
          Deprecated. Get the scene displayed.
 ViewerAppMenu getMenu()
          Deprecated. Use this method to edit the ViewerApp's menu bar (add/remove menus, add/remove items or actions to special menus).
 java.awt.Component getNavigator()
          Deprecated. Get the navigator.
 java.awt.Component getNavigatorWithAccessories()
          Deprecated. Add accessory components as tabs to navigator component.
 SceneGraphComponent getSceneRoot()
          Deprecated. Get the scene's root node.
 SelectionManager getSelectionManager()
          Deprecated. Get the SelectionManager managing selections in the ViewerApp.
 ToolSystem getToolSystem()
          Deprecated.  
 Viewer getViewer()
          Deprecated. Use getViewerSwitch() getCurrentViewer().
 ViewerSwitch getViewerSwitch()
          Deprecated.  
 java.awt.Component getViewingComponent()
          Deprecated. Get the viewing component only.
 boolean isAttachBeanShell()
          Deprecated. Returns true iff a bean shell is attached to the viewer.
 boolean isAttachNavigator()
          Deprecated. Returns true iff a navigator is attached to the viewer.
 boolean isCreateMenu()
          Deprecated.  
 boolean isExternalBeanShell()
          Deprecated.  
 boolean isExternalNavigator()
          Deprecated.  
 boolean isIncludeMenu()
          Deprecated. renamed into isCreateMenu()
 boolean isShowMenu()
          Deprecated.  
static void main(java.lang.String[] args)
          Deprecated.  
 void removeAccessory(java.awt.Component c)
          Deprecated.  
 void setAttachBeanShell(boolean b)
          Deprecated. Use to attach a bean shell to the viewer.
 void setAttachNavigator(boolean b)
          Deprecated. Use to attach a navigator (sceneTree and inspector) to the viewer.
 void setBackgroundColor(java.awt.Color... colors)
          Deprecated. Sets the scene root's background color.
 void setCreateMenu(boolean b)
          Deprecated. Specify whether to create a menu bar for the ViewerApp's frame.
 void setExternalBeanShell(boolean externalBeanShell)
          Deprecated. Specify whether to display the bean shell in the viewerApp's frame or in an external frame.
 void setExternalNavigator(boolean externalNavigator)
          Deprecated. Specify whether to display the navigator in the viewerApp's frame or in an external frame.
 void setFirstAccessory(java.awt.Component c)
          Deprecated.  
 void setIncludeMenu(boolean b)
          Deprecated. renamed into setCreateMenu(boolean)
 void setPropagateSelection(boolean b)
          Deprecated.  
 void setShowMenu(boolean b)
          Deprecated. Specify whether to show or to hide the ViewerApp's menu bar.
 void showExternalBeanShell(boolean show)
          Deprecated.  
 void showExternalNavigator(boolean show)
          Deprecated.  
 void update()
          Deprecated. Update the viewer application factory.
Needs to be invoked before calling display, menu or getter methods.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultBackgroundColor

public static java.awt.Color[] defaultBackgroundColor
Deprecated. 
Constructor Detail

ViewerApp

public ViewerApp(SceneGraphNode node)
Deprecated. 
Use this constructor to display a SceneGraphComponent or Geometry using the ViewerApp's default JrScene.
Note that the default scene already includes some standard tools.

Parameters:
node - the SceneGraphNode (SceneGraphComponent or Geometry) to be displayed with the viewer

ViewerApp

public ViewerApp(SceneGraphComponent root,
                 SceneGraphPath cameraPath,
                 SceneGraphPath emptyPick,
                 SceneGraphPath avatar)
Deprecated. 
Use this constructor to display an existing scene graph by creating a new JrScene with given parameters.

Parameters:
root - the scene's root
cameraPath - the scene's camera path
emptyPick - the scene's empty pick path
avatar - the scene's avatar path

ViewerApp

public ViewerApp(JrScene scene)
Deprecated. 
Use this constructor to display an existing JrScene.

Parameters:
scene - the scene to be displayed with the viewer

ViewerApp

public ViewerApp(Viewer[] vs)
Deprecated. 
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException

display

public javax.swing.JFrame display()
Deprecated. 
Display the scene in a JFrame.

Returns:
the frame

display

public static ViewerApp display(SceneGraphNode node)
Deprecated. 
Displays a specified SceneGraphComponent or Geometry using the jReality viewer and the ViewerApp's default JrScene.

Parameters:
node - the SceneGraphNode (SceneGraphComponent or Geometry) to be displayed in the viewer
Returns:
the ViewerApp factory instantiated to display the node

display

public static ViewerApp display(SceneGraphComponent root,
                                SceneGraphPath cameraPath,
                                SceneGraphPath emptyPick,
                                SceneGraphPath avatar)
Deprecated. 
Displays an existing scene graph by creating a new JrScene with given parameters.

Parameters:
root - the scene's root
cameraPath - the scene's camera path
emptyPick - the scene's empty pick path
avatar - the scene's avatar path
Returns:
the ViewerApp factory instantiated to display the scene

update

public void update()
Deprecated. 
Update the viewer application factory.
Needs to be invoked before calling display, menu or getter methods.


showExternalNavigator

public void showExternalNavigator(boolean show)
Deprecated. 

showExternalBeanShell

public void showExternalBeanShell(boolean show)
Deprecated. 

setAttachNavigator

public void setAttachNavigator(boolean b)
Deprecated. 
Use to attach a navigator (sceneTree and inspector) to the viewer.

Parameters:
b - true iff navigator is to be attached

setAttachBeanShell

public void setAttachBeanShell(boolean b)
Deprecated. 
Use to attach a bean shell to the viewer.

Parameters:
b - true iff bean shell is to be attached

getFrame

public javax.swing.JFrame getFrame()
Deprecated. 
Get current frame displaying the scene.

Returns:
the frame

getComponent

public java.awt.Component getComponent()
Deprecated. renamed to getContent()

Get the ViewerApp frame's content.

Returns:
the content

getContent

public java.awt.Component getContent()
Deprecated. 
Get the ViewerApp frame's content.

Returns:
the content
See Also:
getViewingComponent()

getSelectionManager

public SelectionManager getSelectionManager()
Deprecated. 
Get the SelectionManager managing selections in the ViewerApp.

Returns:
the SelectionManager

getNavigator

public java.awt.Component getNavigator()
Deprecated. 
Get the navigator.


setPropagateSelection

public void setPropagateSelection(boolean b)
Deprecated. 

getBeanShell

public java.awt.Component getBeanShell()
Deprecated. 
Get the bean shell.


getNavigatorWithAccessories

public java.awt.Component getNavigatorWithAccessories()
Deprecated. 
Add accessory components as tabs to navigator component.

Returns:
tabbed pane with navigator and accessory components
See Also:
addAccessory(Component, String)

getViewer

public Viewer getViewer()
Deprecated. Use getViewerSwitch() getCurrentViewer().

Returns:
getViewerSwitch().

getCurrentViewer

public Viewer getCurrentViewer()
Deprecated. 
It's useful to get a hold of the active backend.

Returns:

getViewerSwitch

public ViewerSwitch getViewerSwitch()
Deprecated. 

getToolSystem

public ToolSystem getToolSystem()
Deprecated. 

getViewingComponent

public java.awt.Component getViewingComponent()
Deprecated. 
Get the viewing component only.

Returns:
the viewing component
See Also:
getContent()

getJrScene

public JrScene getJrScene()
Deprecated. 
Get the scene displayed.

Returns:
the JrScene

getSceneRoot

public SceneGraphComponent getSceneRoot()
Deprecated. 
Get the scene's root node.

Returns:
the root

isAttachBeanShell

public boolean isAttachBeanShell()
Deprecated. 
Returns true iff a bean shell is attached to the viewer.


isAttachNavigator

public boolean isAttachNavigator()
Deprecated. 
Returns true iff a navigator is attached to the viewer.


setIncludeMenu

public void setIncludeMenu(boolean b)
Deprecated. renamed into setCreateMenu(boolean)


isIncludeMenu

public boolean isIncludeMenu()
Deprecated. renamed into isCreateMenu()


setCreateMenu

public void setCreateMenu(boolean b)
Deprecated. 
Specify whether to create a menu bar for the ViewerApp's frame.

Parameters:
b - true iff menu is to be created
See Also:
setShowMenu(boolean)

isCreateMenu

public boolean isCreateMenu()
Deprecated. 

setShowMenu

public void setShowMenu(boolean b)
Deprecated. 
Specify whether to show or to hide the ViewerApp's menu bar.

Parameters:
b - true iff menu bar is to be shown
See Also:
setCreateMenu(boolean)

isShowMenu

public boolean isShowMenu()
Deprecated. 

getMenu

public ViewerAppMenu getMenu()
Deprecated. 
Use this method to edit the ViewerApp's menu bar (add/remove menus, add/remove items or actions to special menus).

Returns:
the viewerApp's menu

addAccessory

public void addAccessory(java.awt.Component c)
Deprecated. 

addAccessory

public void addAccessory(java.awt.Component c,
                         java.lang.String title)
Deprecated. 

addAccessory

public void addAccessory(java.awt.Component c,
                         java.lang.String title,
                         boolean scrolling)
Deprecated. 

setFirstAccessory

public void setFirstAccessory(java.awt.Component c)
Deprecated. 

removeAccessory

public void removeAccessory(java.awt.Component c)
Deprecated. 

isExternalNavigator

public boolean isExternalNavigator()
Deprecated. 

setExternalNavigator

public void setExternalNavigator(boolean externalNavigator)
Deprecated. 
Specify whether to display the navigator in the viewerApp's frame or in an external frame.

Parameters:
externalBeanShell - true iff navigator is to be displayed in an external frame

isExternalBeanShell

public boolean isExternalBeanShell()
Deprecated. 

setExternalBeanShell

public void setExternalBeanShell(boolean externalBeanShell)
Deprecated. 
Specify whether to display the bean shell in the viewerApp's frame or in an external frame.

Parameters:
externalBeanShell - true iff bean shell is to be displayed in an external frame

setBackgroundColor

public void setBackgroundColor(java.awt.Color... colors)
Deprecated. 
Sets the scene root's background color.

Parameters:
colors - list of colors with length = 1 or 4

dispose

public void dispose()
Deprecated.