Class DefaultDownloadIndicator

  • All Implemented Interfaces:
    DownloadIndicator

    public class DefaultDownloadIndicator
    extends java.lang.Object
    implements DownloadIndicator
    Show the progress of downloads.
    Version:
    $Revision: 1.3 $
    • Field Detail

      • LOG

        private static final Logger LOG
      • downloading

        private static final java.lang.String downloading
      • complete

        private static final java.lang.String complete
      • CLOSE_DELAY

        private static final int CLOSE_DELAY
        time to wait after completing but before window closes
        See Also:
        Constant Field Values
      • dialog

        private static javax.swing.JDialog dialog
        the display window
      • dialogMutex

        private static final java.lang.Object dialogMutex
      • vertical

        private static final java.awt.GridBagConstraints vertical
        shared constraint
      • verticalNoClean

        private static final java.awt.GridBagConstraints verticalNoClean
      • verticalIndent

        private static final java.awt.GridBagConstraints verticalIndent
    • Constructor Detail

      • DefaultDownloadIndicator

        public DefaultDownloadIndicator()
    • Method Detail

      • getListener

        public DownloadServiceListener getListener​(java.lang.String downloadName,
                                                   java.net.URL[] resources)
        Return a download service listener that displays the progress in a shared download info window.
        Specified by:
        getListener in interface DownloadIndicator
        Parameters:
        downloadName - name identifying the download to the user
        resources - initial urls to display (not required)
        Returns:
        download service listener attached to this app. instance
      • createDownloadIndicatorWindow

        private static javax.swing.JDialog createDownloadIndicatorWindow​(boolean undecorated)
                                                                  throws java.awt.HeadlessException
        Throws:
        java.awt.HeadlessException
      • placeFrameToLowerRight

        private static void placeFrameToLowerRight()
                                            throws java.awt.HeadlessException
        This places indicator to lower right corner of active monitor.
        Throws:
        java.awt.HeadlessException
      • disposeListener

        public void disposeListener​(DownloadServiceListener listener)
        Remove a download service listener that was obtained by calling the getDownloadListener method from the shared download info window.
        Specified by:
        disposeListener in interface DownloadIndicator
        Parameters:
        listener - the listener that is no longer in use