Class LineLockedFieldPanelCoordinator
java.lang.Object
docking.widgets.fieldpanel.internal.FieldPanelCoordinator
docking.widgets.fieldpanel.internal.LineLockedFieldPanelCoordinator
- All Implemented Interfaces:
ViewListener
- Direct Known Subclasses:
LayoutLockedFieldPanelCoordinator
A LineLockedFieldPanelCoordinator coordinates the scrolling of a set of field panels by sharing
bound scroll models that are locked together by a set of line numbers.
All the field panels are locked together at the line numbers specified in the locked line array.
In other words this coordinator tries to keep the indicated line for each field panel
side by side with the indicated line for each other field panel.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(FieldPanel fp) Adds the given field panel to the list of panels to coordinate.protected BigInteger
Gets the locked line value for the indicated panel.void
lockLines
(BigInteger... newLockedLines) Call this method whenever you want to change the line numbers that are locked together for the associated field panels.void
remove
(FieldPanel fp) Removes the given field panel from the list of those to be coordinated.void
Resets the locked line numbers for this field panel coordinator to their default of each being zero.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 docking.widgets.fieldpanel.internal.FieldPanelCoordinator
dispose
-
Field Details
-
lockedLineNumbers
-
-
Constructor Details
-
LineLockedFieldPanelCoordinator
-
-
Method Details
-
resetLockedLines
public void resetLockedLines()Resets the locked line numbers for this field panel coordinator to their default of each being zero. -
lockLines
Call this method whenever you want to change the line numbers that are locked together for the associated field panels.- Parameters:
newLockedLines
- the array of locked line numbers that are directly associated with the array of field panels.
Important: Make sure the line numbers are in the order that matches the field panels in the array.
-
add
Adds the given field panel to the list of panels to coordinate.- Overrides:
add
in classFieldPanelCoordinator
- Parameters:
fp
- the field panel to add.
-
remove
Removes the given field panel from the list of those to be coordinated.- Overrides:
remove
in classFieldPanelCoordinator
-
viewChanged
Description copied from interface:ViewListener
Notifies the listener that the top of the screen has changed position.- Specified by:
viewChanged
in interfaceViewListener
- Overrides:
viewChanged
in classFieldPanelCoordinator
- 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.
-
getLockedLineForPanel
Gets the locked line value for the indicated panel.- Parameters:
fp
- the field panel whose locked line value is wanted.- Returns:
- the locked line value or null if the panel isn't found.
-