Class FileField.ImagePreviewAccessory

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible
Enclosing class:
FileField

public static class FileField.ImagePreviewAccessory extends JPanel implements PropertyChangeListener
An example accessory component that can be supplied to the setAccessory method. This component will show a small image preview right in the file chooser if the selected file is an image file.
Since:
swing-extras 2.5
Author:
scorbo2
See Also:
  • Constructor Details

    • ImagePreviewAccessory

      public ImagePreviewAccessory()
  • Method Details

    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      When the selected file changes, try to parse and load it as an image, and show it in our preview panel. If an image can't be loaded, blank out the preview.
      Specified by:
      propertyChange in interface PropertyChangeListener