public class ScreencaptureMovingImageFactory extends java.lang.Object implements DockableMovingImageFactory
Dockable
which will be represented
by its MovingImage
.Constructor and Description |
---|
ScreencaptureMovingImageFactory(java.awt.Dimension max)
Creates a new factory.
|
ScreencaptureMovingImageFactory(java.awt.Dimension max,
float alpha)
Creates a new factory.
|
Modifier and Type | Method and Description |
---|---|
MovingImage |
create(DockController controller,
Dockable dockable)
Gets an image which will be shown underneath the cursor.
|
MovingImage |
create(DockController controller,
DockTitle snatched)
Gets an image which will be shown underneath the cursor.
|
java.awt.image.BufferedImage |
createImageFrom(DockController controller,
java.awt.Component c)
This method creates a new image that contains the contents of
c . |
java.awt.image.BufferedImage |
createImageFrom(DockController controller,
Dockable dockable)
This method creates a new image that contains the contents of
dockable . |
float |
getAlpha()
Gets the transparency.
|
void |
setAlpha(float alpha)
Set the transparency of this image, where 0 means completely transparent and 1 means completely
opaque
|
public ScreencaptureMovingImageFactory(java.awt.Dimension max)
max
- the maximal size of the images created by this factory, or null
for not having a maximum sizepublic ScreencaptureMovingImageFactory(java.awt.Dimension max, float alpha)
max
- the maximal size of the images created by this factory, or null
for not having a maximum sizealpha
- the transparency of this image, where 0 means completely transparent and 1 means completely
opaquepublic void setAlpha(float alpha)
alpha
- the strength of the imagepublic float getAlpha()
public MovingImage create(DockController controller, DockTitle snatched)
DockableMovingImageFactory
snatched
.create
in interface DockableMovingImageFactory
controller
- The controller which will be responsible for the titlesnatched
- The title which is grabbed by the usernull
public MovingImage create(DockController controller, Dockable dockable)
DockableMovingImageFactory
dockable
.create
in interface DockableMovingImageFactory
controller
- The controller which will be responsible for the titledockable
- The Dockable which is snatchednull
public java.awt.image.BufferedImage createImageFrom(DockController controller, Dockable dockable)
dockable
.controller
- the controller for which the image is madedockable
- the element whose image should be takendockable
which is not larger than the
maximum Dimension
that was given to this factory in the
constructor.AWTComponentCaptureStrategy
public java.awt.image.BufferedImage createImageFrom(DockController controller, java.awt.Component c)
c
.controller
- the controller for which the image is madec
- the Component
whose image should be takenc
which is not larger than the
maximum Dimension
that was given to this factory in the
constructor.AWTComponentCaptureStrategy