Author: sfederow
Date: 2009-08-10 03:08:29 -0700 (Mon, 10 Aug 2009)
New Revision: 17754
Modified:
csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimatorDialog.java
csplugins/trunk/soc/sfederow/CyAnimator/src/CyFrame.java
csplugins/trunk/soc/sfederow/CyAnimator/src/FrameManager.java
csplugins/trunk/soc/sfederow/CyAnimator/src/Interpolator.java
Log:
Modified: csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimatorDialog.java
===================================================================
--- csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimatorDialog.java
2009-08-09 05:43:43 UTC (rev 17753)
+++ csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimatorDialog.java
2009-08-10 10:08:29 UTC (rev 17754)
@@ -1,3 +1,15 @@
+/*
+ * File: CyFrame.java
+ * Google Summer of Code
+ * Written by Steve Federowicz with help from Scooter Morris
+ *
+ * This contains all of the swing code for the GUI which is essentially just a
thumbnail viewer
+ * accompanied by stop, play, pause, forwards, and backwards buttons. It also
contains a slider
+ * which is used to adjust the speed of the animations. Each thumbnail is
created by putting an
+ * ImageIcon onto a JButton.
+ *
+ */
+
package CyAnimator;
import giny.model.Node;
@@ -112,17 +124,7 @@
private FrameManager frameManager;
int thumbnailPopupIndex = 0;
-
- //private int fps = 10;
- //CyFrame[] frames = null;
-
- //private NodeView[] currentFrame;
- //private HashMap<String, double[]> posFrame;
- //private HashMap<String, Paint> colFrame;
ArrayList<CyFrame> frameList; // = new ArrayList<CyFrame>();
- //ArrayList<CyNetworkView> viewList = new ArrayList<CyNetworkView>();
- //private CyFrame[]
- //private Timer timer;
public CyAnimatorDialog(){
@@ -358,15 +360,17 @@
*/
public void updateThumbnails(){
-
+ //remove the framePane so that a new one can be made with the
updated thumbnails
mainPanel.remove(framePane);
framePanel = new JPanel();
+ //make a horizontal box layout
BoxLayout box = new BoxLayout(framePanel, BoxLayout.X_AXIS);
framePanel.setLayout(box);
MouseListener popupListener = new PopupListener();
+ //update the frameList
frameList = frameManager.getKeyFrameList();
int i = 0;
@@ -379,14 +383,15 @@
for(CyFrame frame: frameList){
+ //get the thumbnail image
ImageIcon ic = new ImageIcon(frame.getFrameImage());
+ //put the image on the thumbnail button
JButton thumbnailButton = new JButton(ic);
thumbnailButton.addMouseListener(dragnDrop);
thumbnailButton.addActionListener(this);
thumbnailButton.setActionCommand(frame.getID());
- //System.out.println(ic.getIconWidth());
//for some reason thumbnailButton.getWidth() returns 0 so I
had
//to improvise and use the icon width plus 13 pixels
for the border.
@@ -394,6 +399,7 @@
dragnDrop.setFrameHeight(ic.getIconHeight());
+ //create a popupmenu for each thumbnail and add the
menu items
thumbnailMenu = new JPopupMenu();
JMenu interpolateMenu = new JMenu("Interpolate");
menuItem = new JMenuItem("10 Frames");
@@ -420,7 +426,7 @@
menuItem.addActionListener(this);
menuItem.setActionCommand("interpolate0_");
interpolateMenu.add(menuItem);
-
+
thumbnailMenu.add(interpolateMenu);
menuItem = new JMenuItem("Delete");
@@ -429,7 +435,6 @@
menuItem.addMouseListener(popupListener);
thumbnailMenu.add(menuItem);
- System.out.println("Update: "+frame.getID());
menuItem = new JMenuItem("Move Right");
menuItem.addActionListener(this);
@@ -448,9 +453,10 @@
menuList.add(thumbnailMenu);
-
+ //set the name of the button to the integer position of
the frame in the list
thumbnailButton.setName(i+"");
i++;
+
thumbnailButton.addMouseListener(popupListener);
framePanel.add(thumbnailButton);
@@ -459,8 +465,10 @@
dragnDrop.setFrameWidth(totalFrameWidth);
+ //recreate the scrollpane with the updated framePanel
framePane = new JScrollPane(framePanel);
+ //add it to the main dialog panel
mainPanel.add(framePane);
}
Modified: csplugins/trunk/soc/sfederow/CyAnimator/src/CyFrame.java
===================================================================
--- csplugins/trunk/soc/sfederow/CyAnimator/src/CyFrame.java 2009-08-09
05:43:43 UTC (rev 17753)
+++ csplugins/trunk/soc/sfederow/CyAnimator/src/CyFrame.java 2009-08-10
10:08:29 UTC (rev 17754)
@@ -1,3 +1,16 @@
+/*
+ * File: CyFrame.java
+ * Google Summer of Code
+ * Written by Steve Federowicz with help from Scooter Morris
+ *
+ * The CyFrame class is essentially a wrapper on a CyNetworkView. It works by
having a populate() method which essentially extracts the
+ * necessary view data from the current CyNetworkView and stores it in the
CyFrame. Each CyFrame also contains a display() method which
+ * updates the current network view based upon the visual data stored in that
particular CyFrame. It also can hold an image of the network
+ * and contains a facility for writing this image to a file.
+ *
+ */
+
+
package CyAnimator;
Modified: csplugins/trunk/soc/sfederow/CyAnimator/src/FrameManager.java
===================================================================
--- csplugins/trunk/soc/sfederow/CyAnimator/src/FrameManager.java
2009-08-09 05:43:43 UTC (rev 17753)
+++ csplugins/trunk/soc/sfederow/CyAnimator/src/FrameManager.java
2009-08-10 10:08:29 UTC (rev 17754)
@@ -1,3 +1,15 @@
+/*
+ * File: FrameManager.java
+ * Google Summer of Code
+ * Written by Steve Federowicz with help from Scooter Morris
+ *
+ * FrameManager is the driving class for the animations which holds the list
of key frames, creates and manages the timer, and essentially
+ * makes the animation. The primary function is to create a timer (
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Timer.html) which
+ * fires an action command at a specified interval displaying each frame in
the animation in rapid succession. There is also support
+ * for all of the standard, play, stop, pause, step forwards, step backwards
commands along with code to set up the exporting of images.
+ */
+
+
package CyAnimator;
import java.awt.event.ActionEvent;
Modified: csplugins/trunk/soc/sfederow/CyAnimator/src/Interpolator.java
===================================================================
--- csplugins/trunk/soc/sfederow/CyAnimator/src/Interpolator.java
2009-08-09 05:43:43 UTC (rev 17753)
+++ csplugins/trunk/soc/sfederow/CyAnimator/src/Interpolator.java
2009-08-10 10:08:29 UTC (rev 17754)
@@ -1,5 +1,24 @@
+/*
+ * File: AttributeSaverDialog.java
+ * Google Summer of Code
+ * Written by Steve Federowicz with help from Scooter Morris
+ *
+ * The Interpolator is what make the animations go smoothly. It works by
taking a list of the key frames for the animation from which it
+ * determines how many frames will be in the final animation after
interpolation. It then creates an array of CyFrames which gets "filled"
+ * with all of the interpolation data as it is generated. This works by
creating lists of FrameInterpolators which is a generic interface
+ * (FrameInterpolator.java) that has only one method, interpolate(). There are
then many inner classes in Interpolator.java which implement
+ * FrameInterpolator and do the interpolation of a single visual property. For
example there is currently interpolateNodeColor, interpolateNodeOpacity
+ * interpolateNodePosition, interpolateEdgeColor, interpolateNetworkColor
etc... Thus the design is such that many interpolators can ultimately
+ * be made and swapped in or out at will. After the set of interpolators are
decided, they are iterated through and all of the NodeView, EdgeView,
+ * and NetworkView data is interpolated appropriately for each frame in the
frame array.
+ *
+ *
+ */
+
+
package CyAnimator;
+
import giny.model.Node;
import giny.view.NodeView;
import giny.model.Edge;
@@ -19,12 +38,19 @@
public class Interpolator {
+
+ /*
+ * These lists of FrameInterpolators define the set of visual properties
+ * which will be
+ *
+ */
List<FrameInterpolator> nodeInterpolators = new
ArrayList<FrameInterpolator>();
List<FrameInterpolator> edgeInterpolators = new
ArrayList<FrameInterpolator>();
List<FrameInterpolator> networkInterpolators = new
ArrayList<FrameInterpolator>();
public Interpolator(){
+ //add any desired interpolators to their respective
interpolator lists
nodeInterpolators.add(new interpolateNodePosition());
nodeInterpolators.add(new interpolateNodeColor());
nodeInterpolators.add(new interpolateNodeOpacity());
@@ -36,16 +62,34 @@
networkInterpolators.add(new interpolateNetworkColor());
networkInterpolators.add(new interpolateNetworkCenter());
- //generateInterpolatedFrames(one, two, 10);
+
}
+ /*
+ * This is the driver method which takes a list of key frames and runs
the frames
+ * in sets of two through the interpolators to generate the
intermediate frames.
+ *
+ * @param frameList is a list of CyFrames which are key frames in the
animation
+ * @return an array of CyFrames which contains each of the key frames
with the interpolated frames appropriately interspersed
+ */
public CyFrame[] makeFrames(List<CyFrame> frameList) {
if(frameList.size() == 0){ return null; }
+
+ //initialize the framecount to the number of key frames
int framecount = frameList.size();
- for(int i=0; i<frameList.size()-1; i++){ framecount =
framecount + frameList.get(i).getInterCount() - 1; }
+
+ //add on the number of frames to be interpolated
+ for(int i=0; i<frameList.size()-1; i++){
+
+ //each frame contains the number of frames which will
be interpolated after it which is the interCount
+ framecount = framecount +
frameList.get(i).getInterCount() - 1;
+ }
+
+ //create the main CyFrame array which will then be run through
all of the interpolators
CyFrame[] cyFrameArray = new CyFrame[framecount];
//(frameList.size()-1)*framecount + 1];
+ //initialize the CyFrame array
for(int i=0; i<cyFrameArray.length; i++){
cyFrameArray[i] = new
CyFrame(frameList.get(0).getCurrentNetwork());
}
@@ -53,19 +97,40 @@
int start = 0;
int end = 0;
+ /*
+ * Runs through the key frame list and adds to the CyFrame
array by interpolating between
+ * two frames at a time in succession. For example it might
take key frame one and key frame
+ * two and then interpolate the node visual properties from
frame one to frame two, then the
+ * edge visual properties from frame one to two etc.. It then
does the same thing for frame
+ * two and frame three, then frame three and frame four, etc...
until the key frames are fully
+ * interpolated.
+ */
for(int i=0; i < frameList.size()-1; i++) {
+
+ //set framecount for this round of interpolation
framecount = frameList.get(i).getInterCount();
+
+ //set ending point for frames to be made
end = start + framecount;
+
+ //set the first frame to the the first key frame
cyFrameArray[start] = frameList.get(i);
List<NodeView> nodeList =
nodeViewUnionize(frameList.get(i), frameList.get(i+1));
List<EdgeView> edgeList =
edgeViewUnionize(frameList.get(i), frameList.get(i+1));
+ //reset the nodeLists once the unionizer has updated
them
for (int k = start+1; k < end; k++) {
cyFrameArray[k].setNodeViewList(nodeList);
cyFrameArray[k].setEdgeViewList(edgeList);
}
-
+ /*
+ * Interpolates all of the node, edge, and network
visual properties, this happens by
+ * iterating through the respective lists of
FrameInterpolators which are classes that
+ * implement FrameInterpolator. This allows for
modularization of the interpolation as
+ * you can easily change which FrameInterpolators are
in the node, edge, and network
+ * interpolation lists.
+ */
for(FrameInterpolator interp: nodeInterpolators){
cyFrameArray = interp.interpolate(nodeList,
frameList.get(i), frameList.get(i+1), start, end, cyFrameArray);
}
@@ -86,32 +151,16 @@
}
- public CyFrame[] makeFrames(CyFrame frameOne, CyFrame frameTwo, int
framenum) {
- //
if(!frameOne.getCurrentNetwork().getIdentifier().equals(frameTwo.getCurrentNetwork().getIdentifier())){
- //throw new Exception("Frames cannot be interpolated
across different networks.");
- // System.out.println("Frames cannot be interpolated
across different networks.");
- // }
-
-
- CyNetwork currentNetwork = frameOne.getCurrentNetwork();
-
-
- CyFrame[] cyFrameArray = new CyFrame[framenum+2];
- cyFrameArray[0] = frameOne;
- cyFrameArray[framenum+1] = frameTwo;
- for(int i=1; i<framenum+1; i++){
- cyFrameArray[i] = new CyFrame(currentNetwork);
- }
-
- //cyFrameArray = interpolatePosition(frameOne, frameTwo, 0,
framenum+2, cyFrameArray);
- //cyFrameArray = interpolateNodeColor(frameOne, frameTwo, 0,
framenum+2, cyFrameArray);
-
-
- return cyFrameArray;
-
- }
-
-
+ /*
+ * Takes two CyFrames and returns a list of NodeViews which is the
union of the list of
+ * NodeViews that are in each of the two frames. This is done to
accomodate the adding/deleting
+ * of nodes between frames in animation as the union provides a
complete set of nodes when
+ * moving across frames.
+ *
+ * @param frameOne is the first of two frames to be unionized
+ * @param frameTwo is the second of two frames to be unionized
+ * @return the unionized list of NodeViews
+ */
public List<NodeView> nodeViewUnionize(CyFrame frameOne, CyFrame
frameTwo){
List<NodeView> list1 = frameOne.getNodeViewList();
@@ -129,6 +178,18 @@
return new ArrayList<NodeView>(bigList.keySet());
}
+
+ /*
+ * Takes two CyFrames and returns the union of the EdgeView lists that
are contained
+ * within each frame. This is to ensure that when edges are
added/deleted they will
+ * be able to be interpolated from one frame to the next instead of
just instantly
+ * disappearing.
+ *
+ * @param frameOne is the first frame whose edge list will be unionized
+ * @param frameTwo is the second frame whose edge list will be unionized
+ * @return the unionized list of EdgeViews
+ *
+ */
public List<EdgeView> edgeViewUnionize(CyFrame frameOne, CyFrame
frameTwo){
List<EdgeView> list1 = frameOne.getEdgeViewList();
@@ -147,95 +208,144 @@
}
+
+ /*
+ * This method performs a generic color interpolation and is used by
many of the interpolators
+ * to do their color interpolations. It simply takes the absolute
difference between the R, G, and B
+ * values from the two colors, divides the difference by the number of
intervals which will
+ * be interpolated, and then eithers adds or subtracts the appropriate
amount for each R, G, and B
+ * value and creates a new color which is placed in the color array.
The color array thus has colorOne
+ * as its first value and colorTwo as its last value with the
interpolated colors filling the middle of
+ * the array.
+ *
+ * @param colorOne is the color to be interpolated from
+ * @param colorTwo is the color to be interpolated to
+ * @param framenum is the number or frames which need to be
interpolated for and thus the length of the color array
+ * @return the array of interpolated colors
+ *
+ */
public Color[] interpolateColor(Color colorOne, Color colorTwo, int
framenum){
Color[] paints = new Color[framenum+1];
+
+ //set up regex for RGB values
+ Pattern p =
Pattern.compile("java.awt.Color\\[r=(\\d+),g=(\\d+),b=(\\d+)\\]");
+ Matcher cOne = p.matcher(colorOne.toString());
+ Matcher cTwo = p.matcher(colorTwo.toString());
+
+ int red1 = 0;
+ int green1 = 0;
+ int blue1 = 0;
+
+ int red2 = 0;
+ int green2 = 0;
+ int blue2 = 0;
+
+ //match RBG values for colorOne
+ if(cOne.matches()){
+ red1 = Integer.parseInt(cOne.group(1));
+ green1 = Integer.parseInt(cOne.group(2));
+ blue1 = Integer.parseInt(cOne.group(3));
+ }
- Pattern p =
Pattern.compile("java.awt.Color\\[r=(\\d+),g=(\\d+),b=(\\d+)\\]");
- Matcher cOne = p.matcher(colorOne.toString());
- Matcher cTwo = p.matcher(colorTwo.toString());
-
- int red1 = 0;
- int green1 = 0;
- int blue1 = 0;
+ //match RGB values for colorTwo
+ if(cTwo.matches()){
+ red2 = Integer.parseInt(cTwo.group(1));
+ green2 = Integer.parseInt(cTwo.group(2));
+ blue2 = Integer.parseInt(cTwo.group(3));
+ }
- int red2 = 0;
- int green2 = 0;
- int blue2 = 0;
+ //Set up the increment lengths for each RGB values
+ int rIncLen = Math.round((Math.abs(red1 - red2))/framenum);
+ int gIncLen = Math.round((Math.abs(green1 - green2))/framenum);
+ int bIncLen = Math.round((Math.abs(blue1 - blue2))/framenum);
- if(cOne.matches()){
- red1 = Integer.parseInt(cOne.group(1));
- green1 = Integer.parseInt(cOne.group(2));
- blue1 = Integer.parseInt(cOne.group(3));
- }
- if(cTwo.matches()){
- red2 = Integer.parseInt(cTwo.group(1));
- green2 = Integer.parseInt(cTwo.group(2));
- blue2 = Integer.parseInt(cTwo.group(3));
- }
+ //arrays which will hold the RGB values at each increment,
these arrays are parallel to the Color[]
+ int[] rArray = new int[framenum+2];
+ int[] gArray = new int[framenum+2];
+ int[] bArray = new int[framenum+2];
+ rArray[0] = 0;
+ gArray[0] = 0;
+ bArray[0] = 0;
- int rIncLen = Math.round((Math.abs(red1 -
red2))/framenum);
- int gIncLen = Math.round((Math.abs(green1 -
green2))/framenum);
- int bIncLen = Math.round((Math.abs(blue1 -
blue2))/framenum);
-
-
- int[] rArray = new int[framenum+2];
- int[] gArray = new int[framenum+2];
- int[] bArray = new int[framenum+2];
-
- rArray[0] = 0;
- gArray[0] = 0;
- bArray[0] = 0;
-
- rArray[1] = red1;// + rIncLen;
- rArray[framenum+1] = red2;
- gArray[1] = green1;// + gIncLen;
- gArray[framenum+1] = green2;
- bArray[1] = blue1 ;//+ bIncLen;
- bArray[framenum+1] = blue2;
-
- for(int k=1; k<framenum+1; k++){
-
- if(red1 < red2){
- rArray[k+1] = rArray[k] + rIncLen;
- }else{
- if((rArray[k] - rIncLen) > 0){
- rArray[k+1] = rArray[k] -
rIncLen;
- }
+ /*
+ * Initialize the RGB arrays, start of the array contains the
value from colorOne,
+ * end of the arrays contain the value from colorTwo.
+ */
+ rArray[1] = red1;// + rIncLen;
+ rArray[framenum+1] = red2;
+ gArray[1] = green1;// + gIncLen;
+ gArray[framenum+1] = green2;
+ bArray[1] = blue1 ;//+ bIncLen;
+ bArray[framenum+1] = blue2;
+
+
+ //fill the middle of the RGB arrays
+ for(int k=1; k<framenum+1; k++){
+
+ //general strategy is if red1 is less than red2
increment, else decrement
+ if(red1 < red2){
+ rArray[k+1] = rArray[k] + rIncLen;
+ }else{
+ if((rArray[k] - rIncLen) > 0){
+ rArray[k+1] = rArray[k] - rIncLen;
}
- if(green1 < green2){
- gArray[k+1] = gArray[k] + gIncLen;
- }else{
- if((gArray[k] - gIncLen) > 0){
- gArray[k+1] = gArray[k] -
gIncLen;
- }
- }
- if(blue1 < blue2){
- bArray[k+1] = bArray[k] + bIncLen;
- }else{
- if((bArray[k] - bIncLen) > 0){
- bArray[k+1] = bArray[k] -
bIncLen;
- }
- }
-
- paints[k] = new Color(rArray[k+1], gArray[k+1],
bArray[k+1]);
-
}
+ if(green1 < green2){
+ gArray[k+1] = gArray[k] + gIncLen;
+ }else{
+ if((gArray[k] - gIncLen) > 0){
+ gArray[k+1] = gArray[k] - gIncLen;
+ }
+ }
+ if(blue1 < blue2){
+ bArray[k+1] = bArray[k] + bIncLen;
+ }else{
+ if((bArray[k] - bIncLen) > 0){
+ bArray[k+1] = bArray[k] - bIncLen;
+ }
+ }
+
+ //create the new color and put it in the Color[]
+ paints[k] = new Color(rArray[k+1], gArray[k+1],
bArray[k+1]);
+ }
+
return paints;
}
+ /*
+ * Interpolates the node position, using the standard linear
interpolation formula described
+ * at http://en.wikipedia.org/wiki/Linear_interpolation. It essentially
just finds the absolute
+ * difference between the position of a node in frame one, and in frame
two. It then divides
+ * this distance by the number of frames which will be interpolated and
increments or decrements
+ * from the node position in the first frame to the node position in
the second. The incrementing
+ * is done on the x values, which are then plugged into the
interpolation formula to generate a y-value.
+ *
+ */
+
class interpolateNodePosition implements FrameInterpolator {
public interpolateNodePosition(){
}
+ /*
+ * Performs the interpolation.
+ *
+ * @param valueList is in this case a list of NodeViews
+ * @param frameOne is the frame to be interpolated from
+ * @param frameTwo is the frame to be interpolated to
+ * @param start is the starting position of the frame in the
CyFrame array
+ * @param end is the ending positiong of the interpolation in
the CyFrame array
+ * @param cyFrameArray is the array of CyFrames which gets
populated with the interpolated data
+ * @return the array of CyFrames filled with interpolated node
position data
+ */
public CyFrame[] interpolate(List valueList, CyFrame frameOne,
CyFrame frameTwo,
int start, int stop, CyFrame[]
cyFrameArray){
- List<Node> nodeList = valueList; //new
ArrayList<FrameInterpolator>();
+ List<Node> nodeList = valueList;
int framenum = (stop-start) - 1;
@@ -294,12 +404,29 @@
}
}
+ /*
+ * Fills in the interpolated color values for NodeViews. Works by
using the inner
+ * interpolateColor() method.
+ *
+ */
class interpolateNodeColor implements FrameInterpolator {
public interpolateNodeColor(){
}
+
+ /*
+ * Performs the interpolation.
+ *
+ * @param valueList is in this case a list of NodeViews
+ * @param frameOne is the frame to be interpolated from
+ * @param frameTwo is the frame to be interpolated to
+ * @param start is the starting position of the frame in the
CyFrame array
+ * @param end is the ending positiong of the interpolation in
the CyFrame array
+ * @param cyFrameArray is the array of CyFrames which gets
populated with the interpolated data
+ * @return the array of CyFrames filled with interpolated node
position data
+ */
public CyFrame[] interpolate(List valueList, CyFrame frameOne,
CyFrame frameTwo,
int start, int stop, CyFrame[]
cyFrameArray){
@@ -347,13 +474,28 @@
}
-
+ /*
+ * Interpolates node opacity by linearly incrementing or decrementing
the opacity value.
+ *
+ */
class interpolateNodeOpacity implements FrameInterpolator {
public interpolateNodeOpacity(){
}
+
+ /*
+ * Performs the interpolation.
+ *
+ * @param valueList is in this case a list of NodeViews
+ * @param frameOne is the frame to be interpolated from
+ * @param frameTwo is the frame to be interpolated to
+ * @param start is the starting position of the frame in the
CyFrame array
+ * @param end is the ending positiong of the interpolation in
the CyFrame array
+ * @param cyFrameArray is the array of CyFrames which gets
populated with the interpolated data
+ * @return the array of CyFrames filled with interpolated node
position data
+ */
public CyFrame[] interpolate(List valueList, CyFrame frameOne,
CyFrame frameTwo,
int start, int stop, CyFrame[]
cyFrameArray){
@@ -395,13 +537,26 @@
}
-
+ /*
+ * Interpolates edgeColor using the interpolateColor() method.
+ */
class interpolateEdgeColor implements FrameInterpolator {
public interpolateEdgeColor(){
}
+ /*
+ * Performs the interpolation.
+ *
+ * @param valueList is in this case a list of EdgeViews
+ * @param frameOne is the frame to be interpolated from
+ * @param frameTwo is the frame to be interpolated to
+ * @param start is the starting position of the frame in the
CyFrame array
+ * @param end is the ending positiong of the interpolation in
the CyFrame array
+ * @param cyFrameArray is the array of CyFrames which gets
populated with the interpolated data
+ * @return the array of CyFrames filled with interpolated node
position data
+ */
public CyFrame[] interpolate(List valueList, CyFrame frameOne,
CyFrame frameTwo,
int start, int stop, CyFrame[]
cyFrameArray){
@@ -441,11 +596,26 @@
}
}
+
+ /*
+ * Linearly interpolates the edge opacity.
+ */
class interpolateEdgeOpacity implements FrameInterpolator {
public interpolateEdgeOpacity(){
}
+ /*
+ * Performs the interpolation.
+ *
+ * @param valueList is in this case a list of EdgeViews
+ * @param frameOne is the frame to be interpolated from
+ * @param frameTwo is the frame to be interpolated to
+ * @param start is the starting position of the frame in the
CyFrame array
+ * @param end is the ending positiong of the interpolation in
the CyFrame array
+ * @param cyFrameArray is the array of CyFrames which gets
populated with the interpolated data
+ * @return the array of CyFrames filled with interpolated node
position data
+ */
public CyFrame[] interpolate(List valueList, CyFrame frameOne,
CyFrame frameTwo,
int start, int stop, CyFrame[]
cyFrameArray){
@@ -486,13 +656,27 @@
}
}
-
+ /*
+ * Linearly interpolates the network zoom.
+ *
+ */
class interpolateNetworkZoom implements FrameInterpolator {
public interpolateNetworkZoom(){
}
+ /*
+ * Performs the interpolation.
+ *
+ * @param valueList is not used in this case
+ * @param frameOne is the frame to be interpolated from
+ * @param frameTwo is the frame to be interpolated to
+ * @param start is the starting position of the frame in the
CyFrame array
+ * @param end is the ending positiong of the interpolation in
the CyFrame array
+ * @param cyFrameArray is the array of CyFrames which gets
populated with the interpolated data
+ * @return the array of CyFrames filled with interpolated node
position data
+ */
public CyFrame[] interpolate(List valueList, CyFrame frameOne,
CyFrame frameTwo,
int start, int stop, CyFrame[]
cyFrameArray){
@@ -527,6 +711,17 @@
}
+ /*
+ * Performs the interpolation.
+ *
+ * @param valueList is not used in this case
+ * @param frameOne is the frame to be interpolated from
+ * @param frameTwo is the frame to be interpolated to
+ * @param start is the starting position of the frame in the
CyFrame array
+ * @param end is the ending positiong of the interpolation in
the CyFrame array
+ * @param cyFrameArray is the array of CyFrames which gets
populated with the interpolated data
+ * @return the array of CyFrames filled with interpolated node
position data
+ */
public CyFrame[] interpolate(List valueList, CyFrame frameOne,
CyFrame frameTwo,
int start, int stop, CyFrame[]
cyFrameArray){
@@ -547,6 +742,17 @@
public interpolateNetworkCenter(){}
+ /*
+ * Performs the interpolation.
+ *
+ * @param valueList is not used in this case
+ * @param frameOne is the frame to be interpolated from
+ * @param frameTwo is the frame to be interpolated to
+ * @param start is the starting position of the frame in the
CyFrame array
+ * @param end is the ending positiong of the interpolation in
the CyFrame array
+ * @param cyFrameArray is the array of CyFrames which gets
populated with the interpolated data
+ * @return the array of CyFrames filled with interpolated node
position data
+ */
public CyFrame[] interpolate(List valueList, CyFrame frameOne,
CyFrame frameTwo,
int start, int stop, CyFrame[] cyFrameArray){
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---