package com.fine.theme.icon; import com.fr.third.errorprone.annotations.Immutable; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.Icon; import java.util.Collection; /** * 图标集 * * @author vito * @since 11.0 * Created on 2023/11/6 */ @Immutable public interface IconSet extends Identifiable { @NotNull @Override String getId(); /** * 返回集合中所有 Icons 的 id。 * * @return 集合中所有 Icons 的 id。 */ @NotNull Collection getIds(); /** * 将指定 IconSource 引用的新 Icon 添加到集合中。 * * @param icon icon 源 */ void addIcon(@NotNull IconSource icon); /** * 将指定 IconSource 引用的新 Icon 添加到集合中。 * * @param icon icon 源 */ void addIcon(@NotNull IconSource... icon); /** * 返回指定 id 的 Icon。 * * @param id id * @return Icon */ @Nullable Icon findIcon(@NotNull String id); /** * 返回指定 id 的 Icon。 * * @param id id * @return Icon */ @Nullable Icon findWhiteIcon(@NotNull String id); /** * 返回指定 id 的 Icon。 * * @param id id * @return Icon */ @Nullable Icon findDisableIcon(@NotNull String id); }