Class Inspector

    • Constructor Detail

      • Inspector

        protected Inspector​(BeaTunes application)
    • Method Detail

      • createIcon

        protected Icon createIcon()
      • createDisabledIcon

        protected Icon createDisabledIcon()
      • getIcon

        public Icon getIcon()
      • getComponent

        public JComponent getComponent()
        Description copied from interface: View
        The actual visual component for this view.
        Specified by:
        getComponent in interface View
        detail component
      • getFocusRoot

        public JComponent getFocusRoot()
        Description copied from interface: View
        The component that should be focused by default, when view is shown.
        Specified by:
        getFocusRoot in interface View
      • isIndeterminateProgress

        public boolean isIndeterminateProgress()
        Description copied from interface: DetailView
        Indicates that the current status is an operation with indeterminate progress which should be reflected in the rendering of the status bar.
        Specified by:
        isIndeterminateProgress in interface DetailView
        true if an indeterminate progress indicator is supposed to be rendered
      • getInspection

        public Inspection getInspection()
      • isPartiallyEnabled

        public boolean isPartiallyEnabled()
        Indicates that some Inspectors are enabled while others aren't. Only meaningful for InspectorCategory. Default returns false.
        true or false
      • isEnabled

        public boolean isEnabled()
        Is this inspector enabled?
        true or false
      • setEnabled

        public void setEnabled​(boolean enabled)
        Enables/disables this inspector.
        enabled - true or false
      • isAvailable

        public boolean isAvailable()
        Indicates whether this Inspector is available at all. E.g. an Inspector could be unavailable for libraries specified by FileSystemLibraryDescriptor, but available for iTunes specific libraries (ITunesLibraryDescriptor). Or available for macOS, but not for Windows....
        true or false
      • setAvailable

        public void setAvailable​(boolean available)
        Sets availability.
        available - true or false
        See Also:
      • getCategory

        public String getCategory()
        Indicates the inspection's category or grouping. By default this returns GENERAL.
        category, by default General
      • getInspectorCategory

        public InspectorCategory getInspectorCategory()
        Returns the InspectorCategory for this Inspector
        the InspectorCategory or null of none can be found.
      • getId

        public String getId()
        Unique idea for a configured instance of this class. The id has to be the same, if the configuration is the same. I.e. it has to be persistent. The default implementation assumes a stateless Inspector, so the class name is used as id.
        Specified by:
        getId in interface ApplicationComponent<BeaTunes>
        id of this inspector instance
      • getName

        public abstract String getName()
        Inspector name.
        descriptive name for this inspector meant for the UI
      • getDescription

        public abstract String getDescription()
        Inspector description.
        long description about this inspector meant for the UI
      • getPropertyName

        public abstract String getPropertyName()
        Indicates which property is inspected by this inspector. This will be used when highlighting said property in views of a song that has issues.
        property name
      • performInspection

        public void performInspection()
        Inspects the given songs for problems of a specific kind. Found issues are accessible through the issues property. This method is asynchronous and returns immediately. Progress (start/stop) can be tracked through the property inspecting.
        See Also:
        getIssues(), addIssue(Issue)
      • getInspectionProgress

        public float getInspectionProgress()
      • setInspectionProgress

        public void setInspectionProgress​(float inspectionProgress)
      • isInspecting

        public boolean isInspecting()
      • isBeforeFirstInspection

        public boolean isBeforeFirstInspection()
        Indicates whether this this inspector has been used before.
        true or false
      • getIssues

        public List<Issue<?>> getIssues()
      • issueCount

        public int issueCount()
        Number of issues. This property can be followed by adding a property change listener.
        number of current issues
      • addIssues

        protected void addIssues​(Collection<Issue<?>> issues)
        To be used by subclasses to add multiple issues. This method is a lot more efficient than addIssue(Issue) when adding a lot of issues, because the UI is only updated once and not for every single issue individually. Issues may be ignore, if Inspection.ignore(Issue) returns true.
        issues - issues
      • removeIssue

        public void removeIssue​(Issue<?> issue)
      • clearIssues

        protected void clearIssues()
        To be used by subclasses. Should be called before rebuilding the issue list. This also resets the cancel flag to false.
        See Also:
      • refreshLocations

        protected void refreshLocations​(List<Track> trackList)
        AudioSong objects update their location automatically
        Refreshes the location of a Song object. Necessary, after manipulating name or artist.
        trackList - list of tracks that may now have a different location.
      • cancel

        public void cancel()
        Called by the UI. Do not call this yourself.
      • isCancelled

        public boolean isCancelled()
        Lets the Inspector check whether an ongoing inspection was cancelled by the user.
        true, of the user cancelled the inspection
        See Also: