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
ConstructorsConstructorDescriptionCreates 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 displayedvoidvoidThe implementing class must handle the drop event if one occurs.voidHandles the ShowGroupRequest by showing the groupvoidHandles the ShowQueryRequest by showing the query resultsvoidAssigns each of the ThumbnailControllers and ThumbnailDescriptionJPanels the appropriate node from the Browser being shown.voidresizeAllThumbnails(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:
nodeLayoutChangedin interfaceNodeNavigatorListener
-
handleJpoDropTargetDropEvent
Description copied from interface:JpoDropTargetDropEventHandlerThe implementing class must handle the drop event if one occurs.- Specified by:
handleJpoDropTargetDropEventin interfaceJpoDropTargetDropEventHandler- Parameters:
event- The drop event
-