Package docking.widgets.fieldpanel
Class FieldPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
docking.widgets.fieldpanel.FieldPanel
- All Implemented Interfaces:
LayoutModelListener
,IndexedScrollable
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,ChangeListener
public class FieldPanel
extends JPanel
implements IndexedScrollable, LayoutModelListener, ChangeListener
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Modifier and TypeFieldDescriptionprotected BackgroundColorModel
static final int
protected PaintContext
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldInputListener
(FieldInputListener listener) void
void
addFieldMouseListener
(FieldMouseListener listener) void
void
addHighlightListener
(FieldSelectionListener listener) void
addIndexScrollListener
(IndexScrollListener listener) Adds a listener to be notified when the view is scrolled in any way.void
addLayoutListener
(LayoutListener listener) void
Adds a selection listener that will be notified while the selection is being createdvoid
addViewListener
(ViewListener listener) void
center
(FieldLocation location) void
Clears the marked area highlight;void
Clears the selection;void
void
void
Moves the cursor to the end of the line.void
Moves the cursor to the beginning of the line.void
void
void
void
cursorUp()
void
dataChanged
(BigInteger start, BigInteger end) Called when the data at an index or range of indexes changes.void
dispose()
Cleans up resources when this FieldPanel is no longer needed.void
enableSelection
(boolean b) Returns the default background color.getBackgroundColor
(BigInteger index) int
Returns the offset of the cursor from the top of the screenReturns the point in pixels of where the cursor is located.getFieldAt
(int x, int y, FieldLocation loc) Returns the Field at the given x,y coordinates.Returns the cursor color when this field panel is focused.Returns the foreground color.int
getHeight
(BigInteger index) Returns the height of the n'th item.Returns the current highlight (marked area).Returns the color color used as the background for highlighted items.Returns the class responsible for triggering popups for this field panel.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.protected LayoutBackgroundColorManager
getLayoutSelectionMap
(BigInteger layoutIndex) getLocationForPoint
(int x, int y) Returns the cursor color when this field panel is not focused.int
getOffset
(FieldLocation location) getPointForLocation
(FieldLocation location) Returns the current selection.Returns the color used as the background for selected items.Returns a ViewerPosition object which contains the top of screen information.Returns the last visible layout or null if there are no visible layoutsReturns the first visible layout or null if there are no visible layoutsvoid
goTo
(BigInteger index, int fieldNum, int row, int col, boolean alwaysCenterCursor) Sets the cursor to the given Field location and attempts to show that location in the center of the screen.protected void
goTo
(BigInteger index, int fieldNum, int row, int col, boolean alwaysCenterCursor, EventTrigger trigger) boolean
Returns the state of the cursor.boolean
boolean
isLocationVisible
(FieldLocation location) Returns true if the given field location is rendered on the screen; false if scrolled offscreenboolean
boolean
Returns true if all the items are the same vertical size.void
modelSizeChanged
(IndexMapper indexMapper) Called whenever the number of indexes changedvoid
mouseWheelMoved
(double preciseWheelRotation, boolean horizontal) Notify the scrollable that the mouse wheel was moved.void
pageDown()
void
pageUp()
protected void
void
positionCursor
(int offset) Scrolls the view so that the cursor is at the given offset from the top of the screenvoid
removeFieldInputListener
(FieldInputListener listener) void
void
removeFieldMouseListener
(FieldMouseListener listener) void
void
void
removeIndexScrollListener
(IndexScrollListener listener) Removes the given listener from those to be notified when the view changes.void
removeLayoutListener
(LayoutListener listener) void
Removes the selection listener from being notified when the selection is being createdvoid
removeViewListener
(ViewListener listener) void
repaint()
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
scrollTo
(FieldLocation fieldLocation) void
void
scrollView
(int viewAmount) void
Sets the default background colorvoid
void
setBlinkCursor
(Boolean blinkCursor) void
setBounds
(int x, int y, int width, int height) void
setCursorOn
(boolean cursorOn) Sets the cursor on or off.boolean
setCursorPosition
(BigInteger index, int fieldNum, int row, int col) Sets the cursorPosition to the given location.boolean
setCursorPosition
(BigInteger index, int fieldNum, int row, int col, EventTrigger trigger) Sets the cursorPosition to the given location with the given trigger.void
void
setFocusedCursorColor
(Color color) Sets the cursor color for when this component has focus.void
Sets the current highlight to the specified field selection.void
setHighlightColor
(Color color) Sets the highlight colorvoid
setHorizontalScrollingEnabled
(boolean enabled) void
setHoverProvider
(HoverProvider hoverProvider) Add a new hover provider to be managed.void
setLayoutModel
(LayoutModel model) Sets the layout model for this field panelvoid
setNonFocusCursorColor
(Color color) Sets the cursor color for when this component does not have focus.void
Sets the current selection.void
setSelection
(FieldSelection sel, EventTrigger trigger) Sets the current selection.void
setSelectionColor
(Color color) Sets the selection colorvoid
setViewerPosition
(BigInteger index, int xPos, int yPos) Scrolls the display to show the layout specified by index at the vertical position specified by yPos.void
showIndex
(BigInteger layoutIndex, int verticalOffset) Makes the item at the given index be visible on the screen at the given vertical offsetvoid
void
tabLeft()
void
tabRight()
void
Tell the panel to grab the keyboard input focus.void
updateUI()
Methods inherited from class javax.swing.JPanel
getUI, getUIClassID, paramString, setUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
MOUSEWHEEL_LINES_TO_SCROLL
public static final int MOUSEWHEEL_LINES_TO_SCROLL- See Also:
-
backgroundColorModel
-
paintContext
-
-
Constructor Details
-
FieldPanel
-
FieldPanel
-
-
Method Details
-
showIndex
Description copied from interface:IndexedScrollable
Makes the item at the given index be visible on the screen at the given vertical offset- Specified by:
showIndex
in interfaceIndexedScrollable
- Parameters:
layoutIndex
- the index of the item to showverticalOffset
- the number of pixels from the top of the screen to show the item
-
scrollView
public void scrollView(int viewAmount) -
scrollTo
-
center
-
setFieldDescriptionProvider
-
scrollLineDown
public void scrollLineDown()Description copied from interface:IndexedScrollable
Scrolls the displayed items down by the height of one line of text- Specified by:
scrollLineDown
in interfaceIndexedScrollable
-
scrollLineUp
public void scrollLineUp()Description copied from interface:IndexedScrollable
Scrolls the displayed items up by the height of one line of text- Specified by:
scrollLineUp
in interfaceIndexedScrollable
-
scrollPageDown
public void scrollPageDown()Description copied from interface:IndexedScrollable
Scrolls the displayed items down by the height of one screen of text- Specified by:
scrollPageDown
in interfaceIndexedScrollable
-
scrollPageUp
public void scrollPageUp()Description copied from interface:IndexedScrollable
Scrolls the displayed items up by the height of one screen of text- Specified by:
scrollPageUp
in interfaceIndexedScrollable
-
pageUp
public void pageUp() -
pageDown
public void pageDown() -
getHeight
Description copied from interface:IndexedScrollable
Returns the height of the n'th item.- Specified by:
getHeight
in interfaceIndexedScrollable
- Parameters:
index
- the index of the time to get height for- Returns:
- the height of the n'th item.
-
getIndexAfter
Description copied from interface:IndexedScrollable
Returns the index of the next non-null item. Not all indexes have items. Some items span multiple indexes- Specified by:
getIndexAfter
in interfaceIndexedScrollable
- 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
Description copied from interface:IndexedScrollable
Returns the index of the previous non-null item. Not all indexes have items. Some items span multiple indexes- Specified by:
getIndexBefore
in interfaceIndexedScrollable
- 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
-
getIndexCount
Description copied from interface:IndexedScrollable
Returns the number individually addressable items displayed.- Specified by:
getIndexCount
in interfaceIndexedScrollable
- Returns:
- the number individually addressable items displayed
-
isUniformIndex
public boolean isUniformIndex()Description copied from interface:IndexedScrollable
Returns true if all the items are the same vertical size.- Specified by:
isUniformIndex
in interfaceIndexedScrollable
- Returns:
- true if all the items are the same vertical size
-
cursorUp
public void cursorUp() -
cursorDown
public void cursorDown() -
cursorLeft
public void cursorLeft() -
cursorRight
public void cursorRight() -
tabRight
public void tabRight() -
tabLeft
public void tabLeft() -
cursorHome
public void cursorHome()Moves the cursor to the beginning of the line. -
cursorTopOfFile
public void cursorTopOfFile() -
cursorBottomOfFile
public void cursorBottomOfFile() -
cursorEnd
public void cursorEnd()Moves the cursor to the end of the line. -
getVisibleLayouts
-
isLocationVisible
Returns true if the given field location is rendered on the screen; false if scrolled offscreen- Parameters:
location
- the location- Returns:
- true if the location is on the screen
-
getVisibleStartLayout
Returns the first visible layout or null if there are no visible layouts- Returns:
- the first visible layout
-
getVisibleEndLayout
Returns the last visible layout or null if there are no visible layouts- Returns:
- the last visible layout
-
repaint
public void repaint() -
updateUI
public void updateUI() -
getPreferredSize
- Overrides:
getPreferredSize
in classJComponent
-
stateChanged
- Specified by:
stateChanged
in interfaceChangeListener
-
setBounds
public void setBounds(int x, int y, int width, int height) -
setBlinkCursor
-
enableSelection
public void enableSelection(boolean b) -
setHorizontalScrollingEnabled
public void setHorizontalScrollingEnabled(boolean enabled) -
getBackgroundColor
Returns the default background color.- Returns:
- the default background color.
- See Also:
-
getBackground
- Overrides:
getBackground
in classComponent
-
setBackgroundColor
Sets the default background color- Parameters:
c
- the color to use for the background.
-
getBackgroundColor
-
setBackgroundColorModel
-
getForegroundColor
Returns the foreground color.- Returns:
- the foreground color.
-
getSelectionColor
Returns the color used as the background for selected items.- Returns:
- the color used as the background for selected items.
-
getHighlightColor
Returns the color color used as the background for highlighted items.- Returns:
- the color color used as the background for highlighted items.
-
getFocusedCursorColor
Returns the cursor color when this field panel is focused.- Returns:
- the cursor color when this field panel is focused.
-
getNonFocusCursorColor
Returns the cursor color when this field panel is not focused.- Returns:
- the cursor color when this field panel is not focused.
-
isFocused
public boolean isFocused() -
dispose
public void dispose()Cleans up resources when this FieldPanel is no longer needed. -
getCursorPoint
Returns the point in pixels of where the cursor is located.- Returns:
- the point in pixels of where the cursor is located.
-
getCursorBounds
-
getCursorLocation
-
getCurrentField
-
addIndexScrollListener
Description copied from interface:IndexedScrollable
Adds a listener to be notified when the view is scrolled in any way.- Specified by:
addIndexScrollListener
in interfaceIndexedScrollable
- Parameters:
listener
- the listener to be notified when the visible items change
-
removeIndexScrollListener
Description copied from interface:IndexedScrollable
Removes the given listener from those to be notified when the view changes.- Specified by:
removeIndexScrollListener
in interfaceIndexedScrollable
- Parameters:
listener
- the listener to remove
-
addFieldSelectionListener
-
removeFieldSelectionListener
-
addLiveFieldSelectionListener
Adds a selection listener that will be notified while the selection is being created- Parameters:
listener
- the listener to be notified
-
removeLiveFieldSelectionListener
Removes the selection listener from being notified when the selection is being created- Parameters:
listener
- the listener to be removed from being notified
-
addHighlightListener
-
removeHighlightListener
-
addFieldMouseListener
-
removeFieldMouseListener
-
addFieldInputListener
-
removeFieldInputListener
-
addFieldLocationListener
-
removeFieldLocationListener
-
addLayoutListener
-
removeLayoutListener
-
addViewListener
-
removeViewListener
-
setHoverProvider
Add a new hover provider to be managed.- Parameters:
hoverProvider
- the new hover provider to be managed.
-
getHoverHandler
Returns the class responsible for triggering popups for this field panel.- Returns:
- the hover handler.
-
getFieldAt
Returns the Field at the given x,y coordinates. Note the x,y must currently be visible on the screen or else this method will return null.- Parameters:
x
- the x mouse coordinate in the component.y
- the y mouse coordinate in the component.loc
- will be filled in with the FieldLocation for the given point. Values will be undefined if the Field return value is null.- Returns:
- Field the Field object the point is over.
-
clearSelection
public void clearSelection()Clears the selection; -
clearHighlight
public void clearHighlight()Clears the marked area highlight; -
setFocusedCursorColor
Sets the cursor color for when this component has focus.- Parameters:
color
- Color to use for the cursor when this component has keyboard focus.
-
setNonFocusCursorColor
Sets the cursor color for when this component does not have focus.- Parameters:
color
- Color to use for the cursor when this component does not have keyboard focus.
-
getSelection
Returns the current selection.- Returns:
- the current selection.
-
getHighlight
Returns the current highlight (marked area).- Returns:
- the current highlight (marked area).
-
setSelection
Sets the current selection.- Parameters:
sel
- the selection to set.
-
setSelection
Sets the current selection.- Parameters:
sel
- the selection to set.trigger
- the cause of the change
-
setHighlight
Sets the current highlight to the specified field selection.- Parameters:
sel
- the selection to set as the highlight.
-
setCursorPosition
Sets the cursorPosition to the given location.- Parameters:
index
- the index of the Layout on which to place the cursor.fieldNum
- the index of the field within its layout on which to place the cursor.row
- the row within the field to place the cursor.col
- the col within the row to place the cursor.- Returns:
- true if the cursor changed
-
setCursorPosition
public boolean setCursorPosition(BigInteger index, int fieldNum, int row, int col, EventTrigger trigger) Sets the cursorPosition to the given location with the given trigger.- Parameters:
index
- the index of the Layout on which to place the cursor.fieldNum
- the index of the field within its layout on which to place the cursor.row
- the row within the field to place the cursor.col
- the col within the row to place the cursor.trigger
- a caller-specified event trigger.- Returns:
- true if the cursor changed
-
setCursorOn
public void setCursorOn(boolean cursorOn) Sets the cursor on or off. When the cursor is turned off, there is no visible cursor displayed on the screen.- Parameters:
cursorOn
- true turns the cursor on, false turns it off.
-
isCursorOn
public boolean isCursorOn()Returns the state of the cursor. True if on, false if off.- Returns:
- the state of the cursor. True if on, false if off.
-
scrollToCursor
public void scrollToCursor() -
goTo
Sets the cursor to the given Field location and attempts to show that location in the center of the screen.- Parameters:
index
- the index of the line to go to.fieldNum
- the field on the line to go to.row
- the row in the field to go to.col
- the column in the field to go to.alwaysCenterCursor
- if true, centers cursor on screen. Otherwise, only centers cursor if cursor is offscreen.
-
goTo
protected void goTo(BigInteger index, int fieldNum, int row, int col, boolean alwaysCenterCursor, EventTrigger trigger) -
takeFocus
public void takeFocus()Tell the panel to grab the keyboard input focus. -
positionCursor
public void positionCursor(int offset) Scrolls the view so that the cursor is at the given offset from the top of the screen- Parameters:
offset
- the pixel distance from the top of the screen at which to scroll the display such that the cursor is at that offset.
-
isStartDragOK
public boolean isStartDragOK() -
setSelectionColor
Sets the selection color- Parameters:
color
- the color to use for selection.
-
setHighlightColor
Sets the highlight color- Parameters:
color
- the color to use for highlights.
-
getViewerPosition
Returns a ViewerPosition object which contains the top of screen information. The ViewerPosition will have the index of the layout at the top of the screen and the yPos of that layout. For example, if the layout is completely displayed, yPos will be 0. If part of the layout is off the top off the screen, then yPos will have a negative value (indicating that it begins above the displayable part of the screen.- Returns:
- the position
-
setViewerPosition
Scrolls the display to show the layout specified by index at the vertical position specified by yPos. Generally, the index will be layout at the top of the screen and the yPos will be <= 0, meaning the layout may be partially off the top of the screen.- Parameters:
index
- the index of the layout to show at the top of the screen.xPos
- the x position to set.yPos
- the y position to set.
-
getLayoutModel
-
setLayoutModel
Sets the layout model for this field panel- Parameters:
model
- the layout model to use.
-
dataChanged
Description copied from interface:LayoutModelListener
Called when the data at an index or range of indexes changes.- Specified by:
dataChanged
in interfaceLayoutModelListener
- Parameters:
start
- the starting index for the region of data changes.end
- the ending index (inclusive) for the region of data changes.
-
modelSizeChanged
Description copied from interface:LayoutModelListener
Called whenever the number of indexes changed- Specified by:
modelSizeChanged
in interfaceLayoutModelListener
- Parameters:
indexMapper
- Maps indexes from before the model size change to indexes after the model size changed.
-
paintComponent
- Overrides:
paintComponent
in classJComponent
-
getOffset
-
getCursorOffset
public int getCursorOffset()Returns the offset of the cursor from the top of the screen- Returns:
- the offset of the cursor from the top of the screen
-
getLayoutSelectionMap
-
getPointForLocation
-
getLocationForPoint
-
getAccessibleContext
- Specified by:
getAccessibleContext
in interfaceAccessible
- Overrides:
getAccessibleContext
in classJPanel
-
mouseWheelMoved
public void mouseWheelMoved(double preciseWheelRotation, boolean horizontal) Description copied from interface:IndexedScrollable
Notify the scrollable that the mouse wheel was moved.- Specified by:
mouseWheelMoved
in interfaceIndexedScrollable
- Parameters:
preciseWheelRotation
- the amount of rotation of the wheelhorizontal
- true if the rotation was horizontal, false for vertical
-