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.AccessibleJMenuBarNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested 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
FieldsModifier and TypeFieldDescriptionprotected intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected JCheckBoxMenuItemprotected JCheckBoxMenuItemFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields 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, WIDTHFields inherited from interface org.opensourcephysics.display.OSPRuntime.Disposable
allocated -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckAddMenuSep(JMenu menu) Add a separator if the menu has items and last item is not already a separator.voidprotected voidCreates the menu bar.protected JMenucreateTrackMenu(TTrack track) Gets the menu for the specified track.voiddispose()Cleans up this menubarvoiddispose(TrackerPanel trackerPanel) voidfinalize()protected TreeMap<Integer,TableTrackView> protected static JMenugetTrackerHelpMenu(TrackerPanel trackerPanel, JMenu hMenu) Gets the help menu and attaches it to the given JMenu or just returns itprotected voidloadVideoMenu(JMenu vidMenu) voidvoidvoidMenuListener for all menus.voidResponds to property change events.protected voidrebuildEditCopyMenu(String type) protected voidprotected voidprotected voidRefreshes the menubar.protected voidrefreshAll(String whereFrom) protected voidrefreshCoordsMenu(boolean opening) protected voidrefreshEditMenu(boolean opening) protected voidrefreshFileMenu(boolean opening) protected voidrefreshHelpMenu(boolean opening) static voidrefreshMeasuringToolsMenu(TrackerPanel panel, JMenu menu) protected voidstatic voidrefreshPopup(TrackerPanel panel, String item, JPopupMenu menu) protected JPopupMenuRefreshes and returns the TrackControl New button popup menu.protected voidrefreshTrackMenu(boolean opening, JPopupMenu target) protected voidrefreshTracks(int menu) protected JPopupMenurefreshTracksPopup(JPopupMenu newPopup) Refreshes and returns the toolbar Create button popup menu.protected voidrefreshVideoMenu(boolean opening) voidrefreshViewMenu(boolean opening) Refreshes the Window menu for a TrackerPanel.voidsetAllowRefresh(boolean b) true when refreshing menus or redoing filter deletevoidsetEnabled(boolean b) static voidsetLangMenu(JMenu menu, TFrame frame) protected voidsetMenuTainted(int id, boolean taint) protected voidprotected voidtoString()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, updateUIMethods 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, updateMethods 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, validateTreeMethods 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:
disposein interfaceOSPRuntime.Disposable
-
propertyChange
Responds to property change events.- Specified by:
propertyChangein 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:
setEnabledin classJComponent
-