Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.diff/1 1.15.22 42
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.api.diff
Interface DiffView

    public interface DiffView

Controller interface that allows external code to control the DIFF component.

Field Summary
`static String` | `PROP_DIFF_COUNT` This property is fired when the difference count has changed.

Method Summary
`void` | `addPropertyChangeListener(PropertyChangeListener l)` Add a property change listener.
`boolean` | `canSetCurrentDifference()` Test whether this view can change the current difference.
`Component` | `getComponent()` Gets the visual DIFF component that modules can include in their GUI.
`int` | `getCurrentDifference()` Get the current difference that is displayed in the view.
`int` | `getDifferenceCount()` Gets the number of differences found in sources.
`JToolBar` | `getToolBar()` Get a toolbar, that is adviced to be displayed together with the component obtained from `getComponent()`.
`void` | `removePropertyChangeListener(PropertyChangeListener l)` Remove a property change listener.
`void` | `setCurrentDifference(int diffNo)` Instructs the DIFF view to navigate to the n-th difference.

Field Detail

### PROP_DIFF_COUNT

    static final String PROP_DIFF_COUNT

  This property is fired when the difference count has changed.

  See Also:
    Constant Field Values

Method Detail

### 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

    void setCurrentDifference(int diffNo)
                              throws UnsupportedOperationException

  Instructs the DIFF view to navigate to the n-th difference.

  Parameters:
    `diffNo` - The difference number (-1 means hide current difference visualization)
  Throws:
    `UnsupportedOperationException` - iff `canSetCurrentDifference()` returns `false`.

### getCurrentDifference

    int getCurrentDifference()
                             throws UnsupportedOperationException

  Get the current difference that is displayed in the view.

  Returns:
    The current difference number
  Throws:
    `UnsupportedOperationException` - iff `canSetCurrentDifference()` returns `false`.

### getToolBar

    JToolBar getToolBar()

  Get a toolbar, that is adviced to be displayed together with the component obtained from `getComponent()`.

  Returns:
    the toolbar or `null` when no toolbar is provided by this view.

### addPropertyChangeListener

    void addPropertyChangeListener(PropertyChangeListener l)

  Add a property change listener.

  Parameters:
    `l` - The property change listener

### removePropertyChangeListener

    void removePropertyChangeListener(PropertyChangeListener l)

  Remove a property change listener.

  Parameters:
    `l` - The property change listener

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.diff/1 1.15.22 42
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.