|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JInternalFrame
net.sourceforge.nite.gui.mediaviewer.NITEMediaPlayer
public abstract class NITEMediaPlayer
A video player implementation using JMF [DR: Added a line in loadIcon, since the system missed part of the classpath in searching for the icons.]
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JInternalFrame |
---|
javax.swing.JInternalFrame.JDesktopIcon |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
---|
Fields inherited from class javax.swing.JInternalFrame |
---|
CONTENT_PANE_PROPERTY, FRAME_ICON_PROPERTY, GLASS_PANE_PROPERTY, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, LAYERED_PANE_PROPERTY, MENU_BAR_PROPERTY, ROOT_PANE_PROPERTY, TITLE_PROPERTY |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
NITEMediaPlayer(DefaultClock c)
|
|
NITEMediaPlayer(java.io.File f,
DefaultClock c)
|
|
NITEMediaPlayer(java.io.File f,
DefaultClock c,
java.lang.String name)
|
Method Summary | |
---|---|
void |
acceptTimeChange(double systemTime)
skip to the given time |
void |
acceptTimeChangeWhenPrefetched(double systemTime)
skip to the given time when ready |
void |
acceptTimeSpanChange(double start,
double end)
This gets called if we control-right-click to play the currently selected segment. |
void |
close()
Closes the media player. |
void |
controllerUpdate(ControllerEvent event)
This controllerUpdate function must be defined in order to implement a ControllerListener interface. |
void |
Exit()
|
void |
fastForward()
fast forward the continuous stream by the specified amount |
void |
fastForward(int seconds)
fast forward the continuous stream by the specified amount |
Clock |
getClock()
Return the Clock that is currently syncronising this TimeHandler |
java.lang.String |
getFileName()
Return the file name being played. |
int |
getID()
|
double |
getMaxTime()
get the end time of the media - in fact we return 0.0 as we auto-register our time with any clock when we have pre-fetched the media file! |
double |
getTime()
get the current media time |
int |
getWindSkip()
get the number of seconds the fast-forward and rewind buttons jump |
boolean |
isMaster()
return true if this player has the 'master' button checked, and thus controls time for the application |
boolean |
isPlaying()
return true if the media is currently playing |
boolean |
pastEndTime(double ctime)
return a boolean: true the given time is after the end time of the media file. |
void |
pause()
pause the continuous stream |
void |
play()
start playing the continuous stream |
void |
playWhenPrefetched()
start playing when ready |
void |
rewind()
rewind the continuous stream by the pre-defined amount (defaults to 5 seconds) |
void |
rewind(int seconds)
|
void |
setClock(Clock c)
Set the Clock to which this TimeHandler is registered |
void |
setID(int i)
|
void |
setMaster(boolean mast)
Make this player control time for the application if the argument is 'true', or stop it from being if 'false'. |
void |
setMute(boolean val)
set the mute on or off |
void |
setPlayRate(float rate)
set the rate of play so we can sound like pinky and perky. |
void |
setSendSynchronization(boolean val)
set the player to send synchronize messages. |
void |
setTime(double time)
Broadcast a new time. |
void |
setTimeHighlightColor(java.awt.Color color)
Change the Color used for all registered TimeHandlers to highlight times |
void |
setTimeSpan(double start,
double end)
Broadcast a new span to all registered TimeHandlers. |
void |
setWindSkip(int seconds)
set the number of seconds the fast-forward and rewind buttons jump |
Methods inherited from class javax.swing.JInternalFrame |
---|
addInternalFrameListener, dispose, doDefaultCloseAction, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isSelected, moveToBack, moveToFront, pack, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setSelected, setTitle, setUI, show, toBack, toFront, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NITEMediaPlayer(DefaultClock c)
public NITEMediaPlayer(java.io.File f, DefaultClock c)
public NITEMediaPlayer(java.io.File f, DefaultClock c, java.lang.String name)
Method Detail |
---|
public boolean isMaster()
isMaster
in interface PlayingTimeHandler
public void setMaster(boolean mast)
setMaster
in interface PlayingTimeHandler
public boolean pastEndTime(double ctime)
pastEndTime
in interface PlayingTimeHandler
public double getTime()
getTime
in interface PlayingTimeHandler
public void play()
PlayingTimeHandler
play
in interface PlayingTimeHandler
public void pause()
PlayingTimeHandler
pause
in interface PlayingTimeHandler
public void rewind(int seconds)
rewind
in interface PlayingTimeHandler
public void rewind()
PlayingTimeHandler
rewind
in interface PlayingTimeHandler
public void setPlayRate(float rate)
setPlayRate
in interface PlayingTimeHandler
public void fastForward()
PlayingTimeHandler
fastForward
in interface PlayingTimeHandler
public void fastForward(int seconds)
PlayingTimeHandler
fastForward
in interface PlayingTimeHandler
public boolean isPlaying()
isPlaying
in interface PlayingTimeHandler
public void acceptTimeChangeWhenPrefetched(double systemTime)
public void playWhenPrefetched()
public void acceptTimeChange(double systemTime)
acceptTimeChange
in interface TimeHandler
public void acceptTimeSpanChange(double start, double end)
acceptTimeSpanChange
in interface TimeHandler
public void setTimeSpan(double start, double end)
TimeHandler
setTimeSpan
in interface TimeHandler
public void setTime(double time)
TimeHandler
setTime
in interface TimeHandler
public Clock getClock()
TimeHandler
getClock
in interface TimeHandler
public void setTimeHighlightColor(java.awt.Color color)
TimeHandler
setTimeHighlightColor
in interface TimeHandler
public void setClock(Clock c)
TimeHandler
setClock
in interface TimeHandler
public void controllerUpdate(ControllerEvent event)
public void setSendSynchronization(boolean val)
public void close()
Closes the media player. This method should be called when the media player is not needed anymore.
public void Exit()
public int getID()
public void setID(int i)
public void setWindSkip(int seconds)
public int getWindSkip()
public void setMute(boolean val)
public double getMaxTime()
getMaxTime
in interface TimeHandler
public java.lang.String getFileName()
getFileName
in interface PlayingTimeHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |