java.lang.Object
org.jpo.gui.ThumbnailsPanelController
- All Implemented Interfaces:
NodeNavigatorListener
,JpoDropTargetDropEventHandler
public class ThumbnailsPanelController
extends Object
implements NodeNavigatorListener, JpoDropTargetDropEventHandler
The ThumbnailPanelController manages a JPanel in a JScrollPane that displays
a group of pictures in a grid of thumbnailControllers or ad hoc search
results. Real pictures are shown as a thumbnail of the image whilst groups
are shown as a folder icon. Each thumbnail has its caption under the image.
If the size of the component is changed the images are re-laid out and can take advantage of the extra space if there is some.
-
Constructor Summary
ConstructorDescriptionCreates a new ThumbnailPanelController which in turn creates the view objects and hooks itself up so that thumbnails can be shown -
Method Summary
Modifier and TypeMethodDescriptiongetView()
Returns a component to be displayedvoid
void
The implementing class must handle the drop event if one occurs.void
Handles the ShowGroupRequest by showing the groupvoid
Handles the ShowQueryRequest by showing the query resultsvoid
Assigns each of the ThumbnailControllers and ThumbnailDescriptionJPanels the appropriate node from the Browser being shown.void
resizeAllThumbnails
(float thumbnailSizeFactor)
-
Constructor Details
-
ThumbnailsPanelController
public ThumbnailsPanelController()Creates a new ThumbnailPanelController which in turn creates the view objects and hooks itself up so that thumbnails can be shown
-
-
Method Details
-
resizeAllThumbnails
public void resizeAllThumbnails(float thumbnailSizeFactor) -
getView
Returns a component to be displayed- Returns:
- The JScollPane widget
-
handleShowGroupRequest
Handles the ShowGroupRequest by showing the group- Parameters:
event
- the ShowGroupRequest
-
handleShowQueryRequest
Handles the ShowQueryRequest by showing the query results- Parameters:
event
- the ShowQueryRequest
-
handleCollectionLockNotification
-
nodeLayoutChanged
public void nodeLayoutChanged()Assigns each of the ThumbnailControllers and ThumbnailDescriptionJPanels the appropriate node from the Browser being shown.It also sets the title of the JScrollPane.
- Specified by:
nodeLayoutChanged
in interfaceNodeNavigatorListener
-
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
-