|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
sears.gui.MainWindow
public class MainWindow
Class MainWindow.
Summary:
This is the main Interface of the sears project.
It contains a JTable to displays the subtitles, and menus to interact and launch actions.
Nested Class Summary | |
---|---|
protected class |
MainWindow.SubtitleFileTransfertHandler
Class SubtitleFileTransfertHandler. |
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected static java.lang.String |
ACTION_KEY_ABOUT
about action key. |
protected static java.lang.String |
ACTION_KEY_ACCENT_REPAIR
Accent action key, to Accent repair. |
protected static java.lang.String |
ACTION_KEY_APPEND
Append action key, to append ST. |
protected static java.lang.String |
ACTION_KEY_CHAIN_REPAIR
Chain action key, to chain repair. |
protected static java.lang.String |
ACTION_KEY_DELAY
Delay action key, to delay ST. |
protected static java.lang.String |
ACTION_KEY_FIND
find action key. |
protected static java.lang.String |
ACTION_KEY_GOTO_SUB
gotoSub action key. |
protected static java.lang.String |
ACTION_KEY_HTML_REPAIR
HTML action key, to html repair. |
protected static java.lang.String |
ACTION_KEY_MAGIC_RESYNCHRO
magicResynchro action key. |
protected static java.lang.String |
ACTION_KEY_MIX
find action key. |
protected static java.lang.String |
ACTION_KEY_NEXT
Next action key. |
protected static java.lang.String |
ACTION_KEY_NORMALIZE_DURATION
NormalizeDuration action key, to time repair. |
protected static java.lang.String |
ACTION_KEY_OPEN
Open action key, to open a subtitle file |
protected static java.lang.String |
ACTION_KEY_OPTIONS
Options action key. |
protected static java.lang.String |
ACTION_KEY_ORDER_REPAIR
Order action key, to order repair. |
protected static java.lang.String |
ACTION_KEY_PAUSE
Pause action key. |
protected static java.lang.String |
ACTION_KEY_PLAY
Play action key. |
protected static java.lang.String |
ACTION_KEY_PREVIOUS
Previous action key. |
protected static java.lang.String |
ACTION_KEY_QUIT
Quit action key, to save current file. |
protected static java.lang.String |
ACTION_KEY_REMOVE_ALL_ANCHORS
remoaveAllAnchors action key. |
protected static java.lang.String |
ACTION_KEY_RESYNCH
Resynch action key, to resynch ST. |
protected static java.lang.String |
ACTION_KEY_SAVE
Save action key, to save current file. |
protected static java.lang.String |
ACTION_KEY_SAVE_AS
SaveAs action key, to save current file. |
protected static java.lang.String |
ACTION_KEY_SELECT_VIDEO
Select video action key. |
protected static java.lang.String |
ACTION_KEY_SPLIT
Split action key, to split ST. |
protected static java.lang.String |
ACTION_KEY_STOP
Stop action key. |
protected static java.lang.String |
ACTION_KEY_TIME_REPAIR
Time action key, to time repair. |
protected static java.lang.String |
ACTION_KEY_TRACKER_TRIGGER
TrackTrigger action key. |
static MainWindow |
instance
The instance of the mainWindow |
protected PlayerInterface |
player
The Player |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, 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 javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
MainWindow()
Constructor MainWindow. |
Method Summary | |
---|---|
void |
aboutAction()
Method dialogAction. |
boolean |
accentRepairAction()
Method accentRepairAction. |
void |
addFB(FindDialog fd)
|
boolean |
appendAction()
Method appendAction. |
static void |
centerFrame(java.awt.Window window)
Method centerFrame. |
boolean |
chainRepairAction()
Method chainRepairAction. |
protected boolean |
delayAction()
Method delayAction. |
void |
dispose()
|
void |
fileChanged()
Method fileChanged Summary: Set the fileChanged status flag to true. |
void |
finalize()
|
void |
find(FindDialog dialog,
boolean direction)
find a word or a sub string in the subtitle file |
void |
fireFindStop()
|
protected SearsAction |
getAction(java.lang.String key)
Method getAction. |
static boolean |
getResetFlag()
|
SubtitleFile |
getSubtitleFile()
Method getSubtitleFile. |
SearsUndoManager |
getUndoManager()
Returns the UndoManager |
void |
gotoSubAction()
Method gotoSubAction. |
boolean |
htmlRepairAction()
Method htmlRepairAction. |
protected boolean |
magicResynchroAction()
Method magicResynchroAction. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
nextAction()
Method nextAction. |
protected void |
openAction()
Method openAction. |
void |
openFile(java.io.File file)
Method openFile. |
void |
openFile(java.io.File file,
java.lang.String charset)
Opens a file with the specific charset |
void |
optionsAction()
Method optionsAction. |
boolean |
orderRepairAction()
Method orderRepairAction. |
void |
pauseAction()
Method pauseAction. |
void |
playAction()
Method playAction. |
void |
previousAction()
Method previousAction. |
void |
quitAction()
Method quitAction. |
protected boolean |
resynchroAction()
Method resynchroAction. |
protected void |
saveAction()
Method saveAction. |
protected void |
saveAsAction()
Method saveAsAction. |
void |
selectVideoAction()
Method selectVideoAction. |
protected static void |
setResetFlag(boolean resetOnExit)
|
void |
setSubtitleFile(SubtitleFile newSubtitleFile)
Sets a new subtitle file |
java.io.File |
showBrowser(javax.swing.filechooser.FileFilter filter)
Method showBrowser. |
java.io.File |
showBrowser(javax.swing.filechooser.FileFilter filter,
java.io.File sourceFile)
Method showBrowser. |
java.lang.String |
showOpenErrorDialog(java.lang.String message,
java.lang.String detail,
boolean reOpenChoice)
|
void |
showSaveErrorDialog(java.lang.String message,
java.lang.String detail)
|
java.io.File |
showSRTBrowser()
Method showSRTBrowser. |
java.io.File |
showVideoBrowser()
Method showVideoBrowser. |
boolean |
splitAction()
Method splitAction. |
void |
stopAction()
Method stopAction. |
boolean |
timeRepairAction()
Method timeRepairAction. |
void |
trackerTriggerAction()
Method trackerTriggerAction. |
void |
updateTableAndActions()
Method updateTableAndActions. |
void |
updateWholeTable()
Method updateWholeTable. |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, 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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, 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, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, 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, isOpaque, 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, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static MainWindow instance
protected PlayerInterface player
protected static java.lang.String ACTION_KEY_OPEN
protected static java.lang.String ACTION_KEY_SAVE
protected static java.lang.String ACTION_KEY_SAVE_AS
protected static java.lang.String ACTION_KEY_QUIT
protected static java.lang.String ACTION_KEY_DELAY
protected static java.lang.String ACTION_KEY_RESYNCH
protected static java.lang.String ACTION_KEY_SPLIT
protected static java.lang.String ACTION_KEY_APPEND
protected static java.lang.String ACTION_KEY_ACCENT_REPAIR
protected static java.lang.String ACTION_KEY_CHAIN_REPAIR
protected static java.lang.String ACTION_KEY_HTML_REPAIR
protected static java.lang.String ACTION_KEY_ORDER_REPAIR
protected static java.lang.String ACTION_KEY_TIME_REPAIR
protected static java.lang.String ACTION_KEY_NORMALIZE_DURATION
protected static java.lang.String ACTION_KEY_SELECT_VIDEO
protected static java.lang.String ACTION_KEY_OPTIONS
protected static java.lang.String ACTION_KEY_PLAY
protected static java.lang.String ACTION_KEY_STOP
protected static java.lang.String ACTION_KEY_PAUSE
protected static java.lang.String ACTION_KEY_PREVIOUS
protected static java.lang.String ACTION_KEY_NEXT
protected static java.lang.String ACTION_KEY_TRACKER_TRIGGER
protected static java.lang.String ACTION_KEY_GOTO_SUB
protected static java.lang.String ACTION_KEY_MAGIC_RESYNCHRO
protected static java.lang.String ACTION_KEY_REMOVE_ALL_ANCHORS
protected static java.lang.String ACTION_KEY_ABOUT
protected static java.lang.String ACTION_KEY_FIND
protected static java.lang.String ACTION_KEY_MIX
Constructor Detail |
---|
public MainWindow()
Method Detail |
---|
public SearsUndoManager getUndoManager()
protected SearsAction getAction(java.lang.String key)
key
- The String Action key to search for.
protected boolean delayAction()
public void addFB(FindDialog fd)
public void updateWholeTable()
protected boolean resynchroAction()
protected boolean magicResynchroAction()
protected void saveAsAction()
protected void saveAction()
public void quitAction()
public void dispose()
dispose
in class java.awt.Window
protected void openAction()
public java.io.File showBrowser(javax.swing.filechooser.FileFilter filter)
filter
- The file filter
public java.io.File showBrowser(javax.swing.filechooser.FileFilter filter, java.io.File sourceFile)
filter
- The file filter.sourceFile
- Open the browser in the file's parent path.
public java.io.File showSRTBrowser()
public java.io.File showVideoBrowser()
public void openFile(java.io.File file, java.lang.String charset)
file
- the file to opencharset
- the charset namepublic java.lang.String showOpenErrorDialog(java.lang.String message, java.lang.String detail, boolean reOpenChoice)
public void showSaveErrorDialog(java.lang.String message, java.lang.String detail)
public void setSubtitleFile(SubtitleFile newSubtitleFile)
newSubtitleFile
- the new subtitle file, if it's null this method is no oppublic void openFile(java.io.File file)
file
- The subtitle file to openpublic static void centerFrame(java.awt.Window window)
window
- The window to center.public boolean orderRepairAction()
public void updateTableAndActions()
public void pauseAction()
public void trackerTriggerAction()
public void nextAction()
public void previousAction()
public void stopAction()
public void playAction()
public boolean accentRepairAction()
public boolean htmlRepairAction()
public void selectVideoAction()
public boolean chainRepairAction()
public SubtitleFile getSubtitleFile()
public void optionsAction()
public void aboutAction()
public void find(FindDialog dialog, boolean direction)
dialog
- the dialog which calls the methoddirection
- the direction of the search (false: forward, true: backward)public void fireFindStop()
public void gotoSubAction()
public boolean timeRepairAction()
public boolean splitAction()
public boolean appendAction()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void fileChanged()
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
protected static void setResetFlag(boolean resetOnExit)
public static boolean getResetFlag()
public void finalize()
finalize
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |