com.alee.managers.tooltip.ToolTipProvider Maven / Gradle / Ivy
/*
* This file is part of WebLookAndFeel library.
*
* WebLookAndFeel library is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WebLookAndFeel library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WebLookAndFeel library. If not, see .
*/
package com.alee.managers.tooltip;
import javax.swing.*;
import java.awt.*;
/**
* Base interface for custom tooltip providers for complex components.
* It only provides tooltips for component areas described by {@link ComponentArea} implementation.
*
* @param value type
* @param component type
* @param component area type
* @author Mikle Garin
*/
public interface ToolTipProvider>
{
/**
* Returns tooltip display delay.
* Any value below 1 will force tooltips to be displayed instantly.
*
* @return tooltip display delay
*/
public long getDelay ();
/**
* Returns tooltip source bounds.
* Tooltip will be displayed relative to these bounds using provided {@link TooltipWay}.
*
* @param component component to provide tooltip for
* @param area {@link ComponentArea}
* @return tooltip source bounds
*/
public Rectangle getSourceBounds ( C component, A area );
/**
* Return {@link WebCustomTooltip} for the specified value and {@link ComponentArea}.
*
* @param component component to provide tooltip for
* @param area {@link ComponentArea}
* @return {@link WebCustomTooltip} for the specified value and {@link ComponentArea}
*/
public WebCustomTooltip getToolTip ( C component, A area );
/**
* Informs about hover area changes.
* This method implementations should display tooltips
*
* @param component component to provide tooltip for
* @param oldArea {@link ComponentArea}
* @param newArea {@link ComponentArea}
*/
public void hoverAreaChanged ( C component, A oldArea, A newArea );
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy