public class ScreencaptureMovingImageFactory extends Object implements DockableMovingImageFactory
Dockable which will be represented
by its MovingImage.| Constructor and Description |
|---|
ScreencaptureMovingImageFactory(Dimension max)
Creates a new factory.
|
ScreencaptureMovingImageFactory(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.
|
BufferedImage |
createImageFrom(DockController controller,
Component c)
This method creates a new image that contains the contents of
c. |
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(Dimension max)
max - the maximal size of the images created by this factory, or null
for not having a maximum sizepublic ScreencaptureMovingImageFactory(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)
DockableMovingImageFactorysnatched.create in interface DockableMovingImageFactorycontroller - The controller which will be responsible for the titlesnatched - The title which is grabbed by the usernullpublic MovingImage create(DockController controller, Dockable dockable)
DockableMovingImageFactorydockable.create in interface DockableMovingImageFactorycontroller - The controller which will be responsible for the titledockable - The Dockable which is snatchednullpublic 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.AWTComponentCaptureStrategypublic BufferedImage createImageFrom(DockController controller, 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.AWTComponentCaptureStrategyCopyright © 2017 Docking Frames. All rights reserved.