com.jidesoft.tooltip
Class ListExpandedTip
java.lang.Object
com.jidesoft.tooltip.ExpandedTip<JList>
com.jidesoft.tooltip.ListExpandedTip
public class ListExpandedTip
- extends ExpandedTip<JList>
ListExpandedTip
enables the ExpandedTip feature for JList
.
License notice: The file was originally copied from IntelliJ IDEA Community Edition (Apache 2.0 license) but was
modified extensively to be more easily used as a component.
- Since:
- 3.3.0
Methods inherited from class com.jidesoft.tooltip.ExpandedTip |
createImage, createToolTipImage, fillBackground, getComponent, getComponent, getExpandedTip, getVisibleRect, handleSelectionChange, handleSelectionChange, hideTip, setWindowShape, shouldDrawBorder, showTip, updateCurrentSelection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListExpandedTip
public ListExpandedTip(JList list)
uninstall
public void uninstall()
- Overrides:
uninstall
in class ExpandedTip<JList>
rowAtPoint
protected int rowAtPoint(Point point)
- Description copied from class:
ExpandedTip
- Gets the row index or the node index on the location.
- Specified by:
rowAtPoint
in class ExpandedTip<JList>
- Parameters:
point
- the location.
- Returns:
- the index of the row or node.
getRowBounds
protected Rectangle getRowBounds(int index)
- Description copied from class:
ExpandedTip
- Gets the bounds of the image that will be put on the tip. The position is relative to the component returned from
ExpandedTip.getComponent(int)
. The bounds should cover the row or the node. We will calculate it so that only the
invisible area is shown on the tip component.
- Specified by:
getRowBounds
in class ExpandedTip<JList>
- Parameters:
index
- the index of the row or node.
- Returns:
- the bounds.
paintTipImage
protected void paintTipImage(Graphics2D g,
Component component,
Rectangle bounds,
int index)
- Description copied from class:
ExpandedTip
- Paints the tip image. It will take a sub-image from the component at the specified bounds and paint it on the
provided graphics.
- Overrides:
paintTipImage
in class ExpandedTip<JList>
- Parameters:
g
- the graphicscomponent
- the component where the sub-image is taken frombounds
- the bounds where the sub-image is atindex
- the index of the row or the node