Class ExportZipDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.opensourcephysics.cabrillo.tracker.ExportZipDialog
- All Implemented Interfaces:
ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
A dialog for exporting/saving Tracker ZIP files. Steps are: 1. create temp
folder in target directory which will contain all files to be zipped 2. write
or copy the video clip(s) to a video subfolder 3. write or copy HTML pages,
stylesheets and image files into html and image subfolders 4. write the
converted Tracker data file(s) in the temp folder 5. zip the temp folder 6.
delete temp folder
- Author:
- Douglas Brown
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA DocumentListener adapter.protected static classA JTextField for editing ZipResourceDialog fields.protected classNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested 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 TypeFieldDescriptionprotected JButtonprotected booleanprotected JButtonprotected Boxprotected JLabelprotected JLabelprotected JPanelprotected Boxprotected ExportZipDialog.EntryFieldprotected JLabelprotected ArrayList<ParticleModel>protected JCheckBoxprotected JButtonprotected ExportZipDialog.EntryFieldprotected JLabelprotected XMLControlprotected JButtonprotected JLabelprotected JLabelprotected JTextAreaprotected JPanelprotected Boxprotected DefaultListModel<String>protected JTextAreaprotected JButtonprotected ExportZipDialog.EntryFieldprotected JLabelprotected static Stringprotected static Stringprotected booleanprotected booleanprotected ExportZipDialog.EntryFieldprotected JLabelprotected static Colorprotected JButtonprotected static intprotected JButtonprotected Boxprotected JLabelprotected JLabelprotected JPanelprotected Boxprotected static intprotected Iconprotected static Stringprotected FileFilterprotected JButtonprotected JButtonprotected JCheckBoxprotected Boxprotected JButtonprotected JLabelprotected JLabelprotected JPanelprotected Boxprotected JButtonprotected JLabelprotected JLabelprotected JPanelprotected Boxprotected ArrayList<ExportZipDialog.EntryField>protected Stringprotected Stringprotected Stringprotected Stringprotected JButtonprotected JLabelprotected JLabelprotected JButtonprotected JLabelprotected JPanelprotected JPanelprotected Boxprotected ExportZipDialog.EntryFieldprotected JLabelprotected JPanelprotected Boxprotected static booleanprotected ExportZipDialog.EntryFieldprotected JLabelprotected JButtonprotected ExportVideoDialogprotected ExportZipDialog.VideoListenerprotected JLabelprotected Stringprotected JLabelprotected JPanelprotected static Stringprotected BoxFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear(TrackerPanel panel) Disposes of a zip dialog for a TrackerPanel.protected booleancreateTarget(String path, File target) Uses a file chooser to define a new target name and directory.protected voidstatic ExportZipDialoggetDialog(TrackerPanel panel) Returns an ExportZipDialog for a TrackerPanel.static booleanhasDialog(TrackerPanel panel) Returns true if an ExportZipDialog exists for a TrackerPanel.protected voidnextExport(ArrayList<File> zipList) voidResponds to property change events from TrackerPanel.protected voidRefreshes the Thumbnail GUIprotected voidSaves a zip resource to a target defined with a file chooservoidsetFontLevel(int level) Sets the font level of a single ExportZipDialog.static voidsetFontLevels(int level) Sets the font level of all ExportZipDialogs.static intsetNewFrameNumbersCalibration(VideoClip realClip, Object[] array, Map<Integer, Integer> newFrameNumbers) why the difference? Calibration Points (when not fixed) use keyframes, meaning that each step is a copy of the previous step unless a new keyframe is defined at that step.protected static intWhy the difference? The coordinate system MUST have data for frame 0 plus any later frames where the coordinate system changes.static intsetNewFrameNumbersPointVector(VideoClip realClip, Object[] array, Map<Integer, Integer> newFrameNumbers) why the difference here? PointMass and Vector can have non-null frameData elements anywhere without problem.static intWhy the difference? Tapes also use keyframes.voidsetVisible(boolean vis) static voidthumbnailDialogClosed(TrackerPanel trackerPanel) protected static voidupdateRange(VideoClip realClip, XMLControl trackControl, String start, String end) Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, 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, remove, 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
-
Field Details
-
videoSubdirectory
-
htmlSubdirectory
-
imageSubdirectory
-
labelColor
-
preferredExtension
-
trimToClip
protected static boolean trimToClip -
maxLineLength
protected static int maxLineLength -
minWidth
protected static int minWidth -
videoExporter
-
openIcon
-
titlePanel
-
descriptionPanel
-
tabsPanel
-
videoPanel
-
metaPanel
-
thumbnailPanel
-
supportFilesPanel
-
advancedPanel
-
thumbnailImagePanel
-
titleTitleBox
-
descriptionTitleBox
-
tabsTitleBox
-
videoTitleBox
-
metaTitleBox
-
thumbTitleBox
-
supportFilesTitleBox
-
advancedTitleBox
-
metaFieldsBox
-
advancedFieldsBox
-
supportFilesBox
-
titleLabel
-
descriptionLabel
-
descriptionInfoLabel
-
tabsLabel
-
tabsInfoLabel
-
videoLabel
-
videoInfoLabel
-
metaLabel
-
metaInfoLabel
-
thumbLabel
-
thumbInfoLabel
-
supportFilesLabel
-
supportFilesInfoLabel
-
advancedLabel
-
advancedInfoLabel
-
descriptionButton
-
tabsButton
-
videoButton
-
metaButton
-
thumbButton
-
supportFilesButton
-
advancedButton
-
saveButton
-
closeButton
-
thumbnailButton
-
loadHTMLButton
-
helpButton
-
formatDropdown
-
tabTitleFields
-
tabCheckboxes
-
authorLabel
-
contactLabel
-
keywordsLabel
-
thumbnailDisplay
-
urlLabel
-
htmlLabel
-
clipCheckbox
-
showThumbnailCheckbox
-
labels
-
titleField
-
authorField
-
contactField
-
keywordsField
-
urlField
-
htmlField
-
targetName
-
targetDirectory
-
targetVideo
-
targetExtension
-
filelistPane
-
descriptionPane
-
addedFiles
-
fileNames
-
fileList
-
addButton
-
removeButton
-
fileListModel
-
recentAddFilesFilter
-
videoExportListener
-
control
-
addThumbnail
protected boolean addThumbnail -
badModels
-
videoIOPreferredExtension
-
isVisible
protected boolean isVisible -
isOpenInTracker
protected boolean isOpenInTracker
-
-
Method Details
-
setNewFrameNumbersCoord
protected static int setNewFrameNumbersCoord(VideoClip realClip, Object[] array, Map<Integer, Integer> newFrameNumbers) Why the difference? The coordinate system MUST have data for frame 0 plus any later frames where the coordinate system changes. This is essentially the same as the keyframe requirements for calibration points and tape below.- Parameters:
realClip-array-newFrameNumbers-- Returns:
-
setNewFrameNumbersPointVector
public static int setNewFrameNumbersPointVector(VideoClip realClip, Object[] array, Map<Integer, Integer> newFrameNumbers) why the difference here? PointMass and Vector can have non-null frameData elements anywhere without problem. So we only need to convert the frame numbers of each non-null element in the clip.- Parameters:
realClip-array-newFrameNumbers-- Returns:
-
setNewFrameNumbersCalibration
public static int setNewFrameNumbersCalibration(VideoClip realClip, Object[] array, Map<Integer, Integer> newFrameNumbers) why the difference? Calibration Points (when not fixed) use keyframes, meaning that each step is a copy of the previous step unless a new keyframe is defined at that step. So we have to make sure there is a keyFrame at step 0. It does seem like this, the tape and the coords could have the same end?- Parameters:
realClip-array-newFrameNumbers-- Returns:
-
setNewFrameNumbersTape
public static int setNewFrameNumbersTape(VideoClip realClip, Object[] array, Map<Integer, Integer> newFrameNumbers) Why the difference? Tapes also use keyframes. Not sure why I use nonNullIndex in this method!- Parameters:
realClip-array-newFrameNumbers-- Returns:
-
updateRange
protected static void updateRange(VideoClip realClip, XMLControl trackControl, String start, String end) -
nextExport
-
exportCanceled
protected void exportCanceled() -
getDialog
Returns an ExportZipDialog for a TrackerPanel.- Parameters:
panel- the TrackerPanel- Returns:
- the ExportZipDialog
-
hasDialog
Returns true if an ExportZipDialog exists for a TrackerPanel.- Parameters:
panel- the TrackerPanel- Returns:
- true if the ExportZipDialog exists
-
setFontLevel
public void setFontLevel(int level) Sets the font level of a single ExportZipDialog.- Parameters:
level- the desired font level
-
setVisible
public void setVisible(boolean vis) - Overrides:
setVisiblein classDialog
-
getPreferredSize
- Overrides:
getPreferredSizein classContainer
-
propertyChange
Responds to property change events from TrackerPanel.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
e- the property change event
-
clear
Disposes of a zip dialog for a TrackerPanel.- Parameters:
panel- the TrackerPanel
-
setFontLevels
public static void setFontLevels(int level) Sets the font level of all ExportZipDialogs.- Parameters:
level- the font level
-
refreshThumbnailGUI
protected void refreshThumbnailGUI()Refreshes the Thumbnail GUI -
createTarget
-
saveZipAs
protected void saveZipAs()Saves a zip resource to a target defined with a file chooser -
defineTarget
Uses a file chooser to define a new target name and directory.- Returns:
- empty List
to fill with files to be zipped
-
thumbnailDialogClosed
-