Package org.xj3d.ui.awt.widgets
Class SwingNavigationToolbar
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.xj3d.ui.awt.widgets.SwingNavigationToolbar
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,NavigationStateListener
A toolbar for all navigation commands that is usable across any UI that
uses Swing.
Creating an instance of this class will automatically register it as a navigation state listener with the browser core. The end user is not required to do this.
External Resources
This toolbar uses images for the button icons rather than text. These are the images used. The path is found relative to the classpath.
- Track: images/navigation/ButtonTExamine.gif
- Examine: images/navigation/ButtonExamine.gif
- Fly: images/navigation/ButtonFly.gif
- Pan: images/navigation/ButtonPan.gif
- Tilt: images/navigation/ButtonTilt.gif
- Walk: images/navigation/ButtonWalk.gif
- Version:
- $Revision: 1.6 $
- Author:
- Justin Couch
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
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 javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
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
Fields inherited from interface org.web3d.browser.NavigationStateListener
EXAMINE_STATE, FLY_STATE, NO_STATE, PAN_STATE, TILT_STATE, WALK_STATE
-
Constructor Summary
ConstructorsConstructorDescriptionSwingNavigationToolbar
(BrowserCore core, boolean horizontal, Properties skinProperties, org.j3d.util.ErrorReporter reporter) Create a new navigation toolbar with an empty list of viewpoints but controllable direction for the buttons.SwingNavigationToolbar
(BrowserCore core, boolean horizontal, org.j3d.util.ErrorReporter reporter) Create a new navigation toolbar with an empty list of viewpoints but controllable direction for the buttons.SwingNavigationToolbar
(BrowserCore core, Properties skinProperties, org.j3d.util.ErrorReporter reporter) Create a new navigation toolbar with an empty list of viewpoints but controllable direction for the buttons.SwingNavigationToolbar
(BrowserCore core, org.j3d.util.ErrorReporter reporter) Create a new horizontal navigation toolbar with an empty list of viewpoints and disabled user selection of state. -
Method Summary
Modifier and TypeMethodDescriptionGet the Examine Action.Get the Fly Action.Get the Pan Action.Get the Tilt Action.Get the Track Action.Get the Walk Action.void
navigationListChanged
(String[] modes, int numModes) Notification that the list of valid navigation modes has changed.void
navigationStateChanged
(int idx) Notification that the navigation state has changed to the new state.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
SwingNavigationToolbar
Create a new horizontal navigation toolbar with an empty list of viewpoints and disabled user selection of state.- Parameters:
core
- The browser core implementation to send nav changes toreporter
- The reporter instance to use or null
-
SwingNavigationToolbar
public SwingNavigationToolbar(BrowserCore core, boolean horizontal, org.j3d.util.ErrorReporter reporter) Create a new navigation toolbar with an empty list of viewpoints but controllable direction for the buttons. The user selection is disabled.- Parameters:
core
- The browser core implementation to send nav changes tohorizontal
- True to lay out the buttons horizontallyreporter
- The reporter instance to use or null
-
SwingNavigationToolbar
public SwingNavigationToolbar(BrowserCore core, Properties skinProperties, org.j3d.util.ErrorReporter reporter) Create a new navigation toolbar with an empty list of viewpoints but controllable direction for the buttons. The user selection is disabled.- Parameters:
core
- The browser core implementation to send nav changes toskinProperties
- Properties object specifying image namesreporter
- The reporter instance to use or null
-
SwingNavigationToolbar
public SwingNavigationToolbar(BrowserCore core, boolean horizontal, Properties skinProperties, org.j3d.util.ErrorReporter reporter) Create a new navigation toolbar with an empty list of viewpoints but controllable direction for the buttons. The user selection is disabled.- Parameters:
core
- The browser core implementation to send nav changes tohorizontal
- True to lay out the buttons horizontallyskinProperties
- Properties object specifying image namesreporter
- The reporter instance to use or null
-
-
Method Details
-
getFlyAction
Get the Fly Action. Suitable for use in a menu.- Returns:
- Returns the action
-
getWalkAction
Get the Walk Action. Suitable for use in a menu.- Returns:
- Returns the action
-
getExamineAction
Get the Examine Action. Suitable for use in a menu.- Returns:
- Returns the action
-
getPanAction
Get the Pan Action. Suitable for use in a menu.- Returns:
- Returns the action
-
getTiltAction
Get the Tilt Action. Suitable for use in a menu.- Returns:
- Returns the action
-
getTrackAction
Get the Track Action. Suitable for use in a menu.- Returns:
- Returns the action