Interface BoardViewTooltipProvider
- All Known Implementing Classes:
BoardEditorTooltip,SBFBoardViewTooltip,TWBoardViewTooltip
public interface BoardViewTooltipProvider
This interface is implemented by classes that can be added to a BoardView to provide the tooltip contents for the
BoardView.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetTooltip(MouseEvent event) Returns a String that is displayed as the tooltip for a point according to the mouse event's point in the BoardView's drawing area.default StringgetTooltip(MouseEvent event, Coords movementTarget) Returns a String that is displayed as the tooltip for a point according to the mouse event's point in the BoardView's drawing area.getTooltip(Point point, Coords movementTarget) Returns a String that is displayed as the tooltip for the given point in the BoardView's drawing area.
-
Method Details
-
getTooltip
Returns a String that is displayed as the tooltip for a point according to the mouse event's point in the BoardView's drawing area. The String may be an HTML string. It is passed to Swing's TooltipManager without further modification, i.e. if it is an HTML string all tags must already be present. This method forwards togetTooltip(Point, Coords)and should not be overridden.- Parameters:
event- A mouse event associated with a position in the BoardView- Returns:
- The tooltip to display
-
getTooltip
Returns a String that is displayed as the tooltip for a point according to the mouse event's point in the BoardView's drawing area. The String may be an HTML string. It is passed to Swing's TooltipManager without further modification, i.e. if it is an HTML string all tags must already be present. The String may also be null to show no tooltip at all. The given movementTarget coordinates may be used to display information about another hex or field in that BoardView. This method forwards togetTooltip(Point, Coords)and should not be overridden.- Parameters:
event- A mouse event associated with a position in the BoardViewmovementTarget- Another coordinate to display additional information about- Returns:
- The tooltip to display
-
getTooltip
Returns a String that is displayed as the tooltip for the given point in the BoardView's drawing area. The String may be an HTML string. It is passed to Swing's TooltipManager without further modification, i.e. if it is an HTML string all tags must already be present. The given movementTarget coordinates may be used to display information about another hex or field in that BoardView.- Parameters:
point- The point in the BoardView's drawing area as returned e.g. with a MouseEventmovementTarget- Another coordinate to display additional information about- Returns:
- The tooltip to display
-