Class JhoveWindow

    • Field Detail

      • _logger

        protected Logger _logger
        Logger for a module class.
    • Constructor Detail

      • JhoveWindow

        public JhoveWindow​(App app,
                           JhoveBase base)
    • Method Detail

      • pickAndAnalyzeFile

        public void pickAndAnalyzeFile()
        Here we let the user pick a file, then analyze it.
      • makeChooserOpaque

        public static void makeChooserOpaque​(JFileChooser chooser)
        Makes a JFileChooser dialog treat Mac OS packages and applications as opaque entities. Has no effect on other platforms.
      • pickAndAnalyzeFile1

        public void pickAndAnalyzeFile1​(File file,
                                        Module module)
        This method does the actual work of pickAndAnalyzeFile, called from a thread so it can run asynchronously.
      • pickAndAnalyzeFileList1

        public void pickAndAnalyzeFileList1​(List<File> files,
                                            Module module)
        This is called to analyze a List of files.
      • getFileList

        public static List<File> getFileList​(File directory)
        Returns the list of files found by recursing through the given directory and all of its subdirectories.
      • pickAndAnalyzeURL

        public void pickAndAnalyzeURL()
        Here we let the user pick a URL, then analyze it.
      • pickAndAnalyzeURL1

        public void pickAndAnalyzeURL1​(String uri,
                                       Module module)
        This method does the actual work of pickAndAnalyzeURL, called from a thread so it can run asynchronously.
      • callback

        public int callback​(int selector,
                            Object parm)
        Implementation of Callback.callback.
        Specified by:
        callback in interface Callback
        Parameters:
        selector - 1 signifies update of byte count. 2 signifies change of URI. Other values result in no action.
        parm - If selector = 1, must be a Long that evaluates to the number of bytes processed to date. If selector = 2, must be a String naming the object being processed. Will be truncated at the left if longer than 64 characters.
      • setRawOutput

        public void setRawOutput​(boolean rawOutput)
        Sets the raw output flag. If set to true, raw numeric values are displayed; if false, explanatory text may be substituted.
      • setDoChecksum

        public void setDoChecksum​(boolean checksum)
        Sets the checksum flag. If set to true, checksums are reported.
      • dragEnter

        public void dragEnter​(DropTargetDragEvent dtde)
        Invoked when the drag enters the component. Accepts the drag if it's a file which is being dragged, and changes the background color to give visual feedback.
        Specified by:
        dragEnter in interface DropTargetListener
      • drop

        public void drop​(DropTargetDropEvent dtde)
        Called when the thingy is dropped on the component. This causes the file to be opened. The default background color will be restored; theoretically this should already have happened, but Windows appears to require it be done here.
        Specified by:
        drop in interface DropTargetListener
      • dropActionChanged

        public void dropActionChanged​(DropTargetDragEvent dtde)
        Called if the drop action changes during the drag (e.g., by changing the modifier keys). Does nothing, as we treat copy and move identically.
        Specified by:
        dropActionChanged in interface DropTargetListener
      • getCloseAllItem

        protected JMenuItem getCloseAllItem()
        Returns the "Close all document windows" menu item. This allows document windows to add themselves as listeners.