Package docking.widgets.fieldpanel.internal

# Class FieldPanelScrollCoordinator

java.lang.Object
docking.widgets.fieldpanel.internal.FieldPanelScrollCoordinator

All Implemented Interfaces:
  `ViewListener`

Direct Known Subclasses:
  `LineLockedFieldPanelScrollCoordinator`

public class FieldPanelScrollCoordinator extends Object implements ViewListener
Coordinates the scrolling of a set of field panels by sharing bound scroll models.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FieldPanelScrollCoordinator(FieldPanel[] panels)`
  Constructs a new FieldPanelCoordinatro to synchronize the scrolling of the given field panels.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(FieldPanel fp)`
  Adds the given field panel to the list of panels to synchronize.
  `void`
  `dispose()`
  Cleans up resources.
  `protected FieldPanel`
  `getOtherPanel(FieldPanel fp)`
  `void`
  `remove(FieldPanel fp)`
  Removes the given field panel from the list to be synchronized.
  `void`
  `viewChanged(FieldPanel fp, BigInteger index, int xPos, int yPos)`
  Notifies the listener that the top of the screen has changed position.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FieldPanelScrollCoordinator

    public FieldPanelScrollCoordinator(FieldPanel[] panels)
    Constructs a new FieldPanelCoordinatro to synchronize the scrolling of the given field panels.
    Parameters:
      `panels` - the array of panels to synchronize.

- ## Method Details

  - ### getOtherPanel

    protected FieldPanel getOtherPanel(FieldPanel fp)

  - ### dispose

    public void dispose()
    Cleans up resources.

  - ### add

    public void add(FieldPanel fp)
    Adds the given field panel to the list of panels to synchronize.
    Parameters:
      `fp` - the field panel to add.

  - ### remove

    public void remove(FieldPanel fp)
    Removes the given field panel from the list to be synchronized.

  - ### viewChanged

    public void viewChanged(FieldPanel fp, BigInteger index, int xPos, int yPos)
    Description copied from interface: `ViewListener`
    Notifies the listener that the top of the screen has changed position.
    Specified by:
      `viewChanged` in interface `ViewListener`
    Parameters:
      `fp` - the field panel whose view changed.
      `index` - the index of the layout at the top of the screen.
      `xPos` - the x coordinate of the layout displayed at the left of the screen.
      `yPos` - the y coordinate of the layout displayed at the top of the screen.