Author: rodche
Date: 2010-01-18 14:21:21 -0800 (Mon, 18 Jan 2010)
New Revision: 18952
Added:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/BiopaxNodeCtxMenuListener.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBiopaxXmlAction.java
Modified:
csplugins/trunk/toronto/rodche/BioPAX/lib/paxtools-simple-io-2.0-SNAPSHOT.jar
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/BioPaxGraphReader.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/BiopaxPlugin.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBioPaxDetails.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/LaunchExternalBrowser.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/mapping/MapBioPaxToCytoscape.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/util/BioPaxUtil.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/util/cytoscape/NetworkListener.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/BioPaxContainer.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/BioPaxDetailsPanel.java
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/LegendPanel.java
Log:
Right-click on a node now displays "Show OWL" menu option (which works);
[coming soon are basic functionality to edit/add and save the BioPAX]
Modified:
csplugins/trunk/toronto/rodche/BioPAX/lib/paxtools-simple-io-2.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/BioPaxGraphReader.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/BioPaxGraphReader.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/BioPaxGraphReader.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -39,6 +39,7 @@
import cytoscape.CyNode;
import cytoscape.Cytoscape;
import cytoscape.util.CyNetworkNaming;
+import cytoscape.coreplugins.biopax.action.BiopaxNodeCtxMenuListener;
import cytoscape.coreplugins.biopax.mapping.MapBioPaxToCytoscape;
import cytoscape.coreplugins.biopax.style.BioPaxVisualStyleUtil;
import cytoscape.coreplugins.biopax.util.BioPaxUtil;
@@ -81,16 +82,9 @@
private boolean validNetworkName;
private CyLayoutAlgorithm layout;
private String networkId;
-
- private static boolean createNodesForControls;
- private static CyLayoutAlgorithm defaultLayout;
+ private static CyLayoutAlgorithm defaultLayout = new LayoutUtil();
- static {
- defaultLayout = new LayoutUtil();
- createNodesForControls = false;
- }
-
/**
* Constructor
*
@@ -117,19 +111,6 @@
return networkId;
}
- public static void setCreateNodesForControls(Boolean b) {
- createNodesForControls = b;
- if(log.isDebugging()) {
- log.debug("createNodesForControls = " +
createNodesForControls);
- }
- }
-
-
- public static boolean getCreateNodesForControls() {
- return createNodesForControls;
- }
-
-
public static void setDefaultLayoutAlgorithm(CyLayoutAlgorithm algo) {
defaultLayout = algo;
}
@@ -304,7 +285,7 @@
}
// associate the new network with its model
- BioPaxUtil.setNetworkModel(cyNetwork, model);
+ BioPaxUtil.addNetworkModel(cyNetwork, model);
String modelString = (fileName!=null) ? fileName : "";
Cytoscape.getNetworkAttributes().setAttribute(
networkId, BioPaxUtil.BIOPAX_MODEL_STRING,
modelString);
@@ -323,6 +304,10 @@
bpContainer.showLegend();
NetworkListener networkListener = bpContainer.getNetworkListener();
networkListener.registerNetwork(cyNetwork);
+
+ // add node's context menu
+ BiopaxNodeCtxMenuListener nodeCtxMenuListener = new
BiopaxNodeCtxMenuListener();
+ view.addNodeContextMenuListener(nodeCtxMenuListener);
}
/**
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/BiopaxPlugin.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/BiopaxPlugin.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/BiopaxPlugin.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -35,7 +35,6 @@
import cytoscape.Cytoscape;
import cytoscape.CytoscapeInit;
import cytoscape.coreplugins.biopax.action.ExportAsBioPAXAction;
-import cytoscape.coreplugins.biopax.util.BioPaxUtil;
import cytoscape.coreplugins.biopax.view.BioPaxContainer;
import cytoscape.data.ImportHandler;
import cytoscape.layout.CyLayoutAlgorithm;
@@ -95,7 +94,6 @@
* This method is called by the main Cytoscape Application upon startup.
*/
public BiopaxPlugin() {
-
ImportHandler importHandler = new ImportHandler();
importHandler.addFilter(new BioPaxFilter());
@@ -112,7 +110,6 @@
CyMenus cyMenus = Cytoscape.getDesktop().getCyMenus();
cyMenus.addAction(new ExportAsBioPAXAction());
- cyMenus.addAction(new CreateNodesForControlsAction());
CyLayoutAlgorithm allLayouts[] = CyLayouts.getAllLayouts()
.toArray(new CyLayoutAlgorithm[1]);
@@ -128,40 +125,12 @@
cyMenus.addAction(new SelectDefaultLayoutAction(algo));
}
-
- // we are now interested in receiving all network events
- // like a load of a network from a session
- // to start listening to network events, we grab an instance of
- // a BioPaxContainerClass - this contains the network listener
+ // to start listening to network events, like a load of a
network from a session,
+ // we create an instance of a BioPaxContainerClass this
contains the network listener
BioPaxContainer.getInstance();
}
/**
- * For "Plugins->BioPaX Import->Create Nodes for Controls" menu item.
- * If checked, the reader creates cytoscape nodes for Controls
(Catalysis, etc.)
- * in the BioPaX file. If not checked, the reader represent Controls
by edges. *
- *
- * TODO does not work
- *
- */
- public class CreateNodesForControlsAction extends CytoscapeAction {
- private static final long serialVersionUID = 1L;
-
- public CreateNodesForControlsAction() {
- super("Create Nodes for Controls");
- this.setPreferredMenu("Plugins.BioPaX Import");
- useCheckBoxMenuItem = true;
- }
-
- public void actionPerformed(ActionEvent ae) {
-
BioPaxGraphReader.setCreateNodesForControls(!BioPaxGraphReader.getCreateNodesForControls());
- if(log.isDebugging()) {
- log.debug("createNodesForControls = " +
BioPaxGraphReader.getCreateNodesForControls());
- }
- }
- }
-
- /**
* For "Plugins->BioPaX Import->Default Layout" menu.
* One of these actions exists for each known layout.
* When the layout name is clicked, it becomes the default initial
layout for future biopax reads.
Added:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/BiopaxNodeCtxMenuListener.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/BiopaxNodeCtxMenuListener.java
(rev 0)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/BiopaxNodeCtxMenuListener.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -0,0 +1,22 @@
+package cytoscape.coreplugins.biopax.action;
+
+import giny.view.NodeView;
+
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+
+import ding.view.NodeContextMenuListener;
+
+public class BiopaxNodeCtxMenuListener implements NodeContextMenuListener {
+
+ public void addNodeContextMenuItems(NodeView nodeView, JPopupMenu menu)
{
+ JMenuItem myMenuItem = new JMenuItem("Show OWL");
+ myMenuItem.addActionListener(new
DisplayBiopaxXmlAction(nodeView));
+ if (menu == null) {
+ menu = new JPopupMenu();
+ }
+ menu.add(myMenuItem);
+
+ }
+
+}
Property changes on:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/BiopaxNodeCtxMenuListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBioPaxDetails.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBioPaxDetails.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBioPaxDetails.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -81,6 +81,7 @@
*
* @param event Select Event.
*/
+ @SuppressWarnings("unchecked")
public void onSelectEvent(SelectEvent event) {
int targetType = event.getTargetType();
@@ -105,8 +106,15 @@
CyNetwork cyNetwork =
Cytoscape.getCurrentNetwork();
String id = node.getIdentifier();
- if (id != null) {
- displayDetails(id);
+ if (id != null &&
!CySessionUtil.isSessionReadingInProgress()) {
+ // Conditionally, set up BP UI
+ // If we are reading a session file, ignore
the node selection event.
+ CytoscapeWrapper.initBioPaxPlugInUI();
+ // Show the details
+ bpPanel.showDetails(id);
+ // If legend is showing, show details
+ BioPaxContainer bpContainer =
BioPaxContainer.getInstance();
+ bpContainer.showDetails();
}
}
}
@@ -115,21 +123,6 @@
MapBioPaxToCytoscape.customNodes(Cytoscape.getCurrentNetworkView());
}
- private void displayDetails(String id) {
- // Conditionally, set up BP UI
- // If we are reading a session file, ignore the node selection event.
- if (!CySessionUtil.isSessionReadingInProgress()) {
- CytoscapeWrapper.initBioPaxPlugInUI();
-
- // Show the details
- bpPanel.showDetails(id);
-
- // If legend is showing, show details
- BioPaxContainer bpContainer = BioPaxContainer.getInstance();
- bpContainer.showDetails();
- }
- }
-
/**
* Recursive Method for Walking up a Containment Tree, looking for
* a CytoPanel
Added:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBiopaxXmlAction.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBiopaxXmlAction.java
(rev 0)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBiopaxXmlAction.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -0,0 +1,53 @@
+package cytoscape.coreplugins.biopax.action;
+
+import giny.view.NodeView;
+
+import java.awt.event.ActionEvent;
+import java.io.StringWriter;
+
+import javax.swing.JOptionPane;
+
+import org.biopax.paxtools.io.simpleIO.SimpleExporter;
+import org.biopax.paxtools.model.BioPAXElement;
+import org.biopax.paxtools.model.Model;
+
+import cytoscape.Cytoscape;
+import cytoscape.coreplugins.biopax.mapping.MapBioPaxToCytoscape;
+import cytoscape.coreplugins.biopax.util.BioPaxUtil;
+import cytoscape.logger.CyLogger;
+import cytoscape.util.CytoscapeAction;
+
+public final class DisplayBiopaxXmlAction extends CytoscapeAction {
+ private static final CyLogger log =
CyLogger.getLogger(DisplayBiopaxXmlAction.class);
+
+ private NodeView nodeView;
+
+ public DisplayBiopaxXmlAction(NodeView nodeView) {
+ this.nodeView = nodeView;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent event) {
+ String nodeId = nodeView.getNode().getIdentifier();
+ String biopaxId = Cytoscape.getNodeAttributes()
+ .getStringAttribute(nodeId,
MapBioPaxToCytoscape.BIOPAX_RDF_ID);
+ Model m =
BioPaxUtil.getNetworkModel(Cytoscape.getCurrentNetwork());
+ BioPAXElement bpe = m.getByID(biopaxId);
+ StringWriter writer = new StringWriter();
+ if (bpe != null) {
+ log.info("printing " + bpe + " OWL");
+ try {
+ SimpleExporter simpleExporter = new
SimpleExporter(m.getLevel());
+ //TODO Fix: it prints '<:null' instead '<bp:'
when using writeObject method!
+ simpleExporter.writeObject(writer, bpe);
+ } catch (Exception e) {
+ log.error("Faild printing '" + nodeId + "' to
OWL", e);
+ }
+ } else {
+ log.info("Node : " + nodeId
+ + ", BP element not found : " +
biopaxId);
+ }
+ JOptionPane.showMessageDialog( Cytoscape.getDesktop(),
writer.toString());
+ }
+
+}
Property changes on:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/DisplayBiopaxXmlAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/LaunchExternalBrowser.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/LaunchExternalBrowser.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/action/LaunchExternalBrowser.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -34,7 +34,6 @@
import cytoscape.coreplugins.biopax.util.cytoscape.CytoscapeWrapper;
import cytoscape.util.OpenBrowser;
-
import java.net.URL;
import javax.swing.event.HyperlinkEvent;
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/mapping/MapBioPaxToCytoscape.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/mapping/MapBioPaxToCytoscape.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/mapping/MapBioPaxToCytoscape.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -97,6 +97,9 @@
*/
public static final String BIOPAX_NETWORK = "BIOPAX_NETWORK";
+
+ public final static String BINARY_NETWORK = "BINARY_NETWORK";
+
/**
* Cytoscape Attribute: BioPAX Edge Type.
*/
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/util/BioPaxUtil.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/util/BioPaxUtil.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/util/BioPaxUtil.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -35,6 +35,7 @@
import cytoscape.Cytoscape;
import cytoscape.coreplugins.biopax.mapping.MapBioPaxToCytoscape;
import cytoscape.coreplugins.biopax.util.links.ExternalLink;
+import cytoscape.data.CyAttributes;
import cytoscape.logger.CyLogger;
import org.biopax.paxtools.controller.EditorMap;
@@ -928,7 +929,7 @@
networkModelMap.remove(cyNetwork);
}
- public static boolean setNetworkModel(CyNetwork cyNetwork, Model
bpModel) {
+ public static boolean addNetworkModel(CyNetwork cyNetwork, Model
bpModel) {
networkModelMap.put(cyNetwork, bpModel);
return true;
}
@@ -937,11 +938,15 @@
Model bpModel = networkModelMap.get(cyNetwork);
return bpModel;
}
-
+
public static boolean isBioPAXNetwork(CyNetwork cyNetwork) {
- Object answer = Cytoscape.getNetworkAttributes().getAttribute(
- cyNetwork.getIdentifier(),
MapBioPaxToCytoscape.BIOPAX_NETWORK);
+ // get the network attributes
+ CyAttributes networkAttributes =
Cytoscape.getNetworkAttributes();
+ String networkID = cyNetwork.getIdentifier();
+ Boolean b1 = networkAttributes.getBooleanAttribute(networkID,
+
MapBioPaxToCytoscape.BIOPAX_NETWORK);
+ Boolean b2 = networkAttributes.getBooleanAttribute(networkID,
MapBioPaxToCytoscape.BINARY_NETWORK);
- return (answer != null) && answer.equals(Boolean.TRUE);
+ return (b1 != null && b1) || (b2 != null && b2);
}
}
\ No newline at end of file
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/util/cytoscape/NetworkListener.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/util/cytoscape/NetworkListener.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/util/cytoscape/NetworkListener.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -35,10 +35,8 @@
import cytoscape.Cytoscape;
import cytoscape.coreplugins.biopax.action.DisplayBioPaxDetails;
-import cytoscape.coreplugins.biopax.mapping.MapBioPaxToCytoscape;
import cytoscape.coreplugins.biopax.util.BioPaxUtil;
import cytoscape.coreplugins.biopax.view.BioPaxDetailsPanel;
-import cytoscape.data.CyAttributes;
import cytoscape.data.SelectFilter;
import cytoscape.view.CyNetworkView;
@@ -52,10 +50,9 @@
* Listens for Network Events, and takes appropriate Actions.
* May be subclassed.
*
- * @author Ethan Cerami / Benjamin Gross.
+ * @author Ethan Cerami / Benjamin Gross / Igor Rodchenkov.
*/
public class NetworkListener implements PropertyChangeListener {
- //private ArrayList cyNetworkList = new ArrayList();
private BioPaxDetailsPanel bpPanel;
/**
@@ -64,7 +61,6 @@
* @param bpPanel BioPaxDetails Panel Object.
*/
public NetworkListener(BioPaxDetailsPanel bpPanel) {
- //this.cyNetworkList = new ArrayList();
this.bpPanel = bpPanel;
// to catch network creation / destruction events
@@ -81,7 +77,6 @@
* @param cyNetwork Object.
*/
public void registerNetwork(CyNetwork cyNetwork) {
- //cyNetworkList.add(cyNetwork.getIdentifier());
registerNodeSelectionEvents(cyNetwork);
}
@@ -146,7 +141,7 @@
cyNetwork = Cytoscape.getNetwork(networkID);
}
- if(isBioPaxNetwork(cyNetwork)) {
+ if(BioPaxUtil.isBioPAXNetwork(cyNetwork)) {
bpPanel.resetText();
Cytoscape.firePropertyChange(Cytoscape.ATTRIBUTES_CHANGED, null, null);
}
@@ -176,7 +171,6 @@
if (networkId != null) {
// update bpPanel accordingly
if (!sessionLoaded) {
- //if (cyNetworkList.contains(networkId)) {
if (BioPaxUtil.getNetworkModelMap().containsKey(cyNetwork)) {
bpPanel.resetText();
} else {
@@ -185,14 +179,12 @@
}
}
- /*
// due to quirky-ness in event model, we could get here without
registering network
// check if this is a biopax network
- if (isBioPaxNetwork(cyNetwork)
- && !cyNetworkList.contains(networkId)) {
+ if (BioPaxUtil.isBioPAXNetwork(cyNetwork)
+ &&
!BioPaxUtil.getNetworkModelMap().containsKey(cyNetwork)) {
registerNetwork(cyNetwork);
}
- */
}
Cytoscape.firePropertyChange(Cytoscape.ATTRIBUTES_CHANGED,
null, null);
}
@@ -203,14 +195,6 @@
* @param networkID the ID of the CyNetwork just destroyed.
*/
private void networkDestroyed(String networkID) {
- // get the index (if it exists) of this network in our list
- /*
- int networkIndex = cyNetworkList.indexOf(networkID);
- // if it exists, remove it
- if (networkIndex >= 0) {
- cyNetworkList.remove(networkIndex);
- }
- */
// destroy the corresponding model
BioPaxUtil.removeNetworkModel(Cytoscape.getNetwork(networkID));
Cytoscape.firePropertyChange(Cytoscape.ATTRIBUTES_CHANGED,
null, null);
@@ -223,20 +207,6 @@
*/
private boolean networkViewsRemain() {
// interate through our network list checking if their views
exists
- /*
- for (int lc = 0; lc < cyNetworkList.size(); lc++) {
- // get the network id
- String id = (String) cyNetworkList.get(lc);
-
- // get the network view via id
- CyNetworkView cyNetworkView =
Cytoscape.getNetworkView(id);
-
- if (cyNetworkView != null) {
- return true;
- }
- }
- */
-
for (CyNetwork cn : BioPaxUtil.getNetworkModelMap().keySet()) {
// get the network id
String id = cn.getIdentifier();
@@ -258,29 +228,4 @@
+ " a BioPAX file to proceed.");
}
- /*
- * Determines if any network views we have created remains.
- *
- * @return boolean if any network views that we have created remain.
- */
- private boolean isBioPaxNetwork(CyNetwork cyNetwork) {
- // get the network attributes
- CyAttributes networkAttributes =
Cytoscape.getNetworkAttributes();
-
- // get cyNetwork id
- String networkID = cyNetwork.getIdentifier();
-
- // is the biopax network attribute true ?
- Boolean b1 = networkAttributes.getBooleanAttribute(networkID,
-
MapBioPaxToCytoscape.BIOPAX_NETWORK);
-
- Boolean b2 = networkAttributes.getBooleanAttribute(networkID,
"BINARY_NETWORK");
-
- // outta here
- if (b1 == null && b2 == null) {
- return false;
- } else {
- return true;
- }
- }
}
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/BioPaxContainer.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/BioPaxContainer.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/BioPaxContainer.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -59,6 +59,7 @@
* @author Ethan Cerami
*/
public class BioPaxContainer extends JPanel {
+ private static final long serialVersionUID = 1L;
/**
* CytoPanel Location of this Panel
*/
@@ -94,17 +95,16 @@
label.setOpaque(false);
label.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES,
Boolean.TRUE);
label.addHyperlinkListener(new HyperlinkListener() {
-
- public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
- if (hyperlinkEvent.getEventType() ==
HyperlinkEvent.EventType.ACTIVATED) {
- String name = hyperlinkEvent.getDescription();
- if (name.equalsIgnoreCase("LEGEND")) {
- showLegend();
- } else {
- showDetails();
- }
- }
- }
+ public void hyperlinkUpdate(HyperlinkEvent
hyperlinkEvent) {
+ if (hyperlinkEvent.getEventType() ==
HyperlinkEvent.EventType.ACTIVATED) {
+ String name =
hyperlinkEvent.getDescription();
+ if (name.equalsIgnoreCase("LEGEND")) {
+ showLegend();
+ } else {
+ showDetails();
+ }
+ }
+ }
});
label.setAlignmentX(Component.LEFT_ALIGNMENT);
@@ -151,7 +151,6 @@
if (bioPaxContainer == null) {
bioPaxContainer = new BioPaxContainer();
}
-
return bioPaxContainer;
}
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/BioPaxDetailsPanel.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/BioPaxDetailsPanel.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/BioPaxDetailsPanel.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -38,11 +38,16 @@
import cytoscape.coreplugins.biopax.mapping.MapBioPaxToCytoscape;
import cytoscape.coreplugins.biopax.util.BioPaxUtil;
import cytoscape.data.CyAttributes;
+import cytoscape.logger.CyLogger;
+import org.biopax.paxtools.io.simpleIO.SimpleExporter;
+import org.biopax.paxtools.model.Model;
import org.biopax.paxtools.model.level2.physicalEntity;
import org.biopax.paxtools.model.level3.PhysicalEntity;
import java.awt.*;
+import java.io.IOException;
+import java.io.StringWriter;
import java.util.List;
@@ -61,6 +66,8 @@
* @author Ethan Cerami.
*/
public class BioPaxDetailsPanel extends JPanel {
+ private static final CyLogger log =
CyLogger.getLogger(BioPaxDetailsPanel.class);
+
/**
* Foreground Color.
*/
Modified:
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/LegendPanel.java
===================================================================
---
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/LegendPanel.java
2010-01-18 19:32:56 UTC (rev 18951)
+++
csplugins/trunk/toronto/rodche/BioPAX/src/cytoscape/coreplugins/biopax/view/LegendPanel.java
2010-01-18 22:21:21 UTC (rev 18952)
@@ -6,7 +6,6 @@
import javax.swing.event.HyperlinkEvent;
import java.awt.*;
import java.net.URL;
-import java.io.IOException;
import cytoscape.Cytoscape;
import cytoscape.coreplugins.biopax.util.net.WebFileConnect;
@@ -18,7 +17,9 @@
*/
public class LegendPanel extends JPanel {
- /**
+ private static final long serialVersionUID = 1L;
+
+ /**
* BioPAX Legend.
*/
public static int BIOPAX_LEGEND = 0;
@@ -59,17 +60,20 @@
temp.append("</BODY></HTML>");
textPane.setText(temp.toString());
- textPane.addHyperlinkListener(new HyperlinkListener() {
-
+ /*
+ textPane.addHyperlinkListener(new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
if (hyperlinkEvent.getEventType() ==
HyperlinkEvent.EventType.ACTIVATED) {
String name = hyperlinkEvent.getDescription();
if (name.equalsIgnoreCase("filter")) {
EdgeFilterUi ui = new
EdgeFilterUi(Cytoscape.getCurrentNetwork());
+ //TODO No action or logic was here; is something
missing?..
}
}
}
});
+ */
+
BioPaxDetailsPanel.modifyStyleSheetForSingleDocument(textPane);
JScrollPane scrollPane = new JScrollPane(textPane);
--
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.