You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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<String> getIds();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 将指定 IconSource 引用的新 Icon 添加到集合中。
|
|
|
|
*
|
|
|
|
* @param icon icon 源
|
|
|
|
*/
|
|
|
|
void addIcon(@NotNull IconSource<? extends Icon> icon);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 将指定 IconSource 引用的新 Icon 添加到集合中。
|
|
|
|
*
|
|
|
|
* @param icon icon 源
|
|
|
|
*/
|
|
|
|
void addIcon(@NotNull IconSource<? extends Icon>... 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);
|
|
|
|
}
|