All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.valkyriercp.component.OverlayService Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
package org.valkyriercp.component;

import javax.swing.*;
import java.awt.*;

/**
 * This interface provide a way for installing and uninstalling overlay components.
 * 

* It's also a way for decoupling this functionality initially provided by OverlayHelper. * * @author Julio Argüello (JAF) */ public interface OverlayService { /** * Returns if the overlay is currently installed into the target component. * * @param targetComponent * the target component. * @param overlay * the overlay. * @return true if installed and false in other case. */ Boolean isOverlayInstalled(JComponent targetComponent, JComponent overlay); /** * Installs an overlay on top of an overlayable component. * * @param targetComponent * the target component. * @param overlay * the overlay. * * @return true if success and false in other case. */ Boolean installOverlay(JComponent targetComponent, JComponent overlay); /** * Installs an overlay on top of an overlayable component. * * @param targetComponent * the target component. * @param overlay * the overlay. * @param position * the overlay position. * @param insets * the target component location insets. A null value make no changes. Can be overriden * using {@link #showOverlay(JComponent, JComponent)} and * {@link #hideOverlay(JComponent, JComponent)} methods. * * @return true if success and false in other case. */ Boolean installOverlay(JComponent targetComponent, JComponent overlay, int position, Insets insets); /** * Uninstalls an overlay. * * @param targetComponent * the target component. * @param overlay * the overlay. * * @return true if success and false in other case. */ Boolean uninstallOverlay(JComponent targetComponent, JComponent overlay); /** * Uninstalls an overlay. * * @param targetComponent * the target component. * @param overlay * the overlay. * @param insets * the target component location insets. A null value make no changes. * * @return true if success and false in other case. */ Boolean uninstallOverlay(JComponent targetComponent, JComponent overlay, Insets insets); /** * Shows an overlay on top of a given overlayable. * * @param targetComponent * the target component. * @param overlay * the overlay., * * @return true if success and false in other case. */ Boolean showOverlay(JComponent targetComponent, JComponent overlay); /** * Hides an overlay on top of a given overlayable. * * @param targetComponent * the target component. * @param overlay * the overlay., * * @return true if success and false in other case. */ Boolean hideOverlay(JComponent targetComponent, JComponent overlay); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy