JRViewer
insteadpublic class ViewerApp extends Object
JrScene
.
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()
!display()
.Modifier and Type | Field and Description |
---|---|
static Color[] |
defaultBackgroundColor
Deprecated.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccessory(Component c)
Deprecated.
|
void |
addAccessory(Component c,
String title)
Deprecated.
|
void |
addAccessory(Component c,
String title,
boolean scrolling)
Deprecated.
|
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.
|
Component |
getBeanShell()
Deprecated.
Get the bean shell.
|
Component |
getComponent()
Deprecated.
renamed to
getContent() |
Component |
getContent()
Deprecated.
Get the ViewerApp frame's content.
|
Viewer |
getCurrentViewer()
Deprecated.
It's useful to get a hold of the active backend.
|
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).
|
Component |
getNavigator()
Deprecated.
Get the navigator.
|
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.
|
ViewerSwitch |
getViewerSwitch()
Deprecated.
|
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(String[] args)
Deprecated.
|
void |
removeAccessory(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(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(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. |
public static Color[] defaultBackgroundColor
public ViewerApp(SceneGraphNode node)
node
- the SceneGraphNode (SceneGraphComponent or Geometry) to be displayed with the viewerpublic ViewerApp(SceneGraphComponent root, SceneGraphPath cameraPath, SceneGraphPath emptyPick, SceneGraphPath avatar)
root
- the scene's rootcameraPath
- the scene's camera pathemptyPick
- the scene's empty pick pathavatar
- the scene's avatar pathpublic ViewerApp(JrScene scene)
scene
- the scene to be displayed with the viewerpublic ViewerApp(Viewer[] vs)
public static void main(String[] args) throws IOException
IOException
public JFrame display()
public static ViewerApp display(SceneGraphNode node)
node
- the SceneGraphNode (SceneGraphComponent or Geometry) to be displayed in the viewerpublic static ViewerApp display(SceneGraphComponent root, SceneGraphPath cameraPath, SceneGraphPath emptyPick, SceneGraphPath avatar)
root
- the scene's rootcameraPath
- the scene's camera pathemptyPick
- the scene's empty pick pathavatar
- the scene's avatar pathpublic void update()
public void showExternalNavigator(boolean show)
public void showExternalBeanShell(boolean show)
public void setAttachNavigator(boolean b)
b
- true iff navigator is to be attachedpublic void setAttachBeanShell(boolean b)
b
- true iff bean shell is to be attachedpublic JFrame getFrame()
public Component getComponent()
getContent()
public Component getContent()
getViewingComponent()
public SelectionManager getSelectionManager()
public Component getNavigator()
public void setPropagateSelection(boolean b)
public Component getBeanShell()
public Component getNavigatorWithAccessories()
addAccessory(Component, String)
public Viewer getViewer()
getViewerSwitch()
.public Viewer getCurrentViewer()
public ViewerSwitch getViewerSwitch()
public ToolSystem getToolSystem()
public Component getViewingComponent()
getContent()
public JrScene getJrScene()
public SceneGraphComponent getSceneRoot()
public boolean isAttachBeanShell()
public boolean isAttachNavigator()
public void setIncludeMenu(boolean b)
setCreateMenu(boolean)
public boolean isIncludeMenu()
isCreateMenu()
public void setCreateMenu(boolean b)
b
- true iff menu is to be createdsetShowMenu(boolean)
public boolean isCreateMenu()
public void setShowMenu(boolean b)
b
- true iff menu bar is to be shownsetCreateMenu(boolean)
public boolean isShowMenu()
public ViewerAppMenu getMenu()
public void addAccessory(Component c)
public void setFirstAccessory(Component c)
public void removeAccessory(Component c)
public boolean isExternalNavigator()
public void setExternalNavigator(boolean externalNavigator)
externalBeanShell
- true iff navigator is to be displayed in an external framepublic boolean isExternalBeanShell()
public void setExternalBeanShell(boolean externalBeanShell)
externalBeanShell
- true iff bean shell is to be displayed in an external framepublic void setBackgroundColor(Color... colors)
colors
- list of colors with length = 1 or 4public void dispose()