jadex.base.gui.modeltree.ModelIconCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-tools-base-swing Show documentation
Show all versions of jadex-tools-base-swing Show documentation
GUI-dependent classes for jadex-tools-base.
package jadex.base.gui.modeltree;
import java.util.HashMap;
import java.util.Map;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JTree;
import javax.swing.UIDefaults;
import javax.swing.tree.TreeModel;
import jadex.base.gui.asynctree.AsyncSwingTreeModel;
import jadex.base.gui.asynctree.ISwingTreeNode;
import jadex.base.gui.filetree.DirNode;
import jadex.base.gui.filetree.IFileNode;
import jadex.base.gui.filetree.IIconCache;
import jadex.base.gui.filetree.JarNode;
import jadex.base.gui.filetree.RIDNode;
import jadex.base.gui.filetree.RemoteDirNode;
import jadex.base.gui.filetree.RemoteJarNode;
import jadex.base.gui.filetree.RootNode;
import jadex.bridge.IExternalAccess;
import jadex.bridge.IResourceIdentifier;
import jadex.bridge.service.types.factory.SComponentFactory;
import jadex.commons.future.IFuture;
import jadex.commons.future.IResultListener;
import jadex.commons.gui.SGUI;
import jadex.commons.gui.future.SwingResultListener;
/**
* Cache for component icons.
* Asynchronously loads icons and updates tree.
*/
public class ModelIconCache implements IIconCache
{
//-------- constants --------
/**
* The image icons.
*/
protected final UIDefaults icons = new UIDefaults(new Object[]
{
// "scanning_on", SGUI.makeIcon(DefaultNodeFunctionality.class, "/jadex/base/gui/images/new_refresh_anim.gif"),
// "src_folder", SGUI.makeIcon(ModelIconCache.class, "/jadex/base/gui/images/new_src_folder.png"),
"src_folder", SGUI.makeIcon(ModelIconCache.class, "/jadex/base/gui/images/folder416.png"),
"src_jar", SGUI.makeIcon(ModelIconCache.class, "/jadex/base/gui/images/jar16.png"),
// "package", SGUI.makeIcon(ModelIconCache.class, "/jadex/base/gui/images/new_package.png")
"package", SGUI.makeIcon(ModelIconCache.class, "/jadex/base/gui/images/package2.png")
});
//-------- attributes --------
/** The icon cache. */
protected final Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy