[Polycasso-commit] SF.net SVN: polycasso:[34] trunk/polycasso/src/com/mebigfatguy/polycasso/ Painte
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-11-24 05:30:52
|
Revision: 34
http://polycasso.svn.sourceforge.net/polycasso/?rev=34&view=rev
Author: dbrosius
Date: 2009-11-24 05:30:45 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/polycasso/src/com/mebigfatguy/polycasso/PainterPanel.java
Modified: trunk/polycasso/src/com/mebigfatguy/polycasso/PainterPanel.java
===================================================================
--- trunk/polycasso/src/com/mebigfatguy/polycasso/PainterPanel.java 2009-11-24 05:27:57 UTC (rev 33)
+++ trunk/polycasso/src/com/mebigfatguy/polycasso/PainterPanel.java 2009-11-24 05:30:45 UTC (rev 34)
@@ -24,6 +24,10 @@
import javax.swing.JPanel;
+/**
+ * the panel that holds the image considered to be the best representation of the target
+ * image so far.
+ */
public class PainterPanel extends JPanel {
private static final long serialVersionUID = -4005448126783525299L;
@@ -31,6 +35,12 @@
private Image targetImage;
private Image bestImage;
+ /**
+ * set the ideal image that we are trying to generate. It is only shown while in debug mode
+ * @see com.mebigfatguy.polycasso.Polycasso#DEBUG
+ *
+ * @param image the target image
+ */
public void setTarget(Image image) {
synchronized(lock) {
targetImage = image;
@@ -38,6 +48,11 @@
}
}
+ /**
+ * sets the best generated image thus far.
+ *
+ * @param image the best generated image
+ */
public void setImage(Image image) {
synchronized(lock) {
bestImage = image;
@@ -46,6 +61,11 @@
repaint();
}
+ /**
+ * overrides the method to redraw this panel, so that the best generated image is shown
+ *
+ * @param g the graphics object of the panel
+ */
public void paintComponent(Graphics g) {
super.paintComponent(g);
synchronized(lock) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|