public class javaview
extends java.applet.Applet
implements java.lang.Runnable
If Mathematica graphics is piped through stdin then javaview converts the input stream to a geometry object and displays it.
JavaView may be started using pre-configured camera and display settings read from a file.
PvViewer,
Serialized Form| Constructor and Description |
|---|
javaview() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPickListener(PvPickListenerIf listener)
Add pick listener to receive pick events
PvPickEvent to the default display. |
void |
destroy()
Does clean-up when applet is destroyed by the browser.
|
void |
finalize() |
java.lang.String |
getAppletInfo()
Interface of applet to inform about author, version, and copyright
|
java.awt.Dimension |
getPreferredSize()
We need a preferred size such that the frame is able to estimate how many
rows the menu bar will occupy.
|
PvViewer |
getViewer()
Method added to have better access in J/Link.
|
void |
init()
Initializes the applet and creates a thread that configures and initializes the viewer,
loads system and user projects.
|
void |
loadModel(java.lang.String fileName)
Load a model from one or more geometry files through JavaScript into a
running JavaView applet.
|
static void |
main(java.lang.String[] args)
Standalone application support.
|
void |
paint(java.awt.Graphics g)
Print info while initializing applet and viewer, and draw background
image.
|
boolean |
removePickListener(PvPickListenerIf listener)
Remove a registered listener from list of registered listeners.
|
void |
run()
Configure and initialize the viewer, load system and user projects.
|
void |
startFromThread()
Start viewer, e.g. start animation if requested.
|
void |
stop()
Stop viewer, e.g. stop animation if requested
|
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, startadd, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic PvViewer getViewer()
public java.lang.String getAppletInfo()
getAppletInfo in class java.applet.Appletpublic void init()
init in class java.applet.Appletpublic void run()
This method may not be called before applet.init().
run in interface java.lang.Runnablepublic static void main(java.lang.String[] args)
public void loadModel(java.lang.String fileName)
Model argument may contain multiple filenames separated by ';'. All file names must by given relative to the model codebase.
Method is intended for use from JavaScript. Therefore, the current codebase will be prepended to the given relative filename.
fileName - relative fileName.public java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Containerpublic void paint(java.awt.Graphics g)
paint in class java.awt.Containerpublic void addPickListener(PvPickListenerIf listener)
PvPickEvent to the default display.listener - will receive pick events of this applet.removePickListener(PvPickListenerIf)public boolean removePickListener(PvPickListenerIf listener)
listener - previously registered listener.false if listener does not exists.addPickListener(PvPickListenerIf)public void destroy()
destroy in class java.applet.Appletpublic void stop()
stop in class java.applet.Appletpublic void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void startFromThread()
"