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.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
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 TypeFieldDescriptionstatic final int
static final int
static final int
static final int
protected org.opensourcephysics.cabrillo.tracker.ClipboardListener
protected String
protected JDialog
protected static final double
protected static final int
protected static final double
protected static final double
protected static final double
protected static final double
protected static final int[]
protected static final double
protected static final int
protected FileDropHandler
protected int
static boolean
static boolean
protected static final String
protected JDialog
protected Launcher
protected static boolean
protected static boolean
protected LibraryBrowser
static boolean
protected static final int
protected static final double
protected static final double
protected int
protected Action
protected static final int
protected static final int[]
protected static final int[]
protected PrefsDialog
protected int
protected Integer
static final String
static final String
static final String
protected Action
protected static final int
protected static final int
protected static final int
protected static final int
protected boolean
protected static final int
protected static final int
protected static final int
protected static final int
static final int
static final int
static final int
protected JTabbedPane
protected File
static Font
protected static final String
runnable for when loadObject is complete, from TrackerIOprotected static final Color
Fields inherited from class org.opensourcephysics.display.OSPFrame
action, animated, autoclear, buttonPanel, childFrames, constructorThreadGroup, customButtons, keepHidden, myFontLevel, strategy
Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields 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_CURSOR
Fields inherited from class java.awt.Component
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 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 void
addMenuListener
(JMenu m, Runnable r) void
addTab
(TrackerPanel trackerPanel, int addMode, Runnable whenDone) Adds a tab that displays the specified tracker panel.void
addTabFromLoader
(TrackerPanel trackerPanel) void
addTrackerPanel
(boolean changedState, Runnable whenDone) allocatePanel
(TrackerPanel trackerPanel) boolean
areViewsVisible
(int whichViews, TrackerPanel trackerPanel) Determines whether the specified views are visible in a trackerPanel tab.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.protected void
Starts or ends the clipboard listener as needed.protected void
void
For emergency use only!void
void
deallocatePanelID
(Integer panelID) void
disposeOf
(TrackerPanel trackerPanel) boolean
doCloseAction
(TrackerPanel trackerPanel) Removes a tracker panel tab.void
Java only; from ExportVideoDialogvoid
void
protected void
doRecentFiles
(String path) protected void
protected void
protected Rectangle
getAdaptiveBounds
(boolean isInit) boolean
protected org.opensourcephysics.cabrillo.tracker.ClipboardListener
Gets the (singleton) clipboard listener.protected double
getConvertedDividerLoc
(int splitPaneIndex, double loc) Converts and returns converted divider location (0.0 <= loc <= 1.0).protected Component
Gets the help dialog.protected LibraryBrowser
Gets the library browser.static XML.ObjectLoader
Returns an ObjectLoader to save and load data for this class.getMainView
(TrackerPanel trackerPanel) Gets the main view for the specified tracker panel.int
getMenuBar
(Integer panelID, boolean forceNew) Gets the menubar for the specified tracker panel.protected org.opensourcephysics.cabrillo.tracker.TFrame.Notes
getNotes()
Object[]
getObjects
(int tab) Gets the preferences dialog.protected PropertiesDialog
getPropertiesDialog
(TrackerPanel trackerPanel) Gets the properties dialog for a specified TrackerPanel.Gets the panel of the selected tab, if a tab is selected.int
Gets 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.int
getState()
int
Returns the tab index for the specified data file, or -1 if no tab is found.int
Returns the tab index for the specified tracker panel, or -1 if no tab is found.int
Gets the tab count.int
getTabForID
(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.TTabPanel
getTabPanel
(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) boolean
void
holdPainting
(boolean b) Increment/decrement the paintHold counter.boolean
importData
(Object data, Component component) boolean
boolean
check the paintHold counterprotected static boolean
boolean
boolean
isViewPaneVisible
(int position, Integer panelID) Determines whether a view pane is visible for the specified trackerPanel tab.void
loadExperimentURL
(String path) Replace any open tabs with a single tab loaded with the given path.protected void
loadLibraryRecord
(LibraryResource record) static void
void
openLibraryResource
(LibraryResource record, Runnable whenDone) void
void
placeViews
(org.opensourcephysics.cabrillo.tracker.TFrame.TTabPanel tabPanel, TrackerPanel trackerPanel, TViewChooser[] viewChoosers) Places the views in an appropriate order for the specified trackerPanel.void
Responds to property change events.void
refresh()
Refreshes the GUI.void
refreshMenus
(TrackerPanel trackerPanel, String whereFrom) void
refreshOpenRecentMenu
(JMenu menu) Refreshes the open recent files menu.void
refreshTab
(TrackerPanel panel) Refreshes the tab for the specified tracker panel.protected void
void
removeAllTabs
(boolean isExit) Removes all tabs.void
Remove the first tab if it is empty and there are at least n tabs (1 or 2)void
removeTabNow
(int i) void
removeTabSynchronously
(Integer panelID) void
removeTabSynchronously
(TrackerPanel trackerPanel) void
repaint
(long time, int x, int y, int w, int h) All repaints funnel through this methodstatic void
For optimization, finding out exactly who is repainting.void
saveAllTabs
(boolean isExit, Function<Integer, Void> whenEachApproved, Runnable whenAllApproved, Runnable whenCanceled) Saves all tabs if user approved.void
sayFileNotFound
(String path) void
setAlwaysListenToClipboard
(boolean b) void
setAnglesInRadians
(boolean inRadians) Sets the display units for angles.void
void
setDividerLocation
(TrackerPanel trackerPanel, int paneIndex, double loc) Sets the location of a splitpane divider for a tracker panelvoid
setDividerLocation
(TrackerPanel trackerPanel, int paneIndex, int loc) Sets the location of a splitpane divider for a tracker panelvoid
setFontLevel
(int level) Sets the font level.void
setFrameBlocker
(boolean blocking, TrackerPanel panel) void
setJMenuBar
(JMenuBar bar) protected void
setLanguage
(String language) void
setNotesVisible
(boolean b) void
setSelectedTab
(int tab) Sets the selected tab index.void
setSelectedTab
(File dataFile) void
setSelectedTab
(TrackerPanel trackerPanel) Sets the selected tab specified by tracker panel.void
setTabTitle
(int tab, String title) Sets the title of the specified tab.void
setToolBar
(TrackerPanel trackerPanel, TToolBar toolbar) From TrackPanel.Loader.void
setVisible
(boolean visible) Shows or hides this component depending on the value of parameterb
and thekeepHidden
flag.protected void
Shows a specified help topic.protected void
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.void
Shows the preferences dialog.void
showPrefsDialog
(String tabName) Shows the preferences dialog set to a specified tab.void
void
Swing 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, wishesToExit
Methods 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, setTransferHandler
Methods 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, setUndecorated
Methods 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, toFront
Methods 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, validateTree
Methods 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, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensourcephysics.display.AppFrame
getDefaultCloseOperation
Methods 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:
propertyChange
in interfacePropertyChangeListener
- Parameters:
e
- the property change event
-
setVisible
public void setVisible(boolean visible) Description copied from class:OSPFrame
Shows or hides this component depending on the value of parameterb
and thekeepHidden
flag. OSP Applets often keep windows hidden.- Overrides:
setVisible
in 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:
setFontLevel
in 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:
setJMenuBar
in 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:
importData
in interfaceFileDropHandler.FileImporter
-