public final class JVideoScreen
extends javax.swing.JComponent
implements javax.swing.SwingConstants
JVideoScreen - video screen.| Modifier and Type | Class and Description |
|---|---|
static class |
JVideoScreen.AnimationOverlay
AnimationOverlay - animation overlay. |
static class |
JVideoScreen.ImageOverlay
ImageOverlay - static image overlay. |
javax.swing.JComponent.AccessibleJComponentaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
JVideoScreen()
Constructor.
|
JVideoScreen(java.awt.Dimension preferredSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flip(boolean flip)
Set
true to flip video frame vertically. |
java.util.List<JVideoScreen.AnimationOverlay> |
getAnimationOverlays()
Returns animation list.
|
boolean |
getAutoScaleOnResize()
Returns auto scale flag.
|
static java.awt.Dimension |
getDefaultFrameSize()
Returns default frame size.
|
boolean |
getFlipFlag()
Returns 'flip' flag value (set by
flip(boolean) method). |
java.awt.Dimension |
getFrameSize()
Returns the frame size.
|
java.util.List<JVideoScreen.ImageOverlay> |
getImageOverlays()
Returns overlays list.
|
boolean |
getMirrorFlag()
Returns 'mirror' flag value (set by
mirror(boolean) method). |
double |
getScaleFactor()
Returns video scale factor.
|
void |
mirror(boolean mirror)
Sets
true to mirror video frame. |
void |
paintComponent(java.awt.Graphics g) |
void |
scale(double scale)
Sets video scale factor.
|
void |
setAutoScaleOnResize(boolean auto)
Set
true to scale the frame on component resize;
otherwise false. |
void |
setBounds(int x,
int y,
int width,
int height) |
void |
setFrame(VideoFrame frame)
Sets the frame to be rendered.
|
void |
setFrameColorModel(java.awt.image.ColorModel colorModel)
Sets
colorModel to be used for
video frame rendering. |
void |
setFrameCropOffset(java.awt.Insets frameCropOffset)
Sets frame crop offset.
|
void |
setFrameSize(int width,
int height)
Sets frame size.
|
void |
setImage(java.awt.Image image)
Sets still image to be shown.
|
void |
setSubtitle(java.lang.String subtitle)
Sets subtitle.
|
void |
setSubtitle(java.lang.String[] subtitle)
Sets subtitle.
|
void |
setSubtitleAlignment(int alignment)
Sets subtitle alignment.
|
void |
setSubtitleColor(java.awt.Color color)
Sets subtitle color.
|
void |
setSubtitleFont(java.awt.Font font)
Sets subtitle font.
|
void |
setVisible(boolean flag) |
void |
update(java.awt.Graphics g) |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, 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, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateUIadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic JVideoScreen()
public JVideoScreen(java.awt.Dimension preferredSize)
preferredSize - public static final java.awt.Dimension getDefaultFrameSize()
public java.util.List<JVideoScreen.AnimationOverlay> getAnimationOverlays()
Note:
- You can add/delete overlays to this list.
public boolean getAutoScaleOnResize()
public boolean getFlipFlag()
flip(boolean) method).public java.awt.Dimension getFrameSize()
public java.util.List<JVideoScreen.ImageOverlay> getImageOverlays()
Note:
- You can add/delete overlays to this list.
public boolean getMirrorFlag()
mirror(boolean) method).public double getScaleFactor()
public void flip(boolean flip)
true to flip video frame vertically.flip - flip parameterpublic void mirror(boolean mirror)
true to mirror video frame.mirror - mirror parameterpublic void scale(double scale)
scale - scale factorpublic void setAutoScaleOnResize(boolean auto)
true to scale the frame on component resize;
otherwise false.auto - auto scale flagpublic void setFrame(VideoFrame frame)
frame - framepublic void setFrameColorModel(java.awt.image.ColorModel colorModel)
colorModel to be used for
video frame rendering.colorModel - color model for frame renderingpublic void setFrameCropOffset(java.awt.Insets frameCropOffset)
frameCropOffset - public void setFrameSize(int width,
int height)
width - frame widthheight - frame heightpublic void setImage(java.awt.Image image)
image - image to be shownpublic void setSubtitle(java.lang.String subtitle)
subtitle - public void setSubtitle(java.lang.String[] subtitle)
subtitle - public void setSubtitleAlignment(int alignment)
alignment - public void setSubtitleColor(java.awt.Color color)
color - public void setSubtitleFont(java.awt.Font font)
font - public void setBounds(int x,
int y,
int width,
int height)
setBounds in class java.awt.Componentpublic void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void setVisible(boolean flag)
setVisible in class javax.swing.JComponentpublic void update(java.awt.Graphics g)
update in class javax.swing.JComponent