public interface IconTheme
Modifier and Type | Interface and Description |
---|---|
static interface |
IconTheme.Icon |
Modifier and Type | Field and Description |
---|---|
static String |
NO_ICON_NAME |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(String name)
Returns
true if the icon theme contains a mapping for the
specified iconName. |
void |
export(File folder) |
ImageIcon |
get(String iconName)
Gets the ImageIcon associated with the provided name, if the name
is present in the theme.
|
ImageIcon |
get(String iconName,
ClassLoader loader)
Deprecated.
use
get(String) instead |
IconTheme |
getDefault() |
ImageIcon |
getDefaultIcon()
Return the icon used as icon by default when the requested icon
not exists.
|
String |
getDescription()
Gets the theme description.
|
String |
getID() |
String |
getName()
Gets the theme name of the theme
|
ImageIcon |
getNoIcon()
Deprecated.
use
getDefaultIcon() |
IconTheme.Icon |
getThemeIcon(String name)
Return the ThemeIcon associated with the name.
|
Iterator<IconTheme.Icon> |
getThemeIcons()
Return an iterator over the ThemIcon in the theme.
|
Iterator<String> |
iterator()
Return an iterator over the names of the icons in the theme.
|
void |
load(Object resource)
Load all icons from the IconTheme
|
void |
register(String iconName,
ImageIcon image)
Deprecated.
use
#register(PluginServices, String, String, ImageIcon, Object) |
void |
register(String iconName,
Object resource)
Deprecated.
use
#register(PluginServices, String, String, ImageIcon, Object) |
void |
register(String provider,
String group,
String name,
ImageIcon icon,
URL resource)
Register a icon in the theme.
|
void |
registerDefault(String iconName,
ImageIcon image)
Deprecated.
use
#registerDefault(PluginServices, String, String, ImageIcon, Object) |
void |
registerDefault(String iconName,
Object resource)
Deprecated.
use
#registerDefault(PluginServices, String, String, ImageIcon, Object) |
void |
registerDefault(String provider,
String group,
String name,
ImageIcon icon,
URL resource)
Register a icon in the theme.
|
void |
setDefault(IconTheme def) |
void |
setDefaultIcon(ImageIcon icon)
Set the default icon to use when the requestd icon not exists.
|
void |
setDefaultIcon(String name) |
void |
setDefaultIcon(URL resource) |
void |
setDescription(String description)
Sets the theme description.
|
void |
setID(String id) |
void |
setName(String themeName)
Sets the theme name of the theme
|
static final String NO_ICON_NAME
void load(Object resource) throws IllegalArgumentException
IllegalArgumentException
void setDefault(IconTheme def)
IconTheme getDefault()
boolean exists(String name)
true
if the icon theme contains a mapping for the
specified iconName.iconName
- The key to check if it has been registered in this
IconThemetrue
if this IconTheme contains
iconName
, false
otherwise.ImageIcon get(String iconName)
null
if
this not exists.name
- The name whose associated icon is to be retrievedIconTheme.Icon getThemeIcon(String name)
name
- of the iconString getName()
void setName(String themeName)
themeName
- String getID()
void setID(String id)
String getDescription()
void setDescription(String description)
description
- Iterator<String> iterator()
Iterator<IconTheme.Icon> getThemeIcons()
ImageIcon getDefaultIcon()
void setDefaultIcon(ImageIcon icon)
icon
- void setDefaultIcon(URL resource)
void setDefaultIcon(String name)
void registerDefault(String provider, String group, String name, ImageIcon icon, URL resource) throws IllegalArgumentException
provider
- name of the icongroup
- name for the icon.name
- of iconicon,
- can be nulll if the resource is specified.resource,
- resource of the icon, usualy and url to the icon.IllegalArgumentException
- if name is null/empty or icon/resource are nullvoid register(String provider, String group, String name, ImageIcon icon, URL resource) throws IllegalArgumentException
provider
- name of the icongroup
- name for the icon.name
- of iconicon,
- can be nulll if the resource is specified.resource,
- resource of the icon, usualy and url to the icon.IllegalArgumentException
- if name is null/empty or icon/resource are nullvoid export(File folder)
ImageIcon getNoIcon()
getDefaultIcon()
ImageIcon get(String iconName, ClassLoader loader)
get(String)
insteadvoid registerDefault(String iconName, ImageIcon image)
#registerDefault(PluginServices, String, String, ImageIcon, Object)
void registerDefault(String iconName, Object resource)
#registerDefault(PluginServices, String, String, ImageIcon, Object)
void register(String iconName, ImageIcon image)
#register(PluginServices, String, String, ImageIcon, Object)