WebObjects 5.2

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

Inner classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
 
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.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
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.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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.

QuickTimeCanvasFreeResizing

public static final int QuickTimeCanvasFreeResizing
This constant is used to specify that the QuickTime canvas should resize freely with the EOQuickTimeView component size.

QuickTimeCanvasHorizontalResizing

public static final int QuickTimeCanvasHorizontalResizing
This constant is used to specify that the QuickTime canvas should resize horizontally with the EOQuickTimeView component size.

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.).

QuickTimeCanvasNoResizing

public static final int QuickTimeCanvasNoResizing
This constant is used to specify that the QuickTime canvas should not resize with the EOQuickTimeView component size.

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.

QuickTimeCanvasVerticalResizing

public static final int QuickTimeCanvasVerticalResizing
This constant is used to specify that the QuickTime canvas should resize vertically with the EOQuickTimeView component size.
Constructor Detail

EOQuickTimeView

public EOQuickTimeView()
Constructs a new EOQuickTimeView with EOQuickTimeView.QuickTimeCanvasNoResizing canvas resizing mode.
See Also:
QuickTimeCanvasNoResizing
Method Detail

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 coordinate
y - the y coordinate
width - the width
height - 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

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.