Class TFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.opensourcephysics.display.OSPFrame
org.opensourcephysics.cabrillo.tracker.TFrame
- All Implemented Interfaces:
ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants,AppFrame,Hidable,FileDropHandler.FileImporter
public class TFrame
extends OSPFrame
implements PropertyChangeListener, FileDropHandler.FileImporter
This is the main frame for Tracker.
- Author:
- Douglas Brown
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested 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 TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intprotected org.opensourcephysics.cabrillo.tracker.ClipboardListenerprotected Stringprotected JDialogprotected static final doubleprotected static final intprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final int[]protected static final doubleprotected static final intprotected FileDropHandlerprotected intstatic booleanstatic booleanprotected static final Stringprotected JDialogprotected Launcherprotected static booleanprotected static booleanprotected LibraryBrowserstatic booleanprotected static final intprotected static final doubleprotected static final doubleprotected intprotected Actionprotected static final intprotected static final int[]protected static final int[]protected PrefsDialogprotected intprotected Integerstatic final Stringstatic final Stringstatic final Stringprotected Actionprotected static final intprotected static final intprotected static final intprotected static final intprotected booleanprotected static final intprotected static final intprotected static final intprotected static final intstatic final intstatic final intstatic final intprotected JTabbedPaneprotected Filestatic Fontprotected static final Stringrunnable for when loadObject is complete, from TrackerIOprotected static final ColorFields inherited from class org.opensourcephysics.display.OSPFrame
action, animated, autoclear, buttonPanel, childFrames, constructorThreadGroup, customButtons, keepHidden, myFontLevel, strategyFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORFields inherited from class java.awt.Component
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 javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFollower(Component c, Point ignored) Adds a component to those following this frame.static voidaddMenuListener(JMenu m, Runnable r) voidaddTab(TrackerPanel trackerPanel, int addMode, Runnable whenDone) Adds a tab that displays the specified tracker panel.voidaddTabFromLoader(TrackerPanel trackerPanel) voidaddTrackerPanel(boolean changedState, Runnable whenDone) allocatePanel(TrackerPanel trackerPanel) booleanareViewsVisible(int whichViews, TrackerPanel trackerPanel) Determines whether the specified views are visible in a trackerPanel tab.voidarrangeViews(TrackerPanel trackerPanel, boolean showDefaultViews, boolean showOtherViews) Arranges the views for a tracker panel, showing default views under or beside the video and the opposite for non-default views.protected voidStarts or ends the clipboard listener as needed.protected voidvoidFor emergency use only!voidvoiddeallocatePanelID(Integer panelID) voiddisposeOf(TrackerPanel trackerPanel) booleandoCloseAction(TrackerPanel trackerPanel) Removes a tracker panel tab.voidJava only; from ExportVideoDialogvoidvoidprotected voiddoRecentFiles(String path) protected voidprotected voidprotected RectanglegetAdaptiveBounds(boolean isInit) booleanprotected org.opensourcephysics.cabrillo.tracker.ClipboardListenerGets the (singleton) clipboard listener.protected doublegetConvertedDividerLoc(int splitPaneIndex, double loc) Converts and returns converted divider location (0.0 <= loc <= 1.0).protected ComponentGets the help dialog.protected LibraryBrowserGets the library browser.static XML.ObjectLoaderReturns an ObjectLoader to save and load data for this class.getMainView(TrackerPanel trackerPanel) Gets the main view for the specified tracker panel.intgetMenuBar(Integer panelID, boolean forceNew) Gets the menubar for the specified tracker panel.protected org.opensourcephysics.cabrillo.tracker.TFrame.NotesgetNotes()Object[]getObjects(int tab) Gets the preferences dialog.protected PropertiesDialoggetPropertiesDialog(TrackerPanel trackerPanel) Gets the properties dialog for a specified TrackerPanel.Gets the panel of the selected tab, if a tab is selected.intGets the selected tab index.getSelectedTrackViews(TrackerPanel trackerPanel) Gets the selected TrackView names for the specified tracker panel.int[]getSelectedViewTypes(TrackerPanel trackerPanel) Gets the selected TViewTypes for the specified tracker panel.intgetState()intReturns the tab index for the specified data file, or -1 if no tab is found.intReturns the tab index for the specified tracker panel, or -1 if no tab is found.intGets the tab count.intgetTabForID(Integer panelID) Returns the tab index for the specified tracker panel based on panelID, or -1 if no tab is found.org.opensourcephysics.cabrillo.tracker.TFrame.TTabPanelgetTabPanel(TrackerPanel trackerPanel) getTabTitle(int tab) Gets the title of the specified tab.getToolBar(Integer panelID, boolean forceNew) Gets the toolbar for the specified tracker panel.getTrackBar(Integer panelID, boolean forceNew) Gets the trackbar for the specified tracker panel.getTrackerPanelForID(Integer panelID) getTrackerPanelForTab(int tab) Gets the tracker panel at the specified tab index.Find all selected panels of the given type and add them to the list.TView[][]getTViews(TrackerPanel trackerPanel, boolean customOnly) Gets the TViews for the specified tracker panel.getViewChoosers(Integer panelID) getViewChoosers(TrackerPanel trackerPanel) Gets the TViewChoosers for the specified tracker panel.getVisibleChoosers(Integer panelID) booleanvoidholdPainting(boolean b) Increment/decrement the paintHold counter.booleanimportData(Object data, Component component) booleanbooleancheck the paintHold counterprotected static booleanbooleanbooleanisViewPaneVisible(int position, Integer panelID) Determines whether a view pane is visible for the specified trackerPanel tab.voidloadExperimentURL(String path) Replace any open tabs with a single tab loaded with the given path.protected voidloadLibraryRecord(LibraryResource record) static voidvoidopenLibraryResource(LibraryResource record, Runnable whenDone) voidvoidplaceViews(org.opensourcephysics.cabrillo.tracker.TFrame.TTabPanel tabPanel, TrackerPanel trackerPanel, TViewChooser[] viewChoosers) Places the views in an appropriate order for the specified trackerPanel.voidResponds to property change events.voidrefresh()Refreshes the GUI.voidrefreshMenus(TrackerPanel trackerPanel, String whereFrom) voidrefreshOpenRecentMenu(JMenu menu) Refreshes the open recent files menu.voidrefreshTab(TrackerPanel panel) Refreshes the tab for the specified tracker panel.protected voidvoidremoveAllTabs(boolean isExit) Removes all tabs.voidRemove the first tab if it is empty and there are at least n tabs (1 or 2)voidremoveTabNow(int i) voidremoveTabSynchronously(Integer panelID) voidremoveTabSynchronously(TrackerPanel trackerPanel) voidrepaint(long time, int x, int y, int w, int h) All repaints funnel through this methodstatic voidFor optimization, finding out exactly who is repainting.voidsaveAllTabs(boolean isExit, Function<Integer, Void> whenEachApproved, Runnable whenAllApproved, Runnable whenCanceled) Saves all tabs if user approved.voidsayFileNotFound(String path) voidsetAlwaysListenToClipboard(boolean b) voidsetAnglesInRadians(boolean inRadians) Sets the display units for angles.voidvoidsetDividerLocation(TrackerPanel trackerPanel, int paneIndex, double loc) Sets the location of a splitpane divider for a tracker panelvoidsetDividerLocation(TrackerPanel trackerPanel, int paneIndex, int loc) Sets the location of a splitpane divider for a tracker panelvoidsetFontLevel(int level) Sets the font level.voidsetFrameBlocker(boolean blocking, TrackerPanel panel) voidsetJMenuBar(JMenuBar bar) protected voidsetLanguage(String language) voidsetNotesVisible(boolean b) voidsetSelectedTab(int tab) Sets the selected tab index.voidsetSelectedTab(File dataFile) voidsetSelectedTab(TrackerPanel trackerPanel) Sets the selected tab specified by tracker panel.voidsetTabTitle(int tab, String title) Sets the title of the specified tab.voidsetToolBar(TrackerPanel trackerPanel, TToolBar toolbar) From TrackPanel.Loader.voidsetVisible(boolean visible) Shows or hides this component depending on the value of parameterband thekeepHiddenflag.protected voidShows a specified help topic.protected voidShows a specified help topic by keyword: gettingstarted, install, linux, GUI, video, filters, tracks, coords, axes, tape, offset, calibration, pointmass, cm, vector, vectorsum, profile, rgbregion, particle, plot, datatable, xml, etc.voidShows the preferences dialog.voidshowPrefsDialog(String tabName) Shows the preferences dialog set to a specified tab.voidvoidSwing does not use this method.Methods inherited from class org.opensourcephysics.display.OSPFrame
addButton, addChildFrame, bufferStrategyShow, clearChildFrames, clearData, clearDataAndRepaint, createBufferStrategy, dispose, getChildFrames, getChooser, getConstructorThreadGroup, getMenu, invalidateImage, isAnimated, isAutoclear, isIconified, isKeepHidden, loadDisplayMenu, loadToolsMenu, parseXMLMenu, parseXMLMenu, refreshGUI, removeMenu, removeMenuItem, render, setAnimated, setAutoclear, setDefaultCloseOperation, setKeepHidden, setResizeAction, setSize, setTitle, show, wishesToExitMethods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandlerMethods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setUndecoratedMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setType, toBack, toFrontMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.AppFrame
getDefaultCloseOperationMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
textLayoutFont
-
PROPERTY_TFRAME_TAB
- See Also:
-
PROPERTY_TFRAME_RADIANANGLES
- See Also:
-
PROPERTY_TFRAME_WINDOWFOCUS
- See Also:
-
HELP_PATH
- See Also:
-
WEB_HELP_PATH
- See Also:
-
YELLOW
-
DEFAULT_VIEWS
protected static final int DEFAULT_VIEWS- See Also:
-
OTHER_VIEWS
protected static final int OTHER_VIEWS- See Also:
-
DEFAULT_MAIN_DIVIDER
protected static final double DEFAULT_MAIN_DIVIDER- See Also:
-
DEFAULT_RIGHT_DIVIDER
protected static final double DEFAULT_RIGHT_DIVIDER- See Also:
-
DEFAULT_LEFT_DIVIDER
protected static final double DEFAULT_LEFT_DIVIDER- See Also:
-
DEFAULT_BOTTOM_DIVIDER
protected static final double DEFAULT_BOTTOM_DIVIDER- See Also:
-
DEFAULT_FRAME_WIDTH
protected static final double DEFAULT_FRAME_WIDTH- See Also:
-
MAXIMIZED_FRAME_WIDTH
protected static final double MAXIMIZED_FRAME_WIDTH- See Also:
-
DEFAULT_FRAME_HEIGHT
protected static final double DEFAULT_FRAME_HEIGHT- See Also:
-
MAXIMIZED_FRAME_HEIGHT
protected static final double MAXIMIZED_FRAME_HEIGHT- See Also:
-
DEFAULT_FRAME_CEILING
protected static final int DEFAULT_FRAME_CEILING- See Also:
-
MAXIMIZED_FRAME_CEILING
protected static final int MAXIMIZED_FRAME_CEILING- See Also:
-
isPortraitOrientation
protected static boolean isPortraitOrientation -
isLayoutAdaptive
protected static boolean isLayoutAdaptive -
haveExportDialog
public static boolean haveExportDialog -
haveThumbnailDialog
public static boolean haveThumbnailDialog -
maximize
public static boolean maximize -
clipboardListener
protected org.opensourcephysics.cabrillo.tracker.ClipboardListener clipboardListener -
libraryBrowser
-
helpLauncher
-
helpDialog
-
dataToolDialog
-
prefsDialog
-
fileDropHandler
-
tabbedPane
-
saveNotesAction
-
openRecentAction
-
loadedFiles
-
tabsetFile
-
currentLangugae
-
prevPanelID
-
maximizedView
protected int maximizedView -
framesLoaded
protected int framesLoaded -
prevFramesLoaded
protected int prevFramesLoaded -
splashing
protected boolean splashing -
STATE_ACTIVE
public static final int STATE_ACTIVE- See Also:
-
STATE_BLOCKED
public static final int STATE_BLOCKED- See Also:
-
STATE_REMOVING
public static final int STATE_REMOVING- See Also:
-
SPLIT_MAIN_RIGHT
protected static final int SPLIT_MAIN_RIGHT- See Also:
-
SPLIT_PLOT_TABLE
protected static final int SPLIT_PLOT_TABLE- See Also:
-
SPLIT_MAIN_BOTTOM
protected static final int SPLIT_MAIN_BOTTOM- See Also:
-
SPLIT_WORLD_PAGE
protected static final int SPLIT_WORLD_PAGE- See Also:
-
SIDEVIEW_RIGHT_TOP
protected static final int SIDEVIEW_RIGHT_TOP- See Also:
-
SIDEVIEW_RIGHT_BOTTOM
protected static final int SIDEVIEW_RIGHT_BOTTOM- See Also:
-
SIDEVIEW_BOTTOM_LEFT
protected static final int SIDEVIEW_BOTTOM_LEFT- See Also:
-
SIDEVIEW_BOTTOM_RIGHT
protected static final int SIDEVIEW_BOTTOM_RIGHT- See Also:
-
DEFAULT_ORDER
protected static final int[] DEFAULT_ORDER -
PORTRAIT_VIEW_ORDER
protected static final int[] PORTRAIT_VIEW_ORDER -
PORTRAIT_DIVIDER_ORDER
protected static final int[] PORTRAIT_DIVIDER_ORDER -
ADD_NOREFRESH
public static final int ADD_NOREFRESH- See Also:
-
ADD_NOSELECT
public static final int ADD_NOSELECT- See Also:
-
ADD_SELECT
public static final int ADD_SELECT- See Also:
-
ADD_REFRESH
public static final int ADD_REFRESH- See Also:
-
whenObjectLoadingComplete
runnable for when loadObject is complete, from TrackerIO
-
-
Constructor Details
-
TFrame
public TFrame()Constructs an empty TFrame. -
TFrame
Constructs a TFrame with the specified tracker panel.- Parameters:
trackerPanel- the tracker panel
-
TFrame
- Parameters:
options- include optional -dim Dimension [-video Video | -panel TrackerPanel]
-
-
Method Details
-
getAdaptiveBounds
-
repaint
public void repaint(long time, int x, int y, int w, int h) All repaints funnel through this method -
repaintT
For optimization, finding out exactly who is repainting.- Parameters:
c-
-
update
Swing does not use this method. It's only for AWT. -
paint
-
addTab
Adds a tab that displays the specified tracker panel.- Parameters:
trackerPanel- the tracker paneladdMode- ADD_SELECT | ADD_REFRESHwhenDone-
-
saveAllTabs
public void saveAllTabs(boolean isExit, Function<Integer, Void> whenEachApproved, Runnable whenAllApproved, Runnable whenCanceled) Saves all tabs if user approved. Stops if any is canceled.- Parameters:
isExit- TODOwhenEachApproved- Function to apply to each TrackerPanel unless canceledwhenAllApproved- Runnable to run after all have run whenEachApprovedwhenCanceled- Runnable to run if canceled
-
relaunchCurrentTabs
protected void relaunchCurrentTabs() -
removeAllTabs
public void removeAllTabs(boolean isExit) Removes all tabs. -
getState
public int getState() -
isRemovingAll
public boolean isRemovingAll() -
doCloseAction
Removes a tracker panel tab. This method is called from Tracker.testFinal as well as action listeners for the tab popup menu and File close menu items.- Parameters:
trackerPanel- the tracker panelf
-
removeTabSynchronously
-
getTab
Returns the tab index for the specified tracker panel, or -1 if no tab is found.- Parameters:
ppanel- the tracker panel- Returns:
- the tab index
-
getTabForID
Returns the tab index for the specified tracker panel based on panelID, or -1 if no tab is found.- Parameters:
tp- the tracker panel- Returns:
- the tab index
-
getTab
Returns the tab index for the specified data file, or -1 if no tab is found.- Parameters:
dataFile- the data file used to load the tab- Returns:
- the tab index
-
getTabCount
public int getTabCount()Gets the tab count.- Returns:
- the tab count
-
getSelectedTab
public int getSelectedTab()Gets the selected tab index.- Returns:
- the tab index
-
setSelectedTab
public void setSelectedTab(int tab) Sets the selected tab index.- Parameters:
tab- the tab index
-
setSelectedTab
-
setSelectedTab
Sets the selected tab specified by tracker panel.- Parameters:
trackerPanel- the tracker panel
-
getTrackerPanelForTab
Gets the tracker panel at the specified tab index.- Parameters:
tab- the tab index- Returns:
- the tracker panel
-
getSelectedPanel
Gets the panel of the selected tab, if a tab is selected.- Returns:
- the selected panel or null if no tab is selected
-
addTrackerPanel
-
getTabTitle
Gets the title of the specified tab.- Parameters:
tab- the tab index- Returns:
- the title
-
refreshTab
Refreshes the tab for the specified tracker panel.- Parameters:
panel- the tracker panel
-
setTabTitle
Sets the title of the specified tab.- Parameters:
tab- the tab indextitle- the title
-
placeViews
public void placeViews(org.opensourcephysics.cabrillo.tracker.TFrame.TTabPanel tabPanel, TrackerPanel trackerPanel, TViewChooser[] viewChoosers) Places the views in an appropriate order for the specified trackerPanel.- Parameters:
trackerPanel- the trackerPanelviewChoosers- an array of up to 4 TViewChoosers
-
getTabPanel
public org.opensourcephysics.cabrillo.tracker.TFrame.TTabPanel getTabPanel(TrackerPanel trackerPanel) -
arrangeViews
public void arrangeViews(TrackerPanel trackerPanel, boolean showDefaultViews, boolean showOtherViews) Arranges the views for a tracker panel, showing default views under or beside the video and the opposite for non-default views.- Parameters:
trackerPanel- the tracker panelshowDefaultViews- true to show default viewsshowOtherViews- true to show non-default views
-
getTViews
Gets the TViews for the specified tracker panel.- Parameters:
trackerPanel- the tracker panelcustomOnly- true to return only customized views- Returns:
- TView[4][4], may be null
-
getTViews
Find all selected panels of the given type and add them to the list. Use VIEW_UNSET to get all views.- Parameters:
panelID-viewType- [ VIEW_PLOT VIEW_TEXT VIEW_WORLD VIEW_PAGE VIEW_UNSET ]list- the return list, or null to start a new list- Returns:
- list
-
getSelectedViewTypes
Gets the selected TViewTypes for the specified tracker panel.- Parameters:
trackerPanel- the tracker panel- Returns:
- int[4] of types selected in the TViewChoosers
-
getSelectedTrackViews
Gets the selected TrackView names for the specified tracker panel.- Parameters:
trackerPanel- the tracker panel- Returns:
- String[4][2] of track names selected in {plot, table}
-
isViewPaneVisible
Determines whether a view pane is visible for the specified trackerPanel tab.- Parameters:
position- the view position index, a number from 0 to 3tp- the trackerPanel- Returns:
- true if it is visible
-
areViewsVisible
Determines whether the specified views are visible in a trackerPanel tab. Views may be DEFAULT_VIEWS (TViewChoosers[0/1]) or OTHER_VIEWS (TViewChoosers[2/3])- Parameters:
whichViews- DEFAULT_VIEWS or OTHER_VIEWStrackerPanel- the trackerPanel- Returns:
- true if views are visible
-
setDividerLocation
Sets the location of a splitpane divider for a tracker panel- Parameters:
trackerPanel- the tracker panelpaneIndex- the index of the split paneloc- the desired fractional divider location
-
setDividerLocation
Sets the location of a splitpane divider for a tracker panel- Parameters:
trackerPanel- the tracker panelpaneIndex- the index of the split paneloc- the desired absolute divider location
-
getMainView
Gets the main view for the specified tracker panel.- Parameters:
trackerPanel- the tracker panel- Returns:
- a MainTView
-
propertyChange
Responds to property change events.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
e- the property change event
-
setVisible
public void setVisible(boolean visible) Description copied from class:OSPFrameShows or hides this component depending on the value of parameterband thekeepHiddenflag. OSP Applets often keep windows hidden.- Overrides:
setVisiblein classOSPFrame
-
isAnglesInRadians
public boolean isAnglesInRadians() -
setAnglesInRadians
public void setAnglesInRadians(boolean inRadians) Sets the display units for angles.- Parameters:
inRadians- true to display radians, false to display degrees
-
getPrefsDialog
Gets the preferences dialog.- Returns:
- the preferences dialog
-
showPrefsDialog
public void showPrefsDialog()Shows the preferences dialog. -
showPrefsDialog
Shows the preferences dialog set to a specified tab.- Parameters:
tabName- the name of the tab: config, runtime, video, general, display
-
getMaximizedView
public int getMaximizedView() -
getTrackBar
Gets the trackbar for the specified tracker panel.- Parameters:
ppanel- the tracker panelforceNew- true to create a new trackbar if null; false to return null- Returns:
- a TTrackBar
-
getToolBar
Gets the toolbar for the specified tracker panel.- Parameters:
ppanel- the tracker panelforceNew- true to create a new toolbar if null; false to return null- Returns:
- a TToolBar
-
setToolBar
From TrackPanel.Loader. This will load into the objects[] array for the tab as soon as it is available.- Parameters:
trackerPanel-toolbar-
-
getMenuBar
Gets the menubar for the specified tracker panel.- Parameters:
ppanel- the tracker panelforceNew- true to create a new bar if null; false to return null- Returns:
- a TMenuBar
-
refreshOpenRecentMenu
Refreshes the open recent files menu.- Parameters:
menu- the menu to refresh
-
doRecentFiles
-
refresh
public void refresh()Refreshes the GUI. -
setFontLevel
public void setFontLevel(int level) Sets the font level.- Overrides:
setFontLevelin classOSPFrame- Parameters:
level- the desired font level
-
getLibraryBrowser
Gets the library browser.- Returns:
- the library browser
-
getPropertiesDialog
Gets the properties dialog for a specified TrackerPanel.- Parameters:
trackerPanel-- Returns:
- the properties dialog
-
getHelpDialog
Gets the help dialog.- Returns:
- the help dialog
-
showHelp
Shows a specified help topic.- Parameters:
selectedNode- the name of the help node to be displayed
-
showHelp
Shows a specified help topic by keyword: gettingstarted, install, linux, GUI, video, filters, tracks, coords, axes, tape, offset, calibration, pointmass, cm, vector, vectorsum, profile, rgbregion, particle, plot, datatable, xml, etc.- Parameters:
keywords- the keywords of the help node to be displayedpageNumber- the html page number
-
getObjects
-
getClipboardListener
protected org.opensourcephysics.cabrillo.tracker.ClipboardListener getClipboardListener()Gets the (singleton) clipboard listener.- Returns:
- the ClipboardListener
-
getAlwaysListenToClipboard
public boolean getAlwaysListenToClipboard() -
setAlwaysListenToClipboard
public void setAlwaysListenToClipboard(boolean b) -
checkClipboardListener
protected void checkClipboardListener()Starts or ends the clipboard listener as needed. -
getNotes
protected org.opensourcephysics.cabrillo.tracker.TFrame.Notes getNotes() -
doTabStateChanged
protected void doTabStateChanged() -
frameResized
protected void frameResized() -
isPortraitLayout
protected static boolean isPortraitLayout() -
getConvertedDividerLoc
protected double getConvertedDividerLoc(int splitPaneIndex, double loc) Converts and returns converted divider location (0.0 <= loc <= 1.0). No conversion is made if not portrait layout.- Parameters:
splitPaneIndex- 0-3loc- the divider loc- Returns:
- the converted divider loc
-
holdPainting
public void holdPainting(boolean b) Increment/decrement the paintHold counter. Will not decrement below 0.- Parameters:
b- true to increment the counter; false to decrement
-
isPaintable
public boolean isPaintable()check the paintHold counter- Returns:
- true if paintHold is zero
-
hasPaintHold
public boolean hasPaintHold() -
clearHoldPainting
public void clearHoldPainting()For emergency use only! -
addFollower
Adds a component to those following this frame. When the frame is displaced the component will be displaced equally. THIS WAS A MEMORY LEAK. It is the responsibility of the follower to detach itself when appropriate.- Parameters:
c- the componentpt0- the initial location of this frame
-
addMenuListener
-
removeEmptyTabIfTabCountGreaterThan
public void removeEmptyTabIfTabCountGreaterThan(int n) Remove the first tab if it is empty and there are at least n tabs (1 or 2) -
removeTabNow
public void removeTabNow(int i) -
loadExperimentURL
Replace any open tabs with a single tab loaded with the given path. JavaScript only? Called from Tracker (for JavaScript) and TMenuBar (for testing in Java)- Parameters:
path-
-
loadLibraryRecord
-
openLibraryResource
-
setCursor
-
doOpenExportedAndUpdateLibrary
Java only; from ExportVideoDialog- Parameters:
path-
-
doOpenFileFromDialog
public void doOpenFileFromDialog() -
doOpenURL
-
addTabFromLoader
-
getLoader
Returns an ObjectLoader to save and load data for this class.- Returns:
- the object loader
-
setFrameBlocker
-
setNotesVisible
public void setNotesVisible(boolean b) -
setJMenuBar
- Overrides:
setJMenuBarin classJFrame
-
checkLocale
protected void checkLocale() -
setLanguage
-
disposeOf
-
getViewChoosers
Gets the TViewChoosers for the specified tracker panel.- Parameters:
trackerPanel- the tracker panel- Returns:
- array of TViewChooser
-
getViewChoosers
-
getVisibleChoosers
-
removeTabSynchronously
-
refreshMenus
-
allocatePanel
-
deallocatePanelID
-
deallocate
-
getTrackerPanelForID
-
startMemoryTimer
public void startMemoryTimer() -
main
-
sayFileNotFound
-
importData
- Specified by:
importDatain interfaceFileDropHandler.FileImporter
-