public abstract class DiffControllerImpl extends Object
Modifier and Type | Field and Description |
---|---|
protected PropertyChangeSupport |
support
A PropertyChangeSupport instance.
|
Modifier | Constructor and Description |
---|---|
protected |
DiffControllerImpl()
Default constructor, does nothing.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener.
|
abstract int |
getDifferenceCount()
Gets total number of Differences between sources currently displayed in the Diff view.
|
int |
getDifferenceIndex()
Gets the current (highlighted) difference in the Diff view.
|
abstract JComponent |
getJComponent()
Retrieves visual presenter of the Diff.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener.
|
protected void |
setDifferenceIndex(int idx)
Implementors use this method to set the current (highlighted) difference.
|
void |
setLocation(DiffController.DiffPane pane,
DiffController.LocationType type,
int location)
Ensure the requested location in the Diff view is visible on screen.
|
protected final PropertyChangeSupport support
protected DiffControllerImpl()
public void setLocation(DiffController.DiffPane pane, DiffController.LocationType type, int location)
pane
- defines which pane the location parameter refers totype
- defines the location parameter, see belowlocation
- depending on the type parameter this defines either a line number or a Difference index, both 0-basedIllegalArgumentException
- if location parameter is out of range for the given pane and location typepublic abstract JComponent getJComponent()
public abstract int getDifferenceCount()
public final int getDifferenceIndex()
protected final void setDifferenceIndex(int idx)
idx
- a new current difference indoxpublic final void addPropertyChangeListener(PropertyChangeListener listener)
listener
- property change listenerpublic final void removePropertyChangeListener(PropertyChangeListener listener)
listener
- property change listener