Module org.jpo
Package org.jpo.gui

Class ThumbnailsPanelController

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 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

      public Component getView()
      Returns a component to be displayed
      Returns:
      The JScollPane widget
    • handleShowGroupRequest

      public void handleShowGroupRequest(ShowGroupRequest event)
      Handles the ShowGroupRequest by showing the group
      Parameters:
      event - the ShowGroupRequest
    • handleShowQueryRequest

      public void handleShowQueryRequest(ShowQueryRequest event)
      Handles the ShowQueryRequest by showing the query results
      Parameters:
      event - the ShowQueryRequest
    • handleCollectionLockNotification

      public void handleCollectionLockNotification(CollectionLockNotification event)
    • 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 interface NodeNavigatorListener
    • handleJpoDropTargetDropEvent

      public void handleJpoDropTargetDropEvent(DropTargetDropEvent event)
      Description copied from interface: JpoDropTargetDropEventHandler
      The implementing class must handle the drop event if one occurs.
      Specified by:
      handleJpoDropTargetDropEvent in interface JpoDropTargetDropEventHandler
      Parameters:
      event - The drop event