Author: kono
Date: 2009-07-21 15:19:10 -0700 (Tue, 21 Jul 2009)
New Revision: 17509
Modified:
cytoscape3/trunk/application/src/main/java/cytoscape/actions/PrintAction.java
cytoscape3/trunk/application/src/main/java/cytoscape/internal/view/NetworkViewManager.java
Log:
Presentation API had been refactored based on the discussion last week.
Modified:
cytoscape3/trunk/application/src/main/java/cytoscape/actions/PrintAction.java
===================================================================
---
cytoscape3/trunk/application/src/main/java/cytoscape/actions/PrintAction.java
2009-07-21 22:18:22 UTC (rev 17508)
+++
cytoscape3/trunk/application/src/main/java/cytoscape/actions/PrintAction.java
2009-07-21 22:19:10 UTC (rev 17509)
@@ -48,13 +48,11 @@
import javax.swing.event.MenuEvent;
-import org.cytoscape.view.model.CyNetworkView;
-import org.cytoscape.view.presentation.Renderer;
+import org.cytoscape.session.CyNetworkManager;
+import org.cytoscape.view.presentation.RenderingEngine;
-import org.cytoscape.session.CyNetworkManager;
import cytoscape.util.CytoscapeAction;
-
/**
*
*/
@@ -71,7 +69,8 @@
/**
* Creates a new PrintAction object.
*/
- public PrintAction(CyNetworkManager netmgr, Properties props,
CyNetworkManager cyNetworkMgr) {
+ public PrintAction(CyNetworkManager netmgr, Properties props,
+ CyNetworkManager cyNetworkMgr) {
super(MENU_LABEL, netmgr);
setPreferredMenu("File");
setAcceleratorCombo(java.awt.event.KeyEvent.VK_P,
ActionEvent.CTRL_MASK);
@@ -81,18 +80,18 @@
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
public void actionPerformed(ActionEvent e) {
- Renderer<CyNetworkView> pres =
cyNetworkMgr.getCurrentPresentation();
+ RenderingEngine engine = cyNetworkMgr.getCurrentPresentation();
PrinterJob printJob = PrinterJob.getPrinterJob();
- pres.setProperties(props);
+ engine.setProperties(props);
- printJob.setPrintable(pres.getPrintable());
+ printJob.setPrintable(engine.getPrintable());
if (printJob.printDialog()) {
try {
@@ -104,9 +103,10 @@
}
/**
- * DOCUMENT ME!
- *
- * @param e DOCUMENT ME!
+ * DOCUMENT ME!
+ *
+ * @param e
+ * DOCUMENT ME!
*/
public void menuSelected(MenuEvent e) {
enableForNetworkAndView();
Modified:
cytoscape3/trunk/application/src/main/java/cytoscape/internal/view/NetworkViewManager.java
===================================================================
---
cytoscape3/trunk/application/src/main/java/cytoscape/internal/view/NetworkViewManager.java
2009-07-21 22:18:22 UTC (rev 17508)
+++
cytoscape3/trunk/application/src/main/java/cytoscape/internal/view/NetworkViewManager.java
2009-07-21 22:19:10 UTC (rev 17509)
@@ -45,16 +45,13 @@
import javax.swing.JDesktopPane;
import javax.swing.JInternalFrame;
+import javax.swing.Renderer;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
import javax.swing.event.InternalFrameListener;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.model.CyRowListener;
-import org.cytoscape.view.model.CyNetworkView;
-import org.cytoscape.view.presentation.PresentationFactory;
-import org.cytoscape.view.presentation.Renderer;
-
import org.cytoscape.session.CyNetworkManager;
import org.cytoscape.session.events.NetworkViewAboutToBeDestroyedEvent;
import org.cytoscape.session.events.NetworkViewAboutToBeDestroyedListener;
@@ -64,6 +61,10 @@
import org.cytoscape.session.events.SetCurrentNetworkListener;
import org.cytoscape.session.events.SetCurrentNetworkViewEvent;
import org.cytoscape.session.events.SetCurrentNetworkViewListener;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.presentation.PresentationFactory;
+import org.cytoscape.view.presentation.RenderingEngine;
+
import cytoscape.view.CyHelpBroker;
/**
@@ -76,7 +77,7 @@
private final JDesktopPane desktopPane;
private final Map<Long, JInternalFrame> networkViewMap;
- private final Map<Long, Renderer<CyNetworkView>> presentationMap;
+ private final Map<Long, RenderingEngine> presentationMap;
private final Map<JInternalFrame, Long> componentMap;
@@ -123,7 +124,7 @@
null);
networkViewMap = new HashMap<Long, JInternalFrame>();
- presentationMap = new HashMap<Long, Renderer<CyNetworkView>>();
+ presentationMap = new HashMap<Long, RenderingEngine>();
componentMap = new HashMap<JInternalFrame, Long>();
currentViewId = null;
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---