|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--quicktime.app.display.JQTCanvas
This is a Lightweight version of the JQTCanvas class designed for use with Swing Because it is strictly lightweight, and has no native peer, you can only have client classes that do not use a controller such as the Compositor class and MoviePlayer. QuickTime cannot render controllers in an offscreen buffer.
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static boolean |
flashScaling
|
QTImageProducer |
ip
|
static int |
kAspectResize
Use this flag if the client can be resized to any size which preserves the initial aspect ratio. |
static int |
kFreeResize
Use this flag if the client can be resized to any size >= the minimum and <= the maximum. |
static int |
kHorizontalResize
Use this flag to allow the client's horizontal aspect to be any size, but the vertical axis will be the intial size of smaller. |
static int |
kInitialSize
Use this flag if the client should revert to its initially specified size. |
static int |
kInitialSizeNoResize
Use this flag specify that the client cannot be resized |
static int |
kIntegralResize
Use this flag if the client should maintain the aspect size of its original dimensions but grow bigger by integral increments (2x, 3x, 4x, etc.) |
static int |
kPerformanceResize
Use this flag if the client can be resized to any size which is a factor of 2 of the initial size. |
static int |
kVerticalResize
Use this flag to allow the client's vertical aspect to be any size, but the horizontal axis will be the intial size of smaller. |
static boolean |
useMacOSXAcceleration
|
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 | |
JQTCanvas()
Default Constructor for JQTCanvas |
|
JQTCanvas(int resizeFlag,
float xAlignment,
float yAlignment)
|
Method Summary | |
void |
addQTClientListener(java.awt.event.ComponentListener e)
A ComponentListener and ComponentEvent are used to listen to these types of events that occur to the QTCanvas' client - ie. |
java.awt.Image |
createImage(java.awt.image.ImageProducer producer)
|
void |
drawingComplete(QTDrawable drawable)
Called when a client is finished drawing and the canvas needs to be updated |
int |
getResizeFlag()
Returns the current setting of the resize flag being used. |
boolean |
isFlashScaling()
|
void |
paint(java.awt.Graphics g)
This method is invoked by Swing to draw this component |
void |
removeClient()
Removes the current client, a drawable object, from the canvas. |
void |
removeQTClientListener(java.awt.event.ComponentListener e)
Remove a previously registered ComponentListener that is listening to events that occur with the QTCanvas' QTDrawable client. |
void |
reshape(int x,
int y,
int width,
int height)
Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int) . |
void |
setAlignment(float x,
float y)
|
void |
setBounds(int x,
int y,
int width,
int height)
Moves and resizes this component. |
void |
setBounds(java.awt.Rectangle r)
Moves and resizes this component to conform to the new bounding rectangle r. |
void |
setClient(QTDrawable drawable,
boolean layoutFlag)
Associates a new client, a Drawable object, with this JQTCanvas. |
void |
setClient(QTDrawable cl,
QDRect initialBounds)
Associates a new client, a Drawable object, with this JQTCanvas. |
void |
setFlashScaling(boolean scale)
|
void |
setResizeFlag(int rFlag)
Reset the resize flag and re-layout the component. |
void |
setSize(java.awt.Dimension dim)
Resizes the JQTCanvas object to the specified parameters. |
void |
setSize(int width,
int height)
Resizes the JQTCanvas object, as well as the associated Drawable object. |
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, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, 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, updateUI |
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, 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, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int kIntegralResize
public static final int kInitialSize
public static final int kFreeResize
public static final int kAspectResize
public static final int kPerformanceResize
public static final int kHorizontalResize
public static final int kVerticalResize
public static final int kInitialSizeNoResize
public static boolean flashScaling
public static boolean useMacOSXAcceleration
public QTImageProducer ip
Constructor Detail |
public JQTCanvas()
public JQTCanvas(int resizeFlag, float xAlignment, float yAlignment)
Method Detail |
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void setFlashScaling(boolean scale)
public boolean isFlashScaling()
public void setClient(QTDrawable drawable, boolean layoutFlag) throws QTException
The size of the client when this method is called is used to ascertain the best size for viewing this client's media.
This method can throw a number of exceptions:
QTUnknownOSException the application is trying to run on a platform that is not supported by QuickTime
NativeGraphicsException the native graphics environment is not initialised
QTException or subclass - there was a problem within QuickTime itself in dealing with this client
client
- a Drawable object - if null the method will remove the clientlayoutFlag
- if true java.awt will re-layout the canvas, if false the client will fit
into the existing state (display size, etc) of the canvas, disregarding any resize that might
have occured to honour the layout flag setting with respect to the different size of the new client.
Keep in mind that only controllerless clients are validpublic void setClient(QTDrawable cl, QDRect initialBounds) throws QTException
This method can throw a number of exceptions:
QTUnknownOSException the application is trying to run on a platform that is not supported by QuickTime
NativeGraphicsException the native graphics environment is not initialised
QTException or subclass - there was a problem within QuickTime itself in dealing with this client
client
- a Drawable object - if null the method will remove the clientinitialBounds
- the best size of the client
Keep in mind that only controllerless clients are validpublic final void removeClient()
public java.awt.Image createImage(java.awt.image.ImageProducer producer)
createImage
in class java.awt.Component
public void setBounds(int x, int y, int width, int height)
setBounds
in class java.awt.Component
x
- the new x-coordinate of this componenty
- the new y-coordinate of this componentwidth
- the new width of this componentheight
- the new height of this componentsetBounds(Rectangle r)
public void setBounds(java.awt.Rectangle r)
setBounds
in class java.awt.Component
public void setSize(java.awt.Dimension dim)
setSize
in class java.awt.Component
dim
- a Dimension object with the new width and heightpublic void setSize(int width, int height)
setSize
in class java.awt.Component
width
- the width, in pixels, to make this componentheight
- the height, in pixels, to make this componentpublic final void reshape(int x, int y, int width, int height)
setBounds(int, int, int, int)
.
reshape
in class javax.swing.JComponent
public void setAlignment(float x, float y)
public void setResizeFlag(int rFlag)
rFlag
- the new value for the resizeFlagpublic int getResizeFlag()
public void drawingComplete(QTDrawable drawable)
drawingComplete
in interface DrawingListener
quicktime.app.display.DrawingListener
drawable
- the drawable which drawing has just been completed uponpublic void addQTClientListener(java.awt.event.ComponentListener e)
e
- the ComponentListenerpublic void removeQTClientListener(java.awt.event.ComponentListener e)
e
- the ComponentListeneraddQTClientListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |