Package jadex.base.gui.modeltree
Class ModelIconCache
- java.lang.Object
-
- jadex.base.gui.modeltree.ModelIconCache
-
- All Implemented Interfaces:
IIconCache
public class ModelIconCache extends java.lang.Object implements IIconCache
Cache for component icons. Asynchronously loads icons and updates tree.
-
-
Field Summary
Fields Modifier and Type Field Description protected IExternalAccess
exta
The service provider.protected javax.swing.UIDefaults
icons
The image icons.protected java.util.Map<java.lang.Object,javax.swing.Icon>
myicons
The icon cache.protected javax.swing.JTree
tree
The tree.
-
Constructor Summary
Constructors Constructor Description ModelIconCache(IExternalAccess exta, javax.swing.JTree tree)
Create an icon cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<IResourceIdentifier>
createResourceIdentifier(ISwingTreeNode node)
Create a resource identifier.javax.swing.Icon
getIcon(ISwingTreeNode node)
Get an icon.protected void
refresh(ISwingTreeNode node)
-
-
-
Field Detail
-
icons
protected final javax.swing.UIDefaults icons
The image icons.
-
myicons
protected final java.util.Map<java.lang.Object,javax.swing.Icon> myicons
The icon cache.
-
exta
protected final IExternalAccess exta
The service provider.
-
tree
protected final javax.swing.JTree tree
The tree.
-
-
Constructor Detail
-
ModelIconCache
public ModelIconCache(IExternalAccess exta, javax.swing.JTree tree)
Create an icon cache.
-
-
Method Detail
-
getIcon
public javax.swing.Icon getIcon(ISwingTreeNode node)
Get an icon.- Specified by:
getIcon
in interfaceIIconCache
- Parameters:
node
- The node.- Returns:
- The icon.
-
refresh
protected void refresh(ISwingTreeNode node)
-
createResourceIdentifier
public IFuture<IResourceIdentifier> createResourceIdentifier(ISwingTreeNode node)
Create a resource identifier.
-
-