From: <Jan...@us...> - 2007-02-18 22:46:39
|
Revision: 552 http://svn.sourceforge.net/magicmap/?rev=552&view=rev Author: Jan_fride Date: 2007-02-18 14:46:32 -0800 (Sun, 18 Feb 2007) Log Message: ----------- removed log message for missing image Modified Paths: -------------- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java Modified: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java =================================================================== --- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java 2007-02-18 22:45:15 UTC (rev 551) +++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java 2007-02-18 22:46:32 UTC (rev 552) @@ -58,7 +58,7 @@ if (i != null) return i; else { - NodeIcons.log.warn("No icon found for: " + name); + //NodeIcons.log.warn("No icon found for: " + name); return NodeIcons.icons.get(NodeIcons.DEFAULT_ICON); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fle...@us...> - 2007-02-24 02:14:27
|
Revision: 565 http://svn.sourceforge.net/magicmap/?rev=565&view=rev Author: flederohr Date: 2007-02-23 18:14:24 -0800 (Fri, 23 Feb 2007) Log Message: ----------- changed Handling of NodeIcons Added Paths: ----------- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java Added: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java =================================================================== --- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java (rev 0) +++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java 2007-02-24 02:14:24 UTC (rev 565) @@ -0,0 +1,63 @@ + +package net.sf.magicmap.client.gui.utils; + +import java.awt.Color; +import java.util.HashMap; +import java.util.Map; +import javax.swing.Icon; +import net.sf.magicmap.client.model.node.Node; +import org.apache.log4j.Logger; + +/** + * @author Florian Lederer + */ +public class NodeIcons { + + private static NodeIcons ni = null; + + private static Logger log = Logger.getLogger(NodeIcons.class); + + private static final INodeIcon DEFAULT_ICON = new INodeIcon() { + + Icon defaultIcon = GUIBuilder.getToolIcon("default.png", + "NodeIcons"); + + public Color getBgColor(Node node){ + return Color.BLACK; + } + + public Color getFgColor(Node node){ + return Color.BLACK; + } + + public Icon getIcon(Node node){ + return defaultIcon; + } + + public Class getNodeClass(){ + return null; + } + + public int getNodeType(){ + return -1; + } + }; + + private final Map<Class, INodeIcon> iconMap = new HashMap<Class, INodeIcon>(); + + private NodeIcons() {} + + public static NodeIcons getInstance(){ + if (NodeIcons.ni == null) NodeIcons.ni = new NodeIcons(); + return NodeIcons.ni; + } + + public INodeIcon getNodeIcon(Node node){ + return iconMap.get(node.getClass()); + } + + public void registerNodeIcon(INodeIcon icon){ + iconMap.put(icon.getNodeClass(), icon); + } + +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fle...@us...> - 2007-02-24 02:26:55
|
Revision: 566 http://svn.sourceforge.net/magicmap/?rev=566&view=rev Author: flederohr Date: 2007-02-23 18:26:53 -0800 (Fri, 23 Feb 2007) Log Message: ----------- Removed Paths: ------------- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java Deleted: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java =================================================================== --- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java 2007-02-24 02:14:24 UTC (rev 565) +++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java 2007-02-24 02:26:53 UTC (rev 566) @@ -1,63 +0,0 @@ - -package net.sf.magicmap.client.gui.utils; - -import java.awt.Color; -import java.util.HashMap; -import java.util.Map; -import javax.swing.Icon; -import net.sf.magicmap.client.model.node.Node; -import org.apache.log4j.Logger; - -/** - * @author Florian Lederer - */ -public class NodeIcons { - - private static NodeIcons ni = null; - - private static Logger log = Logger.getLogger(NodeIcons.class); - - private static final INodeIcon DEFAULT_ICON = new INodeIcon() { - - Icon defaultIcon = GUIBuilder.getToolIcon("default.png", - "NodeIcons"); - - public Color getBgColor(Node node){ - return Color.BLACK; - } - - public Color getFgColor(Node node){ - return Color.BLACK; - } - - public Icon getIcon(Node node){ - return defaultIcon; - } - - public Class getNodeClass(){ - return null; - } - - public int getNodeType(){ - return -1; - } - }; - - private final Map<Class, INodeIcon> iconMap = new HashMap<Class, INodeIcon>(); - - private NodeIcons() {} - - public static NodeIcons getInstance(){ - if (NodeIcons.ni == null) NodeIcons.ni = new NodeIcons(); - return NodeIcons.ni; - } - - public INodeIcon getNodeIcon(Node node){ - return iconMap.get(node.getClass()); - } - - public void registerNodeIcon(INodeIcon icon){ - iconMap.put(icon.getNodeClass(), icon); - } - -} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fle...@us...> - 2007-02-24 02:27:56
|
Revision: 567 http://svn.sourceforge.net/magicmap/?rev=567&view=rev Author: flederohr Date: 2007-02-23 18:27:55 -0800 (Fri, 23 Feb 2007) Log Message: ----------- changed Handling of NodeIcons Added Paths: ----------- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java Added: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java =================================================================== --- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java (rev 0) +++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/NodeIcons.java 2007-02-24 02:27:55 UTC (rev 567) @@ -0,0 +1,68 @@ + +package net.sf.magicmap.client.gui.utils; + +import java.awt.Color; +import java.util.HashMap; +import java.util.Map; + +import javax.swing.Icon; + +import net.sf.magicmap.client.model.node.Node; + +import org.apache.log4j.Logger; + +/** + * @author Florian Lederer + */ +public class NodeIcons { + + private static NodeIcons ni = null; + + private static Logger log = Logger.getLogger(NodeIcons.class); + + private static final INodeIcon DEFAULT_ICON = new INodeIcon() { + + Icon defaultIcon = GUIBuilder.getToolIcon("default.png", + "NodeIcons"); + + public Color getBgColor(Node node){ + return Color.BLACK; + } + + public Color getFgColor(Node node){ + return Color.BLACK; + } + + public Icon getIcon(Node node){ + return defaultIcon; + } + + public Class getNodeClass(){ + return null; + } + + public int getNodeType(){ + return -1; + } + }; + + private final Map<Class, INodeIcon> iconMap = new HashMap<Class, INodeIcon>(); + + private NodeIcons() {} + + public static NodeIcons getInstance(){ + if (NodeIcons.ni == null) NodeIcons.ni = new NodeIcons(); + return NodeIcons.ni; + } + + public INodeIcon getNodeIcon(Node node){ + if (node == null) return null; + if (iconMap.containsKey(node.getClass())) return iconMap.get(node.getClass()); + return DEFAULT_ICON; + } + + public void registerNodeIcon(INodeIcon icon){ + iconMap.put(icon.getNodeClass(), icon); + } + +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |