it.polito.elite.visualization.ontoviewer.scenes3D
Class SceneFocusRoots1

java.lang.Object
  extended by it.polito.elite.visualization.ontoviewer.scenes3D.Scene3D
      extended by it.polito.elite.visualization.ontoviewer.scenes3D.SceneFocusRoots1

public class SceneFocusRoots1
extends Scene3D


Field Summary
private  ConceptSphere bgSphere
           
private  java.util.Hashtable<java.lang.String,javax.media.j3d.BranchGroup> conceptSpheresBg
           
private  javax.media.j3d.BranchGroup fakeBG
           
private  javax.vecmath.Vector3f fakeSpherePosition
           
(package private)  float originalSphereRadius
           
(package private)  float radius
           
private  java.util.HashSet<java.lang.String> workingSet
           
 
Fields inherited from class it.polito.elite.visualization.ontoviewer.scenes3D.Scene3D
behaviorCURS, behaviorROT, behaviorTRAS, behaviorZOOM, bgLabelScene, bgSCENE, currentConceptURI, currentInstanceURI, numScenes, positions, refMainPanel, rootPosition, sceneID, simplePick, tgROT, tgSCENE
 
Constructor Summary
SceneFocusRoots1(Pane3DScene _mf, java.util.Set<java.lang.String> uris)
           
 
Method Summary
protected  void addBehaviors()
          Adds mouse related behaviour to manage scene interaction (pan, zoom, rotate, pick...)
private  void collapseSiblings(java.lang.String uri)
           
private  void computeNodesPosition(int numNodes)
           
private  javax.media.j3d.Transform3D computeOrientation(javax.vecmath.Vector3f finalPos)
           
private  javax.media.j3d.TransformGroup createFakeConceptSphere(ConceptData original)
          The fake sphere is embedded in 2 transformGroups because of the positionInterpolator.
 void createScene()
           
private  javax.media.j3d.BranchGroup drawConcept(java.lang.String uri, ConceptData data)
           
private  void drawNodes()
           
private  void drawScene()
           
 void expand_OR_collapseElement(java.lang.String uri)
           
private  void expandAllConcepts()
           
private  void expandOneConcepts(java.lang.String uri)
           
 void fadeInAnimation()
           
 void fadeOutAnimation(java.lang.String uri, Scene3D nextScene)
           
private  void fadeOutFakeSphere(javax.media.j3d.BranchGroup bgAnimation, long time, javax.vecmath.Vector3f finalPosition, javax.media.j3d.TransformGroup fakeTG, Scene3D nextScene)
           
private  void fadeOutMainSphere(javax.media.j3d.BranchGroup bgAnimation, long time, javax.vecmath.Vector3f center)
           
private  void removeOneConcepts(java.lang.String uri)
           
 void selectElement(java.lang.String newUri)
           
 boolean showContextMenu(java.awt.PopupMenu menu, java.lang.String uri)
           
 boolean showRelationContextMenu(java.awt.PopupMenu menu, java.util.HashSet<RelationData> relSet)
           
 
Methods inherited from class it.polito.elite.visualization.ontoviewer.scenes3D.Scene3D
addPopUpMenu, addSceneLabel, backToInitialSceneView, centralPositionAtGivenHeightScale, createBGandTGforTheScene, createBranchGroup, createRandomSet, createTransformGroup, get2DTo3DPoint, get3DTo2DPoint, getBounds, getCanvas3DSize, getCurrentConceptURI, getCurrentInstanceURI, getSceneBranchGroup, getSceneID, getShapes, recreateSceneFromScratch, removeBehaviours, removePopUpMenu, repaintCanvas, setCurrentConceptURI, setCurrentInstanceURI, showSelectionPopUp, updateView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bgSphere

private ConceptSphere bgSphere

conceptSpheresBg

private java.util.Hashtable<java.lang.String,javax.media.j3d.BranchGroup> conceptSpheresBg

fakeBG

private javax.media.j3d.BranchGroup fakeBG

fakeSpherePosition

private javax.vecmath.Vector3f fakeSpherePosition

originalSphereRadius

float originalSphereRadius

radius

float radius

workingSet

private java.util.HashSet<java.lang.String> workingSet
Constructor Detail

SceneFocusRoots1

public SceneFocusRoots1(Pane3DScene _mf,
                        java.util.Set<java.lang.String> uris)
Method Detail

addBehaviors

protected void addBehaviors()
Description copied from class: Scene3D
Adds mouse related behaviour to manage scene interaction (pan, zoom, rotate, pick...)

Overrides:
addBehaviors in class Scene3D

collapseSiblings

private void collapseSiblings(java.lang.String uri)

computeNodesPosition

private void computeNodesPosition(int numNodes)

computeOrientation

private javax.media.j3d.Transform3D computeOrientation(javax.vecmath.Vector3f finalPos)

createFakeConceptSphere

private javax.media.j3d.TransformGroup createFakeConceptSphere(ConceptData original)
The fake sphere is embedded in 2 transformGroups because of the positionInterpolator. fakeTG2 deals with the absolute positioning of the sphere, while fakeTG is used for the relative movement from initial position to final one...

Parameters:
original - The Data about the original concept sphere
Returns:
TransformGroup with the fakeSphere

createScene

public void createScene()
Specified by:
createScene in class Scene3D

drawConcept

private javax.media.j3d.BranchGroup drawConcept(java.lang.String uri,
                                                ConceptData data)

drawNodes

private void drawNodes()

drawScene

private void drawScene()

expand_OR_collapseElement

public void expand_OR_collapseElement(java.lang.String uri)
Specified by:
expand_OR_collapseElement in class Scene3D

expandAllConcepts

private void expandAllConcepts()

expandOneConcepts

private void expandOneConcepts(java.lang.String uri)

fadeInAnimation

public void fadeInAnimation()
Specified by:
fadeInAnimation in class Scene3D

fadeOutAnimation

public void fadeOutAnimation(java.lang.String uri,
                             Scene3D nextScene)
Specified by:
fadeOutAnimation in class Scene3D

fadeOutFakeSphere

private void fadeOutFakeSphere(javax.media.j3d.BranchGroup bgAnimation,
                               long time,
                               javax.vecmath.Vector3f finalPosition,
                               javax.media.j3d.TransformGroup fakeTG,
                               Scene3D nextScene)

fadeOutMainSphere

private void fadeOutMainSphere(javax.media.j3d.BranchGroup bgAnimation,
                               long time,
                               javax.vecmath.Vector3f center)

removeOneConcepts

private void removeOneConcepts(java.lang.String uri)

selectElement

public void selectElement(java.lang.String newUri)
Specified by:
selectElement in class Scene3D

showContextMenu

public boolean showContextMenu(java.awt.PopupMenu menu,
                               java.lang.String uri)
Specified by:
showContextMenu in class Scene3D

showRelationContextMenu

public boolean showRelationContextMenu(java.awt.PopupMenu menu,
                                       java.util.HashSet<RelationData> relSet)
Specified by:
showRelationContextMenu in class Scene3D