|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
javax.media.j3d.Canvas3D
bass.visualisation.view.GraphCanvas
public class GraphCanvas
The canvas for bass. Setting up all behaviours, the universe, all interaction with the scene etc... Every call to add stuff into the scenegraph goes from here.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private javax.media.j3d.BranchGroup |
bg
|
private javax.media.j3d.Bounds |
bounds
|
private java.awt.event.KeyListener |
keyListener
|
private com.sun.j3d.utils.behaviors.mouse.MouseRotate |
MouseRotate
|
private com.sun.j3d.utils.behaviors.mouse.MouseTranslate |
MouseTranslate
|
private com.sun.j3d.utils.behaviors.mouse.MouseZoom |
MouseZoom
|
protected javax.media.j3d.TransformGroup |
transformGroup
|
protected javax.media.j3d.TransformGroup |
transformGroup1
|
private com.sun.j3d.utils.universe.SimpleUniverse |
universe
|
| Fields inherited from class javax.media.j3d.Canvas3D |
|---|
FIELD_ALL, FIELD_LEFT, FIELD_RIGHT |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
GraphCanvas(int xsize,
int ysize)
The constructor calls the superconstructor and get the java3d preferred configuration for a simple universe object |
|
| Method Summary | |
|---|---|
private void |
addMouseRotators(javax.media.j3d.Bounds bounds)
addMouseRotators sets up the mouse behaviours and add them to the branchgroup |
void |
createEmptyUniverse()
createEmptyUniverse is called on startup of bass so a black screen is seen inside the gui |
void |
createUniverse()
createUniverse is called when a band should be visualized, on startup createEmptyUniverse is called to set up an empty black screen |
com.sun.j3d.utils.behaviors.mouse.MouseRotate |
getMouseRotate()
|
com.sun.j3d.utils.behaviors.mouse.MouseTranslate |
getMouseTranslate()
|
com.sun.j3d.utils.behaviors.mouse.MouseZoom |
getMouseZoom()
|
void |
init()
The initialization goes here |
void |
resetToFarView()
reset to far view does not use the logarithm to compute the z-transaltion. |
void |
resetToNearView()
resetToNearView is called from the 'reset view' button in the gui. |
void |
setAntialiasingEnabled(boolean enabled)
Enables antialiasing. |
void |
setStereoSeparation(double separation)
Not used in the current version of bass |
void |
startVisualisation(java.lang.String bandID,
int minFriends,
int depth,
boolean friendsconnection,
boolean edgeconnection,
boolean names,
Gui theGui)
This method is called directly from the gui (from it's thread). |
| Methods inherited from class javax.media.j3d.Canvas3D |
|---|
addNotify, getBounds, getBounds, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getHeight, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocation, getLocation, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getSize, getSize, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, getWidth, getX, getY, isOffScreen, isRendererRunning, isShadingLanguageSupported, paint, postRender, postSwap, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering |
| Methods inherited from class java.awt.Canvas |
|---|
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected javax.media.j3d.TransformGroup transformGroup
protected javax.media.j3d.TransformGroup transformGroup1
private javax.media.j3d.BranchGroup bg
private javax.media.j3d.Bounds bounds
private com.sun.j3d.utils.universe.SimpleUniverse universe
private com.sun.j3d.utils.behaviors.mouse.MouseRotate MouseRotate
private com.sun.j3d.utils.behaviors.mouse.MouseTranslate MouseTranslate
private com.sun.j3d.utils.behaviors.mouse.MouseZoom MouseZoom
private java.awt.event.KeyListener keyListener
| Constructor Detail |
|---|
public GraphCanvas(int xsize,
int ysize)
xsize - the size og the window in xysize - the size of the window in y| Method Detail |
|---|
public void init()
public void startVisualisation(java.lang.String bandID,
int minFriends,
int depth,
boolean friendsconnection,
boolean edgeconnection,
boolean names,
Gui theGui)
BassSceneGraph. From there bandview etc...
If all went well the 'filled' Branchgroup will be added to a transformgroup. This TG is then added to the universe object
bandID - the id of the target bandminFriends - the minimum amount of friends a band needs to be in the visualizationdepth - the hierarchielevelfriendsconnection - should the connections between friends be shown?edgeconnection - should the connections from the mainband to it's friends be shown?names - should the name of each band on the screen be shown?public void createUniverse()
public void createEmptyUniverse()
public void setStereoSeparation(double separation)
separation - public void resetToNearView()
public void resetToFarView()
private void addMouseRotators(javax.media.j3d.Bounds bounds)
bounds - the bounds objectpublic com.sun.j3d.utils.behaviors.mouse.MouseTranslate getMouseTranslate()
public com.sun.j3d.utils.behaviors.mouse.MouseRotate getMouseRotate()
public com.sun.j3d.utils.behaviors.mouse.MouseZoom getMouseZoom()
public void setAntialiasingEnabled(boolean enabled)
enabled -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||