/*
 * Created on 06.06.2003
 *
 */
package de.renew.gui;

import javax.swing.Icon;

import CH.ifa.draw.standard.ToolButton;
import CH.ifa.draw.util.Palette;
import de.renew.draw.ui.ontology.Tool;


/**
 * @author 6schumac
 *
 */
public interface PaletteHolder {

    /**
     * add the given Palette
     * @param palette the Palette to add
     */
    void addPalette(Palette palette);

    /**
     * remove the gicen Palette
     * @param palette the Palette to remove
     */
    void removePalette(Palette palette);

    /**
     * create a button for with the given icons, name and tool
     * @deprecated this is not to be used, please use {@link PaletteHolder#createToolButton(Icon, Icon, String, Tool, String)}
     * @param icon the icon for the button
     * @param selectedIcon the icon for the pressed button
     * @param toolName the name of the tool
     * @param tool the tool to be triggered with this button
     */
    @Deprecated
    ToolButton createToolButton(Icon icon, Icon selectedIcon, String toolName, Tool tool);

    /**
     * create a button for with the given icons, name and tool
     * @param icon the icon for the button
     * @param selectedIcon the icon for the pressed button
     * @param toolName the name of the tool
     * @param tool the tool to be triggered with this button
     * @param pluginName the name of the plugin the tool belongs to
     */
    ToolButton createToolButton(
        Icon icon, Icon selectedIcon, String toolName, Tool tool, String pluginName);

    /**
     * try to create a button withe the given name and tool, loading the icons from the given path
     * @deprecated this is not to be used, please use {@link PaletteHolder#createToolButton(String, String, Tool, String)}
     * @param path the path where to look for the icon files
     * @param toolName the name of this tool
     * @param tool the Tool to trigger
     */
    @Deprecated
    ToolButton createToolButton(String path, String toolName, Tool tool);

    /**
     * try to create a button withe the given name and tool, loading the icons from the given path
     * @param path the path where to look for the icon files
     * @param toolName the name of this tool
     * @param tool the Tool to trigger
     * @param pluginName the name of the plugin the tool belongs to
     */
    ToolButton createToolButton(String path, String toolName, Tool tool, String pluginName);

    TextFigureToolButtonRegistry getTextFigureToolButtonRegistry();
}