com.webobjects.eointerface.swing
Class EOQuickTimeView
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--com.webobjects.eointerface.swing.EOQuickTimeView
- All Implemented Interfaces:
- Accessible, ImageObserver, MenuContainer, Serializable
- public class EOQuickTimeView
- extends JPanel
The EOQuickTimeView class is used to display QuickTime movies (or other QuickTime playe types) in Swing user interfaces.
Note that you have to make sure that the QuickTime for Java classes are available in your appliation (in the classpath).
EOQuickTimeView is designed to make use of QuickTime for Java if available and to show an empty content otherwise.
- See Also:
- Serialized Form
Field Summary |
static int |
QuickTimeCanvasAspectResizing
This constant is used to specify that the QuickTime canvas should resize to fill out EOQuickTimeView
component size while preserving the aspect ratio of the canvas. |
static int |
QuickTimeCanvasFreeResizing
This constant is used to specify that the QuickTime canvas should resize freely with the EOQuickTimeView component size. |
static int |
QuickTimeCanvasHorizontalResizing
This constant is used to specify that the QuickTime canvas should resize
horizontally with the EOQuickTimeView component size. |
static int |
QuickTimeCanvasIntegralResizing
This constant is used to specify that the QuickTime canvas should resize to fill out EOQuickTimeView
component size while preserving the aspect ratio of the canvas and only growing by integral increments (2x, 3x, 4x, etc.). |
static int |
QuickTimeCanvasNoResizing
This constant is used to specify that the QuickTime canvas should not resize with the EOQuickTimeView component size. |
static int |
QuickTimeCanvasPerformanceResizing
This constant is used to specify that the QuickTime canvas should resize with the EOQuickTimeView
component size to any size which is a factor of 2 of the initial canvas size. |
static int |
QuickTimeCanvasVerticalResizing
This constant is used to specify that the QuickTime canvas should resize
vertically with the EOQuickTimeView component size. |
Constructor Summary |
EOQuickTimeView()
Constructs a new EOQuickTimeView with EOQuickTimeView.QuickTimeCanvasNoResizing canvas resizing mode. |
Method Summary |
int |
canvasResizing()
Returns the receiver's canvas resizing mode. |
Dimension |
getPreferredSize()
Returns the preferred size of the receiver. |
static boolean |
isQuickTimeAvailable()
Returns whether or not the QuickTime for Java classes are available in the application (in the class path and loaded). |
Object |
movie()
Returns the movie displayed in the EOQuickTimeView. |
Object |
player()
Returns the player displayed in the EOQuickTimeView. |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the receiver's bounds. |
void |
setCanvasResizing(int canvasResizing)
Sets the receiver's canvas resizing mode to canvasResizing . |
void |
setMovie(Object movie)
Displays the movie movie in the EOQuickTimeView. |
void |
setMovieFromURL(String url)
Loads a movie from the URL url and displays it in the EOQuickTimeView. |
void |
setPlayer(Object player)
Displays the movie player in the EOQuickTimeView. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
QuickTimeCanvasAspectResizing
public static final int QuickTimeCanvasAspectResizing
- This constant is used to specify that the QuickTime canvas should resize to fill out EOQuickTimeView
component size while preserving the aspect ratio of the canvas.
- See Also:
- Constant Field Values
QuickTimeCanvasFreeResizing
public static final int QuickTimeCanvasFreeResizing
- This constant is used to specify that the QuickTime canvas should resize freely with the EOQuickTimeView component size.
- See Also:
- Constant Field Values
QuickTimeCanvasHorizontalResizing
public static final int QuickTimeCanvasHorizontalResizing
- This constant is used to specify that the QuickTime canvas should resize
horizontally with the EOQuickTimeView component size.
- See Also:
- Constant Field Values
QuickTimeCanvasIntegralResizing
public static final int QuickTimeCanvasIntegralResizing
- This constant is used to specify that the QuickTime canvas should resize to fill out EOQuickTimeView
component size while preserving the aspect ratio of the canvas and only growing by integral increments (2x, 3x, 4x, etc.).
- See Also:
- Constant Field Values
QuickTimeCanvasNoResizing
public static final int QuickTimeCanvasNoResizing
- This constant is used to specify that the QuickTime canvas should not resize with the EOQuickTimeView component size.
- See Also:
- Constant Field Values
QuickTimeCanvasPerformanceResizing
public static final int QuickTimeCanvasPerformanceResizing
- This constant is used to specify that the QuickTime canvas should resize with the EOQuickTimeView
component size to any size which is a factor of 2 of the initial canvas size.
- See Also:
- Constant Field Values
QuickTimeCanvasVerticalResizing
public static final int QuickTimeCanvasVerticalResizing
- This constant is used to specify that the QuickTime canvas should resize
vertically with the EOQuickTimeView component size.
- See Also:
- Constant Field Values
EOQuickTimeView
public EOQuickTimeView()
- Constructs a new EOQuickTimeView with EOQuickTimeView.QuickTimeCanvasNoResizing canvas resizing mode.
- See Also:
QuickTimeCanvasNoResizing
canvasResizing
public int canvasResizing()
- Returns the receiver's canvas resizing mode.
Possible values are QuickTimeCanvasNoResizing, QuickTimeCanvasAspectResizing,
QuickTimeCanvasFreeResizing, QuickTimeCanvasIntegralResizing,
QuickTimeCanvasPerformanceResizing, QuickTimeCanvasHorizontalResizing,
and QuickTimeCanvasVerticalResizing.
- Returns:
- the canvas resizing mode
- See Also:
QuickTimeCanvasNoResizing
,
QuickTimeCanvasFreeResizing
,
QuickTimeCanvasIntegralResizing
,
QuickTimeCanvasPerformanceResizing
,
QuickTimeCanvasHorizontalResizing
,
QuickTimeCanvasVerticalResizing
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size of the receiver.
- Overrides:
getPreferredSize
in class JComponent
- Returns:
- the preferred size
isQuickTimeAvailable
public static boolean isQuickTimeAvailable()
- Returns whether or not the QuickTime for Java classes are available in the application (in the class path and loaded).
If the classes are in the class path but aren't loaded, this method attempts to load them.
- Returns:
true
if QuickTime for Java is available, false
otherwise
movie
public Object movie()
- Returns the movie displayed in the EOQuickTimeView.
The movie is an instance of the
quicktime.std.movies.Movie
class
- Returns:
- the movie
player
public Object player()
- Returns the player displayed in the EOQuickTimeView.
The player is an instance of the
quicktime.app.players.QTPlayer
class.
- Returns:
- the player
setBounds
public void setBounds(int x,
int y,
int width,
int height)
- Sets the receiver's bounds.
- Overrides:
setBounds
in class Component
- Parameters:
x
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the height
setCanvasResizing
public void setCanvasResizing(int canvasResizing)
- Sets the receiver's canvas resizing mode to
canvasResizing
.
Possible values are QuickTimeCanvasNoResizing, QuickTimeCanvasAspectResizing,
QuickTimeCanvasFreeResizing, QuickTimeCanvasIntegralResizing,
QuickTimeCanvasPerformanceResizing, QuickTimeCanvasHorizontalResizing,
and QuickTimeCanvasVerticalResizing.
- Parameters:
canvasResizing
- the canvas resizing mode- See Also:
QuickTimeCanvasNoResizing
,
QuickTimeCanvasFreeResizing
,
QuickTimeCanvasIntegralResizing
,
QuickTimeCanvasPerformanceResizing
,
QuickTimeCanvasHorizontalResizing
,
QuickTimeCanvasVerticalResizing
setMovie
public void setMovie(Object movie)
- Displays the movie
movie
in the EOQuickTimeView.
movie
has to be an instance of the quicktime.std.movies.Movie
class.
- Parameters:
movie
- the movie
setMovieFromURL
public void setMovieFromURL(String url)
- Loads a movie from the URL
url
and displays it in the EOQuickTimeView.
- Parameters:
url
- the movie URL
setPlayer
public void setPlayer(Object player)
- Displays the movie
player
in the EOQuickTimeView.
player
has to be an instance of the quicktime.app.players.QTPlayer
class.
- Parameters:
player
- the player
Copyright © 2003 Apple Computer, Inc.