public class IcyVtkPanel extends VtkJoglPanel implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.KeyListener, java.lang.Runnable
javax.swing.JComponent.AccessibleJComponent
java.awt.Component.BaselineResizeBehavior
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
IcyVtkPanel() |
Modifier and Type | Method and Description |
---|---|
vtk.vtkAxesActor |
getAxesActor()
Return the actor for axis orientation display.
|
int[] |
getAxisOrientationDisplayOffset()
Returns the offset from border ({X, Y} format) for the axis orientation display
|
double |
getAxisOrientationDisplayScale()
Returns the scale factor (default = 1) for the axis orientation display
|
boolean |
getLightFollowCamera() |
vtk.vtkPicker |
getPicker()
Return picker object.
|
boolean |
isAxisOrientationDisplayEnable()
Return true if the axis orientation display is enabled
|
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e) |
vtk.vtkProp |
pick(int x,
int y)
Pick object at specified position and return it.
|
void |
pickActor(int x,
int y)
Deprecated.
Use
pickActor(int, int) instead |
void |
removeNotify() |
void |
rotateView(int dx,
int dy)
Rotate current camera view
|
void |
rotateView(vtk.vtkCamera c,
vtk.vtkRenderer r,
int dx,
int dy)
Rotate specified camera view
|
void |
run() |
void |
setAxisOrientationDisplayEnable(boolean value)
Return true if the axis orientation display is enabled
|
void |
setAxisOrientationDisplayOffset(int[] value)
Sets the offset from border ({X, Y} format) for the axis orientation display (default = {130, 130})
|
void |
setAxisOrientationDisplayScale(double value)
Returns the scale factor (default = 1) for the axis orientation display
|
void |
setCoarseRendering()
Set coarse and fast rendering mode immediately
|
void |
setCoarseRendering(long time)
Set coarse and fast rendering mode for the specified amount of time (in ms).
|
void |
setFineRendering()
Set fine (and possibly slow) rendering mode immediately
|
void |
setFineRendering(long delay)
Set fine (and possibly slow) rendering after specified time delay (in ms).
|
void |
setLightFollowCamera(boolean value)
Set to
true to automatically update light position to camera position when camera move. |
static void |
setLightToCameraPosition(vtk.vtkLight l,
vtk.vtkCamera c)
Set the specified light at the same position than the specified camera
|
void |
sizeChanged()
Called when window render size changed (helper for this specific event)
|
void |
translateView(double dx,
double dy)
Translate current camera view
|
void |
translateView(vtk.vtkCamera c,
vtk.vtkRenderer r,
double dx,
double dy)
Translate specified camera view
|
void |
updateAxisView()
Update axis display depending the current scene camera view.
|
void |
zoomView(double factor)
Zoom current view by specified factor (negative value means unzoom)
|
void |
zoomView(vtk.vtkCamera c,
vtk.vtkRenderer r,
double factor)
Zoom current view by specified factor (value < 1d means unzoom while value > 1d mean zoom)
|
Delete, disposeInternal, doHardCopy, getCamera, getInteractor, getLight, getRenderer, GetRenderer, getRenderWindow, GetRenderWindow, HardCopy, InteractionModeRotate, InteractionModeTranslate, InteractionModeZoom, isRendering, isWindowSet, lock, Lock, paint, render, Render, resetCamera, resetCameraClippingRange, setBounds, unlock, UnLock, updateLight, UpdateLight
addGLEventListener, addGLEventListener, addNotify, areAllGLEventListenerInitialized, createContext, destroy, display, disposeGLEventListener, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getCustomPixelBufferProvider, getDefaultCloseOperation, getDelegatedDrawable, getExclusiveContextThread, getFactory, getGL, getGLEventListener, getGLEventListenerCount, getGLEventListenerInitState, getGLProfile, getHandle, getNativeSurface, getSkipGLOrientationVerticalFlip, getTextureUnit, getUpstreamWidget, initializeBackend, invoke, invoke, isGLOriented, isRealized, print, releasePrint, removeGLEventListener, reshape, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setDefaultCloseOperation, setExclusiveContextThread, setGL, setGLEventListenerInitState, setOpaque, setPixelBufferProvider, setRealized, setSharedAutoDrawable, setSharedContext, setSkipGLOrientationVerticalFlip, setTextureUnit, setupPrint, shouldPreserveColorBufferIfTranslucent, swapBuffers, toString
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener
public IcyVtkPanel()
public void removeNotify()
removeNotify
in class javax.media.opengl.awt.GLJPanel
public void sizeChanged()
VtkJoglPanel
sizeChanged
in class VtkJoglPanel
public vtk.vtkPicker getPicker()
public vtk.vtkAxesActor getAxesActor()
public boolean getLightFollowCamera()
public boolean isAxisOrientationDisplayEnable()
public int[] getAxisOrientationDisplayOffset()
public double getAxisOrientationDisplayScale()
public void setLightFollowCamera(boolean value)
true
to automatically update light position to camera position when camera move.public void setAxisOrientationDisplayEnable(boolean value)
public void setAxisOrientationDisplayOffset(int[] value)
public void setAxisOrientationDisplayScale(double value)
@Deprecated public void pickActor(int x, int y)
pickActor(int, int)
insteadpublic vtk.vtkProp pick(int x, int y)
public void translateView(vtk.vtkCamera c, vtk.vtkRenderer r, double dx, double dy)
public void rotateView(vtk.vtkCamera c, vtk.vtkRenderer r, int dx, int dy)
public void zoomView(vtk.vtkCamera c, vtk.vtkRenderer r, double factor)
public void translateView(double dx, double dy)
public void rotateView(int dx, int dy)
public void zoomView(double factor)
public static void setLightToCameraPosition(vtk.vtkLight l, vtk.vtkCamera c)
public void setCoarseRendering()
setCoarseRendering(long)
,
setFineRendering()
public void setCoarseRendering(long time)
setFineRendering(long)
public void setFineRendering()
setFineRendering(long)
,
setCoarseRendering()
public void setFineRendering(long delay)
setCoarseRendering(long)
public void updateAxisView()
public void run()
run
in interface java.lang.Runnable
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener