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 classInspection.DialogInspectionProgressListenerProvides a way forInspectors 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 voidaddPropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)intcallableSolutionCount()voidclearCallableSolutions()voidcommitCallableSolutions()voidcommitCallableSolutions(List<CallableSolution> asyncSolutions)static StringextractErrorMessage(Throwable e)BeaTunesgetApplication()Returns the main application component.StringgetCallableSolutionsLabel()com.tagtraum.beatunes.inspection.Inspection.CallableSolutionsModelgetCallableSolutionsModel()floatgetCommittingSolutionsProgress()JComponentgetComponent()The actual visual component for this view.StringgetId()Unique id for each instance of this object.IgnoredIssuesSetgetIgnoredIssuesSet()Let's you get a set of issues the user chose to ignore.InspectionViewgetInspectionView()List<Issue>getIssues(Long songId)IcongetSolutionIcon()StringgetStatusLabel()Status label to show in the status bar when this component becomes visible.booleanhasUncommittedSolutions()booleanignore(Issue<?> issue)Returns true, if the app is configured to ignore certain kinds of songs.voidinit()Initializes this component and its sub-components.voidinspect()booleanisCommittingSolutions()booleanisIndeterminateProgress()Indicates that the current status is an operation with indeterminate progress which should be reflected in the rendering of the status bar.booleanisInspecting()voidremoveCallableSolution(CallableSolution callableSolution)voidsetApplication(BeaTunes beaTunes)Sets the main application component.voidsetCommittingSolutions(boolean committingSolutions)voidsetCommittingSolutionsProgress(float committingSolutionsProgress)voidsetInspecting(boolean inspecting)voidshutdown()Shuts down this component and its sub-components.booleansubmit(CallableSolution callableSolution)voidupdateIgnoredSongIds()-
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:ViewThe actual visual component for this view.- Specified by:
getComponentin interfaceView- Returns:
- detail component
-
getInspectionView
public InspectionView getInspectionView()
-
isIndeterminateProgress
public boolean isIndeterminateProgress()
Description copied from interface:DetailViewIndicates that the current status is an operation with indeterminate progress which should be reflected in the rendering of the status bar.- Specified by:
isIndeterminateProgressin interfaceDetailView- Returns:
- true if an indeterminate progress indicator is supposed to be rendered
-
getStatusLabel
public String getStatusLabel()
Description copied from interface:DetailViewStatus label to show in the status bar when this component becomes visible.- Specified by:
getStatusLabelin interfaceDetailView- Returns:
- label
- See Also:
MainWindow.getStatusLabel()
-
getSolutionIcon
public Icon getSolutionIcon()
-
setApplication
public void setApplication(BeaTunes beaTunes)
Description copied from interface:ApplicationComponentSets the main application component.- Specified by:
setApplicationin interfaceApplicationComponent<BeaTunes>- Parameters:
beaTunes- main application component
-
getApplication
public BeaTunes getApplication()
Description copied from interface:ApplicationComponentReturns the main application component.- Specified by:
getApplicationin interfaceApplicationComponent<BeaTunes>- Returns:
- application object
-
getId
public String getId()
Description copied from interface:ApplicationComponentUnique id for each instance of this object.- Specified by:
getIdin interfaceApplicationComponent<BeaTunes>- Returns:
- id
-
init
public void init()
Description copied from interface:ApplicationComponentInitializes this component and its sub-components.- Specified by:
initin interfaceApplicationComponent<BeaTunes>
-
shutdown
public void shutdown()
Description copied from interface:ApplicationComponentShuts down this component and its sub-components.- Specified by:
shutdownin 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
-
-