public class DataCanvas extends Canvas3D
Modifier and Type | Class and Description |
---|---|
static interface |
DataCanvas.ViewListener |
Canvas.AccessibleAWTCanvas
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
FIELD_ALL, FIELD_LEFT, FIELD_RIGHT
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
DataCanvas(GraphicsConfiguration gc) |
DataCanvas(GraphicsConfiguration gc,
Color3f back) |
Modifier and Type | Method and Description |
---|---|
void |
addObject(DataObject a)
Adds a "DataObject" which is just an interface for adding a branch group.
|
void |
addSnakeListener(CanvasView cv)
Adding a snake listener sets 'picking' events where using the mouse on the 3d view can
cause interactions.
|
void |
addViewListener(DataCanvas.ViewListener l) |
void |
centerCamera(double[] pt) |
void |
changeBackgroundColor(Color color) |
void |
clicked(MouseEvent evt)
Gets the 'results' a pick result and send the results on down
the line
|
void |
createOffscreenCanvas() |
void |
debugOrientation() |
void |
destroyOffscreenCanvas() |
void |
dragged(MouseEvent evt) |
static GraphicsConfiguration |
getBestConfigurationOnSameDevice(Window frame)
Gets the best graphics configuration to display on the current device.
|
Color |
getCanvasBackgroundColor() |
double[] |
getForward() |
double[] |
getUp()
The up vector is a vector that would move in the y direction on the current display.
|
double[] |
getViewParameters()
All of the current view values.
|
void |
lookTowards(double[] normal,
double[] up)
Rotates the view such that the new view will be facing towards the normal.
|
void |
moved(MouseEvent evt) |
void |
pivotAboutCenterOfView(int dx,
int dy)
Use the original rotation and change the view
|
void |
pressed(MouseEvent evt) |
void |
released(MouseEvent evt) |
void |
removeObject(DataObject obj)
Removes an object if it exists.
|
void |
removeSnakeListener(CanvasView cv) |
void |
removeViewListener(DataCanvas.ViewListener l) |
void |
rotateView(double[] axisAngle)
Rotates the view using an axis angle.
|
void |
rotateView(int dx,
int dy) |
void |
setDefaultControllerEnabled(boolean enabled) |
void |
setView(deformablemesh.meshview.StationaryViews view) |
void |
setViewParameters(double[] view)
Sets the view based on the parameters.
|
BufferedImage |
snapShot() |
void |
translateView(int dx,
int dy) |
void |
twistView(int dz) |
void |
zoomIn() |
void |
zoomOut() |
addNotify, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, isOffScreen, isRendererRunning, isShadingLanguageSupported, paint, postRender, postSwap, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, 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, revalidate, 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
public DataCanvas(GraphicsConfiguration gc, Color3f back)
public DataCanvas(GraphicsConfiguration gc)
public void setDefaultControllerEnabled(boolean enabled)
public void addObject(DataObject a)
a
- the data object.public void zoomIn()
public void zoomOut()
public void twistView(int dz)
public void rotateView(double[] axisAngle)
axisAngle
- public void rotateView(int dx, int dy)
public void centerCamera(double[] pt)
public void translateView(int dx, int dy)
public void removeObject(DataObject obj)
obj
- object of interestpublic void addViewListener(DataCanvas.ViewListener l)
public void removeViewListener(DataCanvas.ViewListener l)
public void debugOrientation()
public void addSnakeListener(CanvasView cv)
cv
- the displayed view that will be interacted with.public void removeSnakeListener(CanvasView cv)
public void clicked(MouseEvent evt)
public void dragged(MouseEvent evt)
public void pressed(MouseEvent evt)
public void released(MouseEvent evt)
public void moved(MouseEvent evt)
public static GraphicsConfiguration getBestConfigurationOnSameDevice(Window frame)
frame
- frame that you want to add a Canvas3d topublic void createOffscreenCanvas()
public void destroyOffscreenCanvas()
public BufferedImage snapShot()
public void changeBackgroundColor(Color color)
public Color getCanvasBackgroundColor()
public void setView(deformablemesh.meshview.StationaryViews view)
public double[] getViewParameters()
public void setViewParameters(double[] view)
view
- DX, DY, ZOOM, aa.x, aa.y, aa.z, aa.anglepublic void lookTowards(double[] normal, double[] up)
normal
- public void pivotAboutCenterOfView(int dx, int dy)
dx
- dy
- public double[] getUp()
public double[] getForward()
Copyright © 2013–2022 Francis Crick Institute. All rights reserved.