public interface IconTheme
Modifier and Type | Interface and Description |
---|---|
static interface |
IconTheme.Icon |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NO_ICON_NAME |
Modifier and Type | Method and Description |
---|---|
void |
addGroupImage(java.lang.String group,
java.net.URL resource) |
void |
addSubgroupImage(java.lang.String group,
java.lang.String subgroup,
java.net.URL resource) |
boolean |
exists(java.lang.String name)
Returns
true if the icon theme contains a mapping for the
specified iconName. |
void |
export(java.io.File folder) |
javax.swing.ImageIcon |
get(java.lang.String iconName)
Gets the ImageIcon associated with the provided name, if the name
is present in the theme.
|
javax.swing.ImageIcon |
get(java.lang.String iconName,
java.lang.ClassLoader loader)
Deprecated.
use
get(String) instead |
IconTheme |
getDefault() |
javax.swing.ImageIcon |
getDefaultIcon()
Return the icon used as icon by default when the requested icon
not exists.
|
java.lang.String |
getDescription()
Gets the theme description.
|
java.lang.String |
getGroupDescription(java.lang.String group) |
java.util.List<SimpleImage> |
getGroupImages(java.lang.String group) |
java.lang.String |
getID() |
java.lang.String |
getName()
Gets the theme name of the theme
|
javax.swing.ImageIcon |
getNoIcon()
Deprecated.
use
getDefaultIcon() |
java.lang.String |
getSubgroupDescription(java.lang.String group,
java.lang.String subgroup) |
java.util.List<SimpleImage> |
getSubgroupImages(java.lang.String group,
java.lang.String subgroup) |
IconTheme.Icon |
getThemeIcon(java.lang.String name)
Return the ThemeIcon associated with the name.
|
java.util.Iterator<IconTheme.Icon> |
getThemeIcons()
Return an iterator over the ThemIcon in the theme.
|
boolean |
isMyIcon(java.lang.String name) |
java.util.Iterator<java.lang.String> |
iterator()
Return an iterator over the names of the icons in the theme.
|
void |
load(java.lang.Object resource)
Load all icons from the IconTheme
|
boolean |
matchID(java.lang.String id) |
void |
register(java.lang.String iconName,
javax.swing.ImageIcon image)
Deprecated.
use
#register(PluginServices, String, String, ImageIcon, Object) |
void |
register(java.lang.String iconName,
java.lang.Object resource)
Deprecated.
use
#register(PluginServices, String, String, ImageIcon, Object) |
void |
register(java.lang.String provider,
java.lang.String group,
java.lang.String name,
javax.swing.ImageIcon icon,
java.net.URL resource)
Register a icon in the theme.
|
IconTheme.Icon |
register(java.lang.String provider,
java.lang.String group,
java.lang.String subgroup,
java.lang.String name,
javax.swing.ImageIcon icon,
java.net.URL resource) |
void |
registerDefault(java.lang.String iconName,
javax.swing.ImageIcon image)
Deprecated.
use
#registerDefault(PluginServices, String, String, ImageIcon, Object) |
void |
registerDefault(java.lang.String iconName,
java.lang.Object resource)
Deprecated.
use
#registerDefault(PluginServices, String, String, ImageIcon, Object) |
void |
registerDefault(java.lang.String provider,
java.lang.String group,
java.lang.String name,
javax.swing.ImageIcon icon,
java.net.URL resource)
Register a icon in the theme.
|
IconTheme.Icon |
registerDefault(java.lang.String provider,
java.lang.String group,
java.lang.String subgroup,
java.lang.String name,
javax.swing.ImageIcon icon,
java.net.URL resource) |
void |
setDefault(IconTheme def) |
void |
setDefaultIcon(javax.swing.ImageIcon icon)
Set the default icon to use when the requestd icon not exists.
|
void |
setDefaultIcon(java.lang.String name) |
void |
setDefaultIcon(java.net.URL resource) |
void |
setDescription(java.lang.String description)
Sets the theme description.
|
void |
setGroupDescription(java.lang.String group,
java.lang.String description) |
void |
setID(java.lang.String id) |
void |
setName(java.lang.String themeName)
Sets the theme name of the theme
|
void |
setSubgroupDescription(java.lang.String group,
java.lang.String subgroup,
java.lang.String description) |
static final java.lang.String NO_ICON_NAME
void load(java.lang.Object resource) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
void setDefault(IconTheme def)
IconTheme getDefault()
boolean exists(java.lang.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.javax.swing.ImageIcon get(java.lang.String iconName)
null
if
this not exists.name
- The name whose associated icon is to be retrievedIconTheme.Icon getThemeIcon(java.lang.String name)
name
- of the iconboolean isMyIcon(java.lang.String name)
java.lang.String getName()
void setName(java.lang.String themeName)
themeName
- java.lang.String getID()
void setID(java.lang.String id)
java.lang.String getDescription()
void setDescription(java.lang.String description)
description
- java.util.Iterator<java.lang.String> iterator()
java.util.Iterator<IconTheme.Icon> getThemeIcons()
javax.swing.ImageIcon getDefaultIcon()
void setDefaultIcon(javax.swing.ImageIcon icon)
icon
- void setDefaultIcon(java.net.URL resource)
void setDefaultIcon(java.lang.String name)
void registerDefault(java.lang.String provider, java.lang.String group, java.lang.String name, javax.swing.ImageIcon icon, java.net.URL resource) throws java.lang.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.java.lang.IllegalArgumentException
- if name is null/empty or icon/resource are nullIconTheme.Icon registerDefault(java.lang.String provider, java.lang.String group, java.lang.String subgroup, java.lang.String name, javax.swing.ImageIcon icon, java.net.URL resource) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
void register(java.lang.String provider, java.lang.String group, java.lang.String name, javax.swing.ImageIcon icon, java.net.URL resource) throws java.lang.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.java.lang.IllegalArgumentException
- if name is null/empty or icon/resource are nullIconTheme.Icon register(java.lang.String provider, java.lang.String group, java.lang.String subgroup, java.lang.String name, javax.swing.ImageIcon icon, java.net.URL resource) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
void export(java.io.File folder)
javax.swing.ImageIcon getNoIcon()
getDefaultIcon()
javax.swing.ImageIcon get(java.lang.String iconName, java.lang.ClassLoader loader)
get(String)
insteadvoid registerDefault(java.lang.String iconName, javax.swing.ImageIcon image)
#registerDefault(PluginServices, String, String, ImageIcon, Object)
void registerDefault(java.lang.String iconName, java.lang.Object resource)
#registerDefault(PluginServices, String, String, ImageIcon, Object)
void register(java.lang.String iconName, javax.swing.ImageIcon image)
#register(PluginServices, String, String, ImageIcon, Object)
void register(java.lang.String iconName, java.lang.Object resource)
#register(PluginServices, String, String, ImageIcon, Object)
java.lang.String getGroupDescription(java.lang.String group)
java.lang.String getSubgroupDescription(java.lang.String group, java.lang.String subgroup)
void setGroupDescription(java.lang.String group, java.lang.String description)
void setSubgroupDescription(java.lang.String group, java.lang.String subgroup, java.lang.String description)
void addGroupImage(java.lang.String group, java.net.URL resource)
java.util.List<SimpleImage> getGroupImages(java.lang.String group)
void addSubgroupImage(java.lang.String group, java.lang.String subgroup, java.net.URL resource)
java.util.List<SimpleImage> getSubgroupImages(java.lang.String group, java.lang.String subgroup)
boolean matchID(java.lang.String id)