Package com.tagtraum.beatunes.inspection
Class Inspection
- java.lang.Object
-
- com.tagtraum.beatunes.inspection.Inspection
-
- All Implemented Interfaces:
DetailView
,View
,ApplicationComponent<BeaTunes>
public class Inspection extends Object implements ApplicationComponent<BeaTunes>, DetailView
Inspection manages inspectors, collecting solutions and allows to commit them.- Author:
- Hendrik Schreiber
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Inspection.DialogInspectionProgressListener
Provides a way forInspector
s to provide visual progress feedback.
-
Constructor Summary
Constructors Constructor Description Inspection(BeaTunes application)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)
int
callableSolutionCount()
void
clearCallableSolutions()
void
commitCallableSolutions()
void
commitCallableSolutions(List<CallableSolution> asyncSolutions)
static String
extractErrorMessage(Throwable e)
BeaTunes
getApplication()
Returns the main application component.String
getCallableSolutionsLabel()
com.tagtraum.beatunes.inspection.Inspection.CallableSolutionsModel
getCallableSolutionsModel()
float
getCommittingSolutionsProgress()
JComponent
getComponent()
The actual visual component for this view.String
getId()
Unique id for each instance of this object.IgnoredIssuesSet
getIgnoredIssuesSet()
Let's you get a set of issues the user chose to ignore.InspectionView
getInspectionView()
List<Issue>
getIssues(Long songId)
Icon
getSolutionIcon()
String
getStatusLabel()
Status label to show in the status bar when this component becomes visible.boolean
hasUncommittedSolutions()
boolean
ignore(Issue<?> issue)
Returns true, if the app is configured to ignore certain kinds of songs.void
init()
Initializes this component and its sub-components.void
inspect()
boolean
isCommittingSolutions()
boolean
isIndeterminateProgress()
Indicates that the current status is an operation with indeterminate progress which should be reflected in the rendering of the status bar.boolean
isInspecting()
void
removeCallableSolution(CallableSolution callableSolution)
void
setApplication(BeaTunes beaTunes)
Sets the main application component.void
setCommittingSolutions(boolean committingSolutions)
void
setCommittingSolutionsProgress(float committingSolutionsProgress)
void
setInspecting(boolean inspecting)
void
shutdown()
Shuts down this component and its sub-components.boolean
submit(CallableSolution callableSolution)
void
updateIgnoredSongIds()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tagtraum.beatunes.View
getFocusRoot
-
-
-
-
Constructor Detail
-
Inspection
public Inspection(BeaTunes application)
-
-
Method Detail
-
getComponent
public JComponent getComponent()
Description copied from interface:View
The actual visual component for this view.- Specified by:
getComponent
in interfaceView
- Returns:
- detail component
-
getInspectionView
public InspectionView getInspectionView()
-
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 interfaceDetailView
- Returns:
- true if an indeterminate progress indicator is supposed to be rendered
-
getStatusLabel
public String getStatusLabel()
Description copied from interface:DetailView
Status label to show in the status bar when this component becomes visible.- Specified by:
getStatusLabel
in interfaceDetailView
- Returns:
- label
- See Also:
MainWindow.getStatusLabel()
-
getSolutionIcon
public Icon getSolutionIcon()
-
setApplication
public void setApplication(BeaTunes beaTunes)
Description copied from interface:ApplicationComponent
Sets the main application component.- Specified by:
setApplication
in interfaceApplicationComponent<BeaTunes>
- Parameters:
beaTunes
- main application component
-
getApplication
public BeaTunes getApplication()
Description copied from interface:ApplicationComponent
Returns the main application component.- Specified by:
getApplication
in interfaceApplicationComponent<BeaTunes>
- Returns:
- application object
-
getId
public String getId()
Description copied from interface:ApplicationComponent
Unique id for each instance of this object.- Specified by:
getId
in interfaceApplicationComponent<BeaTunes>
- Returns:
- id
-
init
public void init()
Description copied from interface:ApplicationComponent
Initializes this component and its sub-components.- Specified by:
init
in interfaceApplicationComponent<BeaTunes>
-
shutdown
public void shutdown()
Description copied from interface:ApplicationComponent
Shuts down this component and its sub-components.- Specified by:
shutdown
in interfaceApplicationComponent<BeaTunes>
-
isInspecting
public boolean isInspecting()
-
setInspecting
public void setInspecting(boolean inspecting)
-
updateIgnoredSongIds
public void updateIgnoredSongIds()
-
getIgnoredIssuesSet
public IgnoredIssuesSet getIgnoredIssuesSet()
Let's you get a set of issues the user chose to ignore. Add your own and write the list, if you made changes.- Returns:
- set of ignored issues
-
removeCallableSolution
public void removeCallableSolution(CallableSolution callableSolution)
-
clearCallableSolutions
public void clearCallableSolutions()
-
submit
public boolean submit(CallableSolution callableSolution)
- Parameters:
callableSolution
- solution- Returns:
- true, if we were able to submit this solution
-
commitCallableSolutions
public void commitCallableSolutions()
-
commitCallableSolutions
public void commitCallableSolutions(List<CallableSolution> asyncSolutions)
-
isCommittingSolutions
public boolean isCommittingSolutions()
-
setCommittingSolutions
public void setCommittingSolutions(boolean committingSolutions)
-
getCommittingSolutionsProgress
public float getCommittingSolutionsProgress()
-
setCommittingSolutionsProgress
public void setCommittingSolutionsProgress(float committingSolutionsProgress)
-
getCallableSolutionsLabel
public String getCallableSolutionsLabel()
-
hasUncommittedSolutions
public boolean hasUncommittedSolutions()
-
callableSolutionCount
public int callableSolutionCount()
-
addPropertyChangeListener
public void addPropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)
-
getCallableSolutionsModel
public com.tagtraum.beatunes.inspection.Inspection.CallableSolutionsModel getCallableSolutionsModel()
-
inspect
public void inspect()
-
ignore
public boolean ignore(Issue<?> issue)
Returns true, if the app is configured to ignore certain kinds of songs. Issues are ignored, if any song it deals with should be ignored.- Parameters:
issue
- issue- Returns:
- true, if the issue is to be ignored
-
-