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.AccessibleAWTPanelNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested 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_ALIGNMENTFields 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 TypeMethodDescriptionvoidOverride addNotify so we know we have peer before calling setEnabled for Aviatrix3D.voidvoidvoidvoidvoiddestroy()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.ErrorReporterFetch the error handler so that application code can post messages too.Get a reference to the component implementation.intGet the renderer type.getScene()Get the scene object being rendered by this panel.Get the universe underlying this panel.voidChange the panels content to the provided URL.voidsetMinimumFrameInterval(int millis, boolean userSet) Set the minimum frame interval time to limit the CPU resources taken up by the 3D renderer.voidshutdown()Shutdown the component because it will no longer be needed.voidstart()Called to instruct the component instance to start rendering now.voidstop()Called to instruct the component instance to stop and suspend its state.intGet the spec version that is supported.voidvoidwindowClosed(WindowEvent evt) voidwindowClosing(WindowEvent evt) voidvoidvoidvoidwindowOpened(WindowEvent evt) Methods inherited from class java.awt.Panel
getAccessibleContextMethods 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, validateTreeMethods 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:VrmlComponentGet a browser reference from this component that represents the internals of this browser.- Specified by:
getBrowserin interfaceVrmlComponent- Returns:
- A reference to the browser object represented by this component.
-
getImplementation
Description copied from interface:VrmlComponentGet a reference to the component implementation. For example, if this is an AWT component, it would return an instance ofComponent.- Specified by:
getImplementationin interfaceVrmlComponent- Returns:
- a reference to the component implementation
-
shutdown
public void shutdown()Description copied from interface:VrmlComponentShutdown 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:
shutdownin interfaceVrmlComponent
-
supportedSpecificationVersion
public int supportedSpecificationVersion()Description copied from interface:BrowserComponentGet the spec version that is supported.- Specified by:
supportedSpecificationVersionin interfaceBrowserComponent- Returns:
- a number representing the spec major version
-
getCanvas
Description copied from interface:BrowserComponentGet the UI toolkit specific component holding this browser.- Specified by:
getCanvasin interfaceBrowserComponent- Returns:
- The component
-
getRendererType
public int getRendererType()Description copied from interface:BrowserComponentGet the renderer type.- Specified by:
getRendererTypein interfaceBrowserComponent- Returns:
- The BrowserCore type
-
getBrowserCore
Description copied from interface:BrowserComponentGet the core browser implementation.- Specified by:
getBrowserCorein interfaceBrowserComponent- Returns:
- the BrowserCore
-
getErrorReporter
public org.j3d.util.ErrorReporter getErrorReporter()Description copied from interface:BrowserComponentFetch the error handler so that application code can post messages too.- Specified by:
getErrorReporterin interfaceBrowserComponent- Returns:
- The current error handler instance
-
setMinimumFrameInterval
public void setMinimumFrameInterval(int millis, boolean userSet) Description copied from interface:BrowserComponentSet 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:
setMinimumFrameIntervalin 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:BrowserComponentCalled to instruct the component instance to start rendering now.- Specified by:
startin interfaceBrowserComponent
-
stop
public void stop()Description copied from interface:BrowserComponentCalled to instruct the component instance to stop and suspend its state. The renderer should stop at this point.- Specified by:
stopin interfaceBrowserComponent
-
destroy
public void destroy()Description copied from interface:BrowserComponentCalled to instruct the component instance to destroy itself and any used resources. It will not be used again.- Specified by:
destroyin interfaceBrowserComponent
-
componentHidden
- Specified by:
componentHiddenin interfaceComponentListener
-
componentMoved
- Specified by:
componentMovedin interfaceComponentListener
-
componentResized
- Specified by:
componentResizedin interfaceComponentListener
-
componentShown
- Specified by:
componentShownin interfaceComponentListener
-
windowActivated
- Specified by:
windowActivatedin interfaceWindowListener
-
windowClosed
- Specified by:
windowClosedin interfaceWindowListener
-
windowClosing
- Specified by:
windowClosingin interfaceWindowListener
-
windowDeactivated
- Specified by:
windowDeactivatedin interfaceWindowListener
-
windowDeiconified
- Specified by:
windowDeiconifiedin interfaceWindowListener
-
windowIconified
- Specified by:
windowIconifiedin interfaceWindowListener
-
windowOpened
- Specified by:
windowOpenedin 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
-