Package org.xj3d.ui.awt.browser.ogl
Class VRMLBrowserAWTPanel
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
org.xj3d.ui.awt.browser.ogl.VRMLBrowserAWTPanel
- All Implemented Interfaces:
ComponentListener
,WindowListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,BrowserComponent
,VrmlComponent
public class VRMLBrowserAWTPanel
extends Panel
implements VrmlComponent, BrowserComponent, ComponentListener, WindowListener
A browser that uses the AWT panel and labels to draw render the
UI with.
VRMLBrowserAWTPanel is the AWT based alternative to BrowserJPanel. At the moment, it offers minimal functionality. The "dashboard" is a text label, there aren't any navigation functions. That, and urlReadOnly, urlTop, and dashTop are ignored.
- Version:
- $Revision: 1.9 $
- Author:
- Brad Vender, Justin Couch
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class java.awt.Component
accessibleContext, 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
ConstructorsConstructorDescriptionVRMLBrowserAWTPanel
(BrowserConfig parameters) Create a VrmlComponent that belongs to an AWT panel. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Override addNotify so we know we have peer before calling setEnabled for Aviatrix3D.void
void
void
void
void
destroy()
Called to instruct the component instance to destroy itself and any used resources.Get a browser reference from this component that represents the internals of this browser.Get the core browser implementation.Get the UI toolkit specific component holding this browser.org.j3d.util.ErrorReporter
Fetch the error handler so that application code can post messages too.Get a reference to the component implementation.int
Get the renderer type.getScene()
Get the scene object being rendered by this panel.Get the universe underlying this panel.void
Change the panels content to the provided URL.void
setMinimumFrameInterval
(int millis, boolean userSet) Set the minimum frame interval time to limit the CPU resources taken up by the 3D renderer.void
shutdown()
Shutdown the component because it will no longer be needed.void
start()
Called to instruct the component instance to start rendering now.void
stop()
Called to instruct the component instance to stop and suspend its state.int
Get the spec version that is supported.void
void
windowClosed
(WindowEvent evt) void
windowClosing
(WindowEvent evt) void
void
void
void
windowOpened
(WindowEvent evt) Methods inherited from class java.awt.Panel
getAccessibleContext
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, 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, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, processComponentEvent, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
VRMLBrowserAWTPanel
Create a VrmlComponent that belongs to an AWT panel. and in that process construct the corresponding Browser, and the infrastructure required.- Parameters:
parameters
- The object containing the browser's configuration parameters
-
-
Method Details
-
getBrowser
Description copied from interface:VrmlComponent
Get a browser reference from this component that represents the internals of this browser.- Specified by:
getBrowser
in interfaceVrmlComponent
- Returns:
- A reference to the browser object represented by this component.
-
getImplementation
Description copied from interface:VrmlComponent
Get a reference to the component implementation. For example, if this is an AWT component, it would return an instance ofComponent
.- Specified by:
getImplementation
in interfaceVrmlComponent
- Returns:
- a reference to the component implementation
-
shutdown
public void shutdown()Description copied from interface:VrmlComponent
Shutdown the component because it will no longer be needed. If the component has already had this method called, it will silently ignore any further requests.- Specified by:
shutdown
in interfaceVrmlComponent
-
supportedSpecificationVersion
public int supportedSpecificationVersion()Description copied from interface:BrowserComponent
Get the spec version that is supported.- Specified by:
supportedSpecificationVersion
in interfaceBrowserComponent
- Returns:
- a number representing the spec major version
-
getCanvas
Description copied from interface:BrowserComponent
Get the UI toolkit specific component holding this browser.- Specified by:
getCanvas
in interfaceBrowserComponent
- Returns:
- The component
-
getRendererType
public int getRendererType()Description copied from interface:BrowserComponent
Get the renderer type.- Specified by:
getRendererType
in interfaceBrowserComponent
- Returns:
- The BrowserCore type
-
getBrowserCore
Description copied from interface:BrowserComponent
Get the core browser implementation.- Specified by:
getBrowserCore
in interfaceBrowserComponent
- Returns:
- the BrowserCore
-
getErrorReporter
public org.j3d.util.ErrorReporter getErrorReporter()Description copied from interface:BrowserComponent
Fetch the error handler so that application code can post messages too.- Specified by:
getErrorReporter
in interfaceBrowserComponent
- Returns:
- The current error handler instance
-
setMinimumFrameInterval
public void setMinimumFrameInterval(int millis, boolean userSet) Description copied from interface:BrowserComponent
Set the minimum frame interval time to limit the CPU resources taken up by the 3D renderer. By default it will use all of them. The second parameter is used to control whether this is a user-set hard minimum or something set by the browser internals. User set values are always treated as the minimum unless the browser internals set a value that is a slower framerate than the user set. If the browser then sets a faster framerate than the user set value, the user value is used instead.- Specified by:
setMinimumFrameInterval
in interfaceBrowserComponent
- Parameters:
millis
- The minimum time in milliseconds.userSet
- true if this is an end-user set minimum
-
start
public void start()Description copied from interface:BrowserComponent
Called to instruct the component instance to start rendering now.- Specified by:
start
in interfaceBrowserComponent
-
stop
public void stop()Description copied from interface:BrowserComponent
Called to instruct the component instance to stop and suspend its state. The renderer should stop at this point.- Specified by:
stop
in interfaceBrowserComponent
-
destroy
public void destroy()Description copied from interface:BrowserComponent
Called to instruct the component instance to destroy itself and any used resources. It will not be used again.- Specified by:
destroy
in interfaceBrowserComponent
-
componentHidden
- Specified by:
componentHidden
in interfaceComponentListener
-
componentMoved
- Specified by:
componentMoved
in interfaceComponentListener
-
componentResized
- Specified by:
componentResized
in interfaceComponentListener
-
componentShown
- Specified by:
componentShown
in interfaceComponentListener
-
windowActivated
- Specified by:
windowActivated
in interfaceWindowListener
-
windowClosed
- Specified by:
windowClosed
in interfaceWindowListener
-
windowClosing
- Specified by:
windowClosing
in interfaceWindowListener
-
windowDeactivated
- Specified by:
windowDeactivated
in interfaceWindowListener
-
windowDeiconified
- Specified by:
windowDeiconified
in interfaceWindowListener
-
windowIconified
- Specified by:
windowIconified
in interfaceWindowListener
-
windowOpened
- Specified by:
windowOpened
in interfaceWindowListener
-
getScene
Get the scene object being rendered by this panel.- Returns:
- The current scene.
-
getUniverse
Get the universe underlying this panel.- Returns:
- The universe.
-
loadURL
Change the panels content to the provided URL.- Parameters:
url
- The URL to load.- Throws:
IOException
- On a failed load
-
addNotify
-