java.lang.Object
org.jpo.gui.ThumbnailController
- All Implemented Interfaces:
ThumbnailQueueRequestCallbackHandler
,JpoDropTargetDropEventHandler
public class ThumbnailController
extends Object
implements JpoDropTargetDropEventHandler, ThumbnailQueueRequestCallbackHandler
ThumbnailController controls a visual representation of the specified node.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
callbackThumbnailCreated
(ThumbnailQueueRequest thumbnailQueueRequest) Entry point for the callback handlervoid
determines if the thumbnail is part of the mail selection and changes the drawMailIcon flag to ensure that the mail icon will be place over the image.getNode()
Returns the node for which the controller is actingreturns the Thumbnail that is being controlled by this Controller.void
The implementing class must handle the drop event if one occurs.boolean
isAlreadyDisplayingNode
(NodeNavigatorInterface nodeNavigator, int index) Returns to the caller whether this ThumbnailController is already linked to the specified node.void
setDecorateThumbnails
(boolean decorateThumbnails) Determines whether decorations should be drawn or notvoid
setFactor
(float thumbnailSizeFactor) This method sets the scaling factor for the display of a thumbnail.void
setNode
(NodeNavigatorInterface mySetOfNodes, int index) Sets the node being visualised by this ThumbnailController object.void
setShowTimestamp
(boolean show)
-
Constructor Details
-
ThumbnailController
public ThumbnailController(int thumbnailSize) Constructor- Parameters:
thumbnailSize
- The size in which the thumbnail is to be created
-
-
Method Details
-
getNode
Returns the node for which the controller is acting- Returns:
- the node
-
getThumbnail
returns the Thumbnail that is being controlled by this Controller.- Returns:
- the Thumbnail
-
setShowTimestamp
public void setShowTimestamp(boolean show) -
callbackThumbnailCreated
Entry point for the callback handler- Specified by:
callbackThumbnailCreated
in interfaceThumbnailQueueRequestCallbackHandler
- Parameters:
thumbnailQueueRequest
- The request from the queue
-
setFactor
public void setFactor(float thumbnailSizeFactor) This method sets the scaling factor for the display of a thumbnail. 0..1- Parameters:
thumbnailSizeFactor
- Factor
-
setDecorateThumbnails
public void setDecorateThumbnails(boolean decorateThumbnails) Determines whether decorations should be drawn or not- Parameters:
decorateThumbnails
- Whether to decorate
-
determineMailSelectionStatus
public void determineMailSelectionStatus()determines if the thumbnail is part of the mail selection and changes the drawMailIcon flag to ensure that the mail icon will be place over the image. -
handleJpoDropTargetDropEvent
Description copied from interface:JpoDropTargetDropEventHandler
The implementing class must handle the drop event if one occurs.- Specified by:
handleJpoDropTargetDropEvent
in interfaceJpoDropTargetDropEventHandler
- Parameters:
event
- The drop event
-