Author: ruschein
Date: 2009-11-25 08:56:57 -0800 (Wed, 25 Nov 2009)
New Revision: 18578
Modified:
corelibs/trunk/ding/src/ding/view/DGraphView.java
Log:
Cosmetic.
Modified: corelibs/trunk/ding/src/ding/view/DGraphView.java
===================================================================
--- corelibs/trunk/ding/src/ding/view/DGraphView.java 2009-11-25 01:01:55 UTC
(rev 18577)
+++ corelibs/trunk/ding/src/ding/view/DGraphView.java 2009-11-25 16:56:57 UTC
(rev 18578)
@@ -534,6 +534,7 @@
m_lis[0] = GraphViewChangeListenerChain.add(m_lis[0], l);
}
+
/**
* Remove GraphViewChangeListener from linked list of
GraphViewChangeListeners.
* AAAAAARRRGGGGHHHHHH!!!!
@@ -544,22 +545,24 @@
m_lis[0] = GraphViewChangeListenerChain.remove(m_lis[0], l);
}
+
/**
* Sets the background color on the canvas.
*
* @param paint The Paint (color) to apply to the background.
*/
- public void setBackgroundPaint(Paint paint) {
+ public void setBackgroundPaint(final Paint paint) {
synchronized (m_lock) {
if (paint instanceof Color) {
- m_backgroundCanvas.setBackground((Color) paint);
+ m_backgroundCanvas.setBackground((Color)paint);
m_contentChanged = true;
} else {
-
System.out.println("DGraphView.setBackgroundPaint(), Color not found!");
+
System.out.println("DGraphView.setBackgroundPaint(): Paint argument must be a
Color instance!");
}
}
}
+
/**
* Returns the background color on the canvas.
*
@@ -569,6 +572,7 @@
return m_backgroundCanvas.getBackground();
}
+
/**
* Returns the InnerCanvas object. The InnerCanvas object is the
actual component
* that the network is rendered on.
@@ -579,6 +583,7 @@
return m_networkCanvas;
}
+
/**
* Adds a NodeView object to the GraphView. Creates NodeView if one
doesn't already exist.
*
@@ -611,6 +616,7 @@
return newView;
}
+
/**
* Should synchronize around m_lock.
*/
@@ -641,6 +647,7 @@
return newView;
}
+
/**
* Adds EdgeView to the GraphView.
*
@@ -716,6 +723,7 @@
return edgeView;
}
+
/**
* Will thrown an UnsupportedOperationException. Don't use this.
*
@@ -728,6 +736,7 @@
throw new UnsupportedOperationException("not implemented");
}
+
/**
* Will thrown an UnsupportedOperationException. Don't use this.
*
@@ -740,6 +749,7 @@
throw new UnsupportedOperationException("not implemented");
}
+
/**
* Will thrown an UnsupportedOperationException. Don't use this.
*
@@ -752,6 +762,7 @@
throw new UnsupportedOperationException("not implemented");
}
+
/**
* Removes a NodeView based on specified NodeView.
*
@@ -763,6 +774,7 @@
return removeNodeView(nodeView.getRootGraphIndex());
}
+
/**
* Removes a NodeView based on specified Node.
*
@@ -774,6 +786,7 @@
return removeNodeView(node.getRootGraphIndex());
}
+
/**
* Removes a NodeView based on a specified index.
*
@@ -2259,6 +2272,7 @@
return m_networkCanvas;
}
+
/**
* Method to return a reference to a DingCanvas object,
* given a canvas id.
@@ -2279,6 +2293,7 @@
return null;
}
+
/**
* Method to return a reference to an Image object,
* which represents the current network view.
@@ -2292,11 +2307,10 @@
* @throws IllegalArgumentException
*/
public Image createImage(int width, int height, double shrink) {
-
// check args
if (width < 0 || height < 0) {
- throw new
IllegalArgumentException("DGraphView.createImage(int width, int height): " +
-
"width and height arguments must be greater than zero");
+ throw new
IllegalArgumentException("DGraphView.createImage(int width, int height): "
+ + "width and height
arguments must be greater than zero");
}
if ( shrink < 0 || shrink > 1.0 ) {
@@ -2306,8 +2320,8 @@
}
// create image to return
- Image image = new BufferedImage(width, height,
BufferedImage.TYPE_INT_ARGB);
- Graphics g = image.getGraphics();
+ Image image = new BufferedImage(width, height,
BufferedImage.TYPE_INT_ARGB);
+ Graphics g = image.getGraphics();
// paint background canvas into image
Dimension dim = m_backgroundCanvas.getSize();
@@ -2318,7 +2332,7 @@
// paint inner canvas (network)
dim = m_networkCanvas.getSize();
m_networkCanvas.setSize(width, height);
- fitContent();
+ fitContent();
setZoom( getZoom() * shrink );
m_networkCanvas.paint(g);
m_networkCanvas.setSize(dim);
@@ -2333,6 +2347,7 @@
return image;
}
+
/**
* utility that returns the nodeView that is located at input point
*
--
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.