[Polycasso-commit] SF.net SVN: polycasso:[33] trunk/polycasso/src/com/mebigfatguy/polycasso/ Painte
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-11-24 05:28:04
|
Revision: 33
http://polycasso.svn.sourceforge.net/polycasso/?rev=33&view=rev
Author: dbrosius
Date: 2009-11-24 05:27:57 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/polycasso/src/com/mebigfatguy/polycasso/PainterFrame.java
Modified: trunk/polycasso/src/com/mebigfatguy/polycasso/PainterFrame.java
===================================================================
--- trunk/polycasso/src/com/mebigfatguy/polycasso/PainterFrame.java 2009-11-24 05:25:51 UTC (rev 32)
+++ trunk/polycasso/src/com/mebigfatguy/polycasso/PainterFrame.java 2009-11-24 05:27:57 UTC (rev 33)
@@ -34,6 +34,9 @@
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
+/**
+ * the main window for showing the image as it is being improved on.
+ */
public class PainterFrame extends JFrame implements ImageGeneratedListener {
private static final long serialVersionUID = 7729602294481171194L;
@@ -42,6 +45,9 @@
private JMenuItem quitItem;
ImageGenerator generator;
+ /**
+ * creates the main window, setups up menus and listeners
+ */
public PainterFrame() {
setTitle(PolycassoBundle.getString(PolycassoBundle.Key.Title));
initComponents();
@@ -51,15 +57,20 @@
generator = null;
}
+ /**
+ * creates and lays out components for this frame
+ */
private void initComponents() {
Container cp = getContentPane();
cp.setLayout(new BorderLayout(4, 4));
panel = new PainterPanel();
cp.add(panel, BorderLayout.CENTER);
-
}
+ /**
+ * initializes the menus
+ */
private void initMenus() {
JMenuBar mb = new JMenuBar();
JMenu fileMenu = new JMenu(PolycassoBundle.getString(PolycassoBundle.Key.File));
@@ -72,6 +83,9 @@
setJMenuBar(mb);
}
+ /**
+ * initializes the listeners for the various components
+ */
private void initListeners() {
addWindowListener(new WindowAdapter() {
@@ -115,6 +129,11 @@
});
}
+ /**
+ * implements the ImageGeneratedListener interface to redraw the new best image
+ *
+ * @param event the event describing the new best image
+ */
public void imageGenerated(ImageGeneratedEvent event) {
panel.setImage(event.getImage());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|