Class TMenuBar
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JMenuBar
org.opensourcephysics.cabrillo.tracker.TMenuBar
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,PropertyChangeListener
,Serializable
,EventListener
,Accessible
,MenuListener
,MenuElement
,OSPRuntime.Disposable
public class TMenuBar
extends JMenuBar
implements OSPRuntime.Disposable, PropertyChangeListener, MenuListener
This is the main menu for Tracker.
- Author:
- Douglas Brown
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JMenuBar
JMenuBar.AccessibleJMenuBar
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
FieldsModifier and TypeFieldDescriptionprotected int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected JCheckBoxMenuItem
protected JCheckBoxMenuItem
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.opensourcephysics.display.OSPRuntime.Disposable
allocated
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkAddMenuSep
(JMenu menu) Add a separator if the menu has items and last item is not already a separator.void
protected void
Creates the menu bar.protected JMenu
createTrackMenu
(TTrack track) Gets the menu for the specified track.void
dispose()
Cleans up this menubarvoid
dispose
(TrackerPanel trackerPanel) void
finalize()
protected TreeMap<Integer,
TableTrackView> protected static JMenu
getTrackerHelpMenu
(TrackerPanel trackerPanel, JMenu hMenu) Gets the help menu and attaches it to the given JMenu or just returns itprotected void
loadVideoMenu
(JMenu vidMenu) void
void
void
MenuListener for all menus.void
Responds to property change events.protected void
rebuildEditCopyMenu
(String type) protected void
protected void
protected void
Refreshes the menubar.protected void
refreshAll
(String whereFrom) protected void
refreshCoordsMenu
(boolean opening) protected void
refreshEditMenu
(boolean opening) protected void
refreshFileMenu
(boolean opening) protected void
refreshHelpMenu
(boolean opening) static void
refreshMeasuringToolsMenu
(TrackerPanel panel, JMenu menu) protected void
static void
refreshPopup
(TrackerPanel panel, String item, JPopupMenu menu) protected JPopupMenu
Refreshes and returns the TrackControl New button popup menu.protected void
refreshTrackMenu
(boolean opening, JPopupMenu target) protected void
refreshTracks
(int menu) protected JPopupMenu
refreshTracksPopup
(JPopupMenu newPopup) Refreshes and returns the toolbar Create button popup menu.protected void
refreshVideoMenu
(boolean opening) void
refreshViewMenu
(boolean opening) Refreshes the Window menu for a TrackerPanel.void
setAllowRefresh
(boolean b) true when refreshing menus or redoing filter deletevoid
setEnabled
(boolean b) static void
setLangMenu
(JMenu menu, TFrame frame) protected void
setMenuTainted
(int id, boolean taint) protected void
protected void
toString()
Methods inherited from class javax.swing.JMenuBar
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
MENU_FILE
protected static final int MENU_FILE- See Also:
-
MENU_EDIT
protected static final int MENU_EDIT- See Also:
-
MENU_VIDEO
protected static final int MENU_VIDEO- See Also:
-
MENU_COORDS
protected static final int MENU_COORDS- See Also:
-
MENU_TRACK
protected static final int MENU_TRACK- See Also:
-
MENU_VIEW
protected static final int MENU_VIEW- See Also:
-
MENU_HELP
protected static final int MENU_HELP- See Also:
-
MENU_ALL
protected static final int MENU_ALL- See Also:
-
view_rightPaneItem
-
view_bottomPaneItem
-
enabledNewTrackCount
protected int enabledNewTrackCount
-
-
Method Details
-
setMenuTainted
protected void setMenuTainted(int id, boolean taint) -
setAllowRefresh
public void setAllowRefresh(boolean b) true when refreshing menus or redoing filter delete -
loadVideoMenu
-
refresh
Refreshes the menubar.- Parameters:
whereFrom
-
-
refreshAll
-
createGUI
protected void createGUI()Creates the menu bar. -
setupVideoMenu
protected void setupVideoMenu() -
setupEditMenu
protected void setupEditMenu() -
createTrackMenu
Gets the menu for the specified track.- Parameters:
track
- the track- Returns:
- the track's menu
-
refreshFileMenu
protected void refreshFileMenu(boolean opening) -
rebuildEditFontSizeMenu
protected void rebuildEditFontSizeMenu() -
rebuildEditMatSizeMenu
protected void rebuildEditMatSizeMenu() -
rebuildEditCopyMenu
-
refreshEditMenu
protected void refreshEditMenu(boolean opening) -
refreshCoordsMenu
protected void refreshCoordsMenu(boolean opening) -
refreshVideoMenu
protected void refreshVideoMenu(boolean opening) -
refreshPasteItem
protected void refreshPasteItem() -
refreshTracks
protected void refreshTracks(int menu) -
refreshTrackMenu
-
refreshViewMenu
public void refreshViewMenu(boolean opening) Refreshes the Window menu for a TrackerPanel.- Parameters:
opening
- TODO
-
refreshHelpMenu
protected void refreshHelpMenu(boolean opening) -
getTrackerHelpMenu
Gets the help menu and attaches it to the given JMenu or just returns it- Returns:
- the help menu
-
dispose
public void dispose()Cleans up this menubar- Specified by:
dispose
in interfaceOSPRuntime.Disposable
-
propertyChange
Responds to property change events.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Parameters:
e
- the property change event
-
getDataViews
-
refreshPopup
-
refreshMeasuringToolsMenu
-
refreshTrackControlPopup
Refreshes and returns the TrackControl New button popup menu.- Returns:
- the popup
-
refreshTracksPopup
Refreshes and returns the toolbar Create button popup menu.- Returns:
- the popup
-
checkMatSize
public void checkMatSize() -
setLangMenu
-
checkAddMenuSep
Add a separator if the menu has items and last item is not already a separator.- Parameters:
menu
-
-
dispose
-
finalize
public void finalize() -
toString
-
setEnabled
public void setEnabled(boolean b) - Overrides:
setEnabled
in classJComponent
-