Interface DiffView
public interface DiffView
Controller interface that allows external code to control the DIFF component.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
This property is fired when the difference count has changed. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a property change listener.boolean
Test whether this view can change the current difference.Gets the visual DIFF component that modules can include in their GUI.int
Get the current difference that is displayed in the view.int
Gets the number of differences found in sources.Get a toolbar, that is adviced to be displayed together with the component obtained fromgetComponent()
.void
Remove a property change listener.void
setCurrentDifference
(int diffNo) Instructs the DIFF view to navigate to the n-th difference.
-
Field Details
-
PROP_DIFF_COUNT
This property is fired when the difference count has changed.- See Also:
-
-
Method Details
-
getComponent
Component getComponent()Gets the visual DIFF component that modules can include in their GUI.- Returns:
- Component
-
getDifferenceCount
int getDifferenceCount()Gets the number of differences found in sources.- Returns:
- int
-
canSetCurrentDifference
boolean canSetCurrentDifference()Test whether this view can change the current difference. This is expected to be true when the view has a visual indication of the current difference. -
setCurrentDifference
Instructs the DIFF view to navigate to the n-th difference.- Parameters:
diffNo
- The difference number (-1 means hide current difference visualization)- Throws:
UnsupportedOperationException
- iffcanSetCurrentDifference()
returnsfalse
.
-
getCurrentDifference
Get the current difference that is displayed in the view.- Returns:
- The current difference number
- Throws:
UnsupportedOperationException
- iffcanSetCurrentDifference()
returnsfalse
.
-
getToolBar
JToolBar getToolBar()Get a toolbar, that is adviced to be displayed together with the component obtained fromgetComponent()
.- Returns:
- the toolbar or
null
when no toolbar is provided by this view.
-
addPropertyChangeListener
Add a property change listener.- Parameters:
l
- The property change listener
-
removePropertyChangeListener
Remove a property change listener.- Parameters:
l
- The property change listener
-