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

com.pekinsoft.spi.TitleProvider Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (C) 2022 PekinSOFT Systems
 *
 * This program 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.
 *
 * This program 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 this program.  If not, see .
 * 
 * *****************************************************************************
 *  Project    :   AppFramework Application API
 *  Class      :   TitleProvider.java
 *  Author     :   Sean Carrick
 *  Created    :   Nov 21, 2022
 *  Modified   :   Nov 21, 2022
 *  
 *  Purpose: See class JavaDoc for explanation
 *  
 *  Revision History:
 *  
 *  WHEN          BY                   REASON
 *  ------------  -------------------  -----------------------------------------
 *  Nov 21, 2022  Sean Carrick         Initial creation.
 * *****************************************************************************
 */

package com.pekinsoft.spi;

import javax.swing.ImageIcon;

/**
 * {@code TitleProvider} allows for components that do not have a title property
 * inherently to provide a title. Such cases are when using {@link 
 * javax.swing.JPanel JPanel} forms as a way of providing a user interface into
 * a {@link javax.swing.JTabbedPane JTabbedPane} and allowing the {@code JPanel}
 * to specify a title for the tab.
 *
 * @author Sean Carrick <sean at pekinsoft dot com>
 * 
 * @version 1.3
 * @since 1.0
 */
public interface TitleProvider {
    
    /**
     * Retrieves the title for the implementing object.
     * 
     * @return the title
     */
    public String getTitle();
    
    /**
     * Retrieves the icon to be displayed on the tab for the implementing object.
     * 
     * @return an icon for the tab
     */
    public ImageIcon getTabIcon();
    
    /**
     * Retrieves the name of the property on which a 
     * {@link java.beans.PropertyChangeListener PropertyChangeListener} for the
     * created tab's close button should fire a change event.
     * 
     * @return the property name to fire
     */
    public String getPropertyName();
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy