站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

DiffControllerImpl (Diff) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.diff/1 1.18.0 42

org.netbeans.spi.diff
Class DiffControllerImpl

java.lang.Object
  extended by org.netbeans.spi.diff.DiffControllerImpl

public abstract class DiffControllerImpl
extends Object

Provider class for DiffController, encapsulates a single Diff panel that displays differences between two files (sources).

Since:
1.18

Field Summary
protected  PropertyChangeSupport support
          A PropertyChangeSupport instance.
 
Constructor Summary
protected DiffControllerImpl()
          Default constructor, does nothing.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

support

protected final PropertyChangeSupport support
A PropertyChangeSupport instance.

Constructor Detail

DiffControllerImpl

protected DiffControllerImpl()
Default constructor, does nothing.

Method Detail

setLocation

public void setLocation(DiffController.DiffPane pane,
                        DiffController.LocationType type,
                        int location)
Ensure the requested location in the Diff view is visible on screen. Diff view can be requested to jump to a given line in either source or to a given Difference. Diff controller may ignore the request if it does not support this functionality. This method must be called from AWT thread.

Parameters:
pane - defines which pane the location parameter refers to
type - defines the location parameter, see below
location - depending on the type parameter this defines either a line number or a Difference index, both 0-based
Throws:
IllegalArgumentException - if location parameter is out of range for the given pane and location type

getJComponent

public abstract JComponent getJComponent()
Retrieves visual presenter of the Diff.

Returns:
JComponent component to be embedded into client UI

getDifferenceCount

public abstract int getDifferenceCount()
Gets total number of Differences between sources currently displayed in the Diff view.

Returns:
total number of Differences in sources, an integer >= 0

getDifferenceIndex

public final int getDifferenceIndex()
Gets the current (highlighted) difference in the Diff view.

Returns:
current difference index or -1 of there is no Current difference

setDifferenceIndex

protected final void setDifferenceIndex(int idx)
Implementors use this method to set the current (highlighted) difference.

Parameters:
idx - a new current difference indox

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener.

Parameters:
listener - property change listener

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener.

Parameters:
listener - property change listener

org.netbeans.modules.diff/1 1.18.0 42

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.