Package xj3d.browser
Class CaptureViewpointsAction
java.lang.Object
javax.swing.AbstractAction
xj3d.browser.CaptureViewpointsAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,ScreenCaptureListener
An action that takes a screen shot of all the top-level viewpoints
- Version:
- $Revision: 1.6 $
- Author:
- Alan Hudson
- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
ConstructorsConstructorDescriptionCaptureViewpointsAction(org.j3d.util.ErrorReporter console, OGLStandardBrowserCore core, ViewpointManager vpMgr) Create an instance of the action class. -
Method Summary
Modifier and TypeMethodDescriptionvoidAn action has been performed.voidscreenCaptured(Buffer buffer, int width, int height) Notification of a new screen capture.voidsetBasename(String basename) Set the basename to use on file outputvoidsetSurface(org.j3d.aviatrix3d.pipeline.graphics.GraphicsOutputDevice surface) Set the surface we are rendering on.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
CaptureViewpointsAction
public CaptureViewpointsAction(org.j3d.util.ErrorReporter console, OGLStandardBrowserCore core, ViewpointManager vpMgr) Create an instance of the action class.- Parameters:
console- our ErrorReportercore- the BrowserCore instancevpMgr- our ViewPointManager
-
-
Method Details
-
setBasename
Set the basename to use on file output- Parameters:
basename- The basename
-
screenCaptured
Notification of a new screen capture. This will be in openGL pixel order.- Specified by:
screenCapturedin interfaceScreenCaptureListener- Parameters:
buffer- The screen capturewidth- The width of the captured image in pixelsheight- The height of the captured image in pixels
-
actionPerformed
An action has been performed. This is the Go button being pressed. Grab the URL and check with the file to see if it exists first as a local file, and then try to make a URL of it. Finally, if this all works, call the abstract gotoLocation method.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
evt- The event that caused this method to be called.
-
setSurface
public void setSurface(org.j3d.aviatrix3d.pipeline.graphics.GraphicsOutputDevice surface) Set the surface we are rendering on.- Parameters:
surface-
-