Author: kono
Date: 2012-01-13 13:30:20 -0800 (Fri, 13 Jan 2012)
New Revision: 28012
Modified:
core3/impl/trunk/vizmap-gui-impl/src/main/java/org/cytoscape/view/vizmap/gui/internal/AttributeSetManager.java
Log:
Code reformat only.
Modified:
core3/impl/trunk/vizmap-gui-impl/src/main/java/org/cytoscape/view/vizmap/gui/internal/AttributeSetManager.java
===================================================================
---
core3/impl/trunk/vizmap-gui-impl/src/main/java/org/cytoscape/view/vizmap/gui/internal/AttributeSetManager.java
2012-01-13 19:56:32 UTC (rev 28011)
+++
core3/impl/trunk/vizmap-gui-impl/src/main/java/org/cytoscape/view/vizmap/gui/internal/AttributeSetManager.java
2012-01-13 21:30:20 UTC (rev 28012)
@@ -1,6 +1,5 @@
package org.cytoscape.view.vizmap.gui.internal;
-
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -23,10 +22,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
-public class AttributeSetManager implements ColumnDeletedListener,
- ColumnCreatedListener, NetworkAddedListener
-{
+public class AttributeSetManager implements ColumnDeletedListener,
ColumnCreatedListener, NetworkAddedListener {
+
private static final Logger logger =
LoggerFactory.getLogger(AttributeSetManager.class);
private static final Set<Class<? extends CyTableEntry>> GRAPH_OBJECTS;
@@ -47,27 +44,15 @@
this.attrSets = new HashMap<CyNetwork, Map<Class<? extends
CyTableEntry>, AttributeSet>>();
this.tableSets = new HashMap<CyNetwork, Map<Class<? extends
CyTableEntry>, Set<CyTable>>>();
-
-
-// final Set<CyNetwork> networkSet = networkMgr.getNetworkSet();
-// for (final CyNetwork net : networkSet) {
-// final Map<String, CyTable> tableMap =
tableMgr.getTableMap(name, net);
-// targetTables.addAll(tableMap.values());
-//
-// for (final CyTable table : tableMap.values())
-// attrNames.addAll(table.getColumnMap().keySet());
-// }
}
public AttributeSet getAttributeSet(final CyNetwork network, final
Class<? extends CyTableEntry> objectType) {
if (network == null || objectType == null)
- throw new NullPointerException(
- "Both parameters should not be null.");
+ throw new NullPointerException("Both parameters should
not be null.");
final Map<Class<? extends CyTableEntry>, AttributeSet>
attrSetMap = this.attrSets.get(network);
if (attrSetMap == null)
- throw new NullPointerException(
- "No such network registered in this
mamager: " + network);
+ throw new NullPointerException("No such network
registered in this mamager: " + network);
return attrSetMap.get(objectType);
}
@@ -75,9 +60,9 @@
@Override
public void handleEvent(NetworkAddedEvent e) {
final CyNetwork network = e.getNetwork();
-
+
logger.debug("@@@@@@ Attr Set manager got new network." +
network.getSUID());
-
+
final Map<Class<? extends CyTableEntry>, Set<CyTable>>
object2tableMap = new HashMap<Class<? extends CyTableEntry>, Set<CyTable>>();
final Map<Class<? extends CyTableEntry>, AttributeSet>
attrSetMap = new HashMap<Class<? extends CyTableEntry>, AttributeSet>();
@@ -104,10 +89,10 @@
@Override
public void handleEvent(ColumnCreatedEvent e) {
-
+
final String newAttrName = e.getColumnName();
final CyTable table = e.getSource();
-
+
for (CyNetwork network : tableSets.keySet()) {
Map<Class<? extends CyTableEntry>, Set<CyTable>> tMap =
tableSets.get(network);
for (final Class<? extends CyTableEntry> objectType :
GRAPH_OBJECTS) {
@@ -115,11 +100,8 @@
if (!targetTables.contains(table))
continue;
- this.attrSets.get(network)
- .get(objectType)
- .getAttrMap()
- .put(newAttrName,
-
table.getColumn(newAttrName).getType());
+
this.attrSets.get(network).get(objectType).getAttrMap()
+ .put(newAttrName,
table.getColumn(newAttrName).getType());
return;
}
}
@@ -136,8 +118,7 @@
if (!targetTables.contains(table))
continue;
-
this.attrSets.get(network).get(objectType).getAttrMap()
- .remove(e.getColumnName());
+
this.attrSets.get(network).get(objectType).getAttrMap().remove(e.getColumnName());
return;
}
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.