Author: kono
Date: 2010-08-04 16:00:53 -0700 (Wed, 04 Aug 2010)
New Revision: 21203
Added:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/RenderingEngineFactory.java
Removed:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/PresentationFactory.java
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/VisualItemRenderer.java
Modified:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/NavigationPresentation.java
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/RenderingEngine.java
Log:
Presentation module classes are renamed for consistency.
Modified:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/NavigationPresentation.java
===================================================================
---
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/NavigationPresentation.java
2010-08-04 22:12:21 UTC (rev 21202)
+++
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/NavigationPresentation.java
2010-08-04 23:00:53 UTC (rev 21203)
@@ -3,6 +3,8 @@
import org.cytoscape.view.model.CyNetworkView;
+
+// TODO: remove this
public interface NavigationPresentation {
public void changeView(CyNetworkView view);
Deleted:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/PresentationFactory.java
===================================================================
---
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/PresentationFactory.java
2010-08-04 22:12:21 UTC (rev 21202)
+++
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/PresentationFactory.java
2010-08-04 23:00:53 UTC (rev 21203)
@@ -1,23 +0,0 @@
-package org.cytoscape.view.presentation;
-
-import org.cytoscape.view.model.View;
-
-public interface PresentationFactory {
- /**
- * A presentation can contain multiple view models. This enable
developers
- * to render multiple View Models in the same display. For example, if
- * View<CyNetwork> and View<Decoration> are passed to this, both of them
- * will be rendered in a window, using same rendering engine.
- */
- public RenderingEngine addPresentation(Object container, View<?>
viewModel);
-
- /**
- * This method should be removed.
- *
- * @param targetComponent
- * @param navBounds
- * @return
- */
- public NavigationPresentation addNavigationPresentation(
- Object targetComponent, Object navBounds);
-}
Modified:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/RenderingEngine.java
===================================================================
---
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/RenderingEngine.java
2010-08-04 22:12:21 UTC (rev 21202)
+++
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/RenderingEngine.java
2010-08-04 23:00:53 UTC (rev 21203)
@@ -11,14 +11,14 @@
import org.cytoscape.view.model.VisualProperty;
-public interface RenderingEngine {
+public interface RenderingEngine<T> {
/**
* Returns backend View Models for this presentation.
*
* @return view models.
*/
- public View<?> getViewModel();
+ public View<T> getViewModel();
/**
* Provide all compatible Visual Properties as a Visual Lexicon.
@@ -39,14 +39,16 @@
*
* @return DOCUMENT ME!
*/
- public Printable getPrintable();
+ public Printable createPrintable();
+
/**
* Render image from the current view model state.
*
* @return Image object created from current window.
*/
- public Image getImage(int width, int height);
+ public Image createImage(int width, int height);
+
/**
* For a given Visual Property, render an Icon based on the default
value of
@@ -60,5 +62,6 @@
* @exception IllegalArgumentException
* if vp is not in the lexicon.
*/
- public Icon getDefaultIcon(VisualProperty<?> vp);
+ public Icon createIcon(VisualProperty<?> vp);
+
}
Copied:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/RenderingEngineFactory.java
(from rev 21171,
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/PresentationFactory.java)
===================================================================
---
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/RenderingEngineFactory.java
(rev 0)
+++
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/RenderingEngineFactory.java
2010-08-04 23:00:53 UTC (rev 21203)
@@ -0,0 +1,26 @@
+package org.cytoscape.view.presentation;
+
+import org.cytoscape.view.model.View;
+
+public interface RenderingEngineFactory<T> {
+ /**
+ * A presentation can contain multiple view models. This enable
developers
+ * to render multiple View Models in the same display. For example, if
+ * View<CyNetwork> and View<Decoration> are passed to this, both of them
+ * will be rendered in a window, using same rendering engine.
+ */
+ public RenderingEngine<T> render(final Object visualizationContainer,
final View<T> viewModel);
+
+ /**
+ *
+ * TODO: remove this
+ *
+ * This method should be removed.
+ *
+ * @param targetComponent
+ * @param navBounds
+ * @return
+ */
+ public NavigationPresentation addNavigationPresentation(
+ Object targetComponent, Object navBounds);
+}
Deleted:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/VisualItemRenderer.java
===================================================================
---
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/VisualItemRenderer.java
2010-08-04 22:12:21 UTC (rev 21202)
+++
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/VisualItemRenderer.java
2010-08-04 23:00:53 UTC (rev 21203)
@@ -1,13 +0,0 @@
-package org.cytoscape.view.presentation;
-
-import org.cytoscape.view.model.View;
-import org.cytoscape.view.model.VisualLexicon;
-
-public interface VisualItemRenderer<T extends View<?>> {
- /**
- * Provide a set of Visual Properties this renderer can visualize.
- *
- * @return Set of VP as a VisualLexicon
- */
- public VisualLexicon getVisualLexicon();
-}
--
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.