Interface IndexedScrollable
- All Known Implementing Classes:
FieldPanel
public interface IndexedScrollable
Interface for scrolling a FieldPanel or container of a group of FieldPanels which displays
a list of displayable items (layouts)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addIndexScrollListener
(IndexScrollListener listener) Adds a listener to be notified when the view is scrolled in any way.int
getHeight
(BigInteger index) Returns the height of the n'th item.getIndexAfter
(BigInteger index) Returns the index of the next non-null item.getIndexBefore
(BigInteger index) Returns the index of the previous non-null item.Returns the number individually addressable items displayed.boolean
Returns true if all the items are the same vertical size.void
mouseWheelMoved
(double preciseWheelRotation, boolean isHorizontal) Notify the scrollable that the mouse wheel was moved.void
removeIndexScrollListener
(IndexScrollListener listener) Removes the given listener from those to be notified when the view changes.void
Scrolls the displayed items down by the height of one line of textvoid
Scrolls the displayed items up by the height of one line of textvoid
Scrolls the displayed items down by the height of one screen of textvoid
Scrolls the displayed items up by the height of one screen of textvoid
showIndex
(BigInteger index, int verticalOffset) Makes the item at the given index be visible on the screen at the given vertical offset
-
Method Details
-
getIndexCount
BigInteger getIndexCount()Returns the number individually addressable items displayed.- Returns:
- the number individually addressable items displayed
-
isUniformIndex
boolean isUniformIndex()Returns true if all the items are the same vertical size.- Returns:
- true if all the items are the same vertical size
-
getHeight
Returns the height of the n'th item.- Parameters:
index
- the index of the time to get height for- Returns:
- the height of the n'th item.
-
showIndex
Makes the item at the given index be visible on the screen at the given vertical offset- Parameters:
index
- the index of the item to showverticalOffset
- the number of pixels from the top of the screen to show the item
-
getIndexAfter
Returns the index of the next non-null item. Not all indexes have items. Some items span multiple indexes- Parameters:
index
- the index to start searching for the next non-null item- Returns:
- the index of the next non-null item, or -1 if there is none
-
getIndexBefore
Returns the index of the previous non-null item. Not all indexes have items. Some items span multiple indexes- Parameters:
index
- the index to start searching backwards for the previous non-null item- Returns:
- the index of the previous non-null item, or -1 if there is none
-
scrollLineUp
void scrollLineUp()Scrolls the displayed items up by the height of one line of text -
scrollLineDown
void scrollLineDown()Scrolls the displayed items down by the height of one line of text -
scrollPageUp
void scrollPageUp()Scrolls the displayed items up by the height of one screen of text -
scrollPageDown
void scrollPageDown()Scrolls the displayed items down by the height of one screen of text -
addIndexScrollListener
Adds a listener to be notified when the view is scrolled in any way.- Parameters:
listener
- the listener to be notified when the visible items change
-
removeIndexScrollListener
Removes the given listener from those to be notified when the view changes.- Parameters:
listener
- the listener to remove
-
mouseWheelMoved
void mouseWheelMoved(double preciseWheelRotation, boolean isHorizontal) Notify the scrollable that the mouse wheel was moved.- Parameters:
preciseWheelRotation
- the amount of rotation of the wheelisHorizontal
- true if the rotation was horizontal, false for vertical
-