[skycastle-commits] SF.net SVN: skycastle: [335] trunk/skycastle/modules/utils/src/main/java/ org/skycastle/util/simpleui/SimpleFrame.java

  • From: zzorn@xxxxxxxxxxxxxxxxxxxxx
  • To: skycastle-commits@xxxxxxxxxxxxx
  • Date: Sat, 05 Jan 2008 06:07:47 -0800

Revision: 335
          http://skycastle.svn.sourceforge.net/skycastle/?rev=335&view=rev
Author:   zzorn
Date:     2008-01-05 06:07:46 -0800 (Sat, 05 Jan 2008)

Log Message:
-----------
Added documentation to the SimpleFrame

Modified Paths:
--------------
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/simpleui/SimpleFrame.java

Modified: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/simpleui/SimpleFrame.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/simpleui/SimpleFrame.java
    2008-01-05 13:29:03 UTC (rev 334)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/simpleui/SimpleFrame.java
    2008-01-05 14:07:46 UTC (rev 335)
@@ -12,7 +12,7 @@
  * <p/>
  * Takes care of all the heavyweight management with setting up a frame.
  *
- * @author Hans H\xE4ggstr\xF6m
+ * @author Hans Haggstrom
  */
 public class SimpleFrame
         extends JFrame
@@ -35,24 +35,45 @@
     //----------------------------------------------------------------------
     // Constructors
 
+    /**
+     * Creates a new SimpleFrame, and immediately shows it.
+     */
     public SimpleFrame()
     {
         this( "" );
     }
 
 
+    /**
+     * Creates a new SimpleFrame, and immediately shows it.
+     *
+     * @param title the title for the frame.
+     */
     public SimpleFrame( final String title )
     {
         this( title, DEFAULT_WIDTH, DEFAULT_HEIGHT );
     }
 
 
+    /**
+     * Creates a new SimpleFrame, and immediately shows it. The size of the 
frame will be the size of the
+     * mainComponent.
+     *
+     * @param mainComponent the UI component to show in the frame.
+     */
     public SimpleFrame( final Component mainComponent )
     {
         this( "", mainComponent );
     }
 
 
+    /**
+     * Creates a new SimpleFrame, and immediately shows it. The size of the 
frame will be the size of the
+     * mainComponent.
+     *
+     * @param title         the title for the frame.
+     * @param mainComponent the UI component to show in the frame.
+     */
     public SimpleFrame( final String title, final Component mainComponent )
     {
         this( title,
@@ -62,12 +83,27 @@
     }
 
 
+    /**
+     * Creates a new SimpleFrame, and immediately shows it.
+     *
+     * @param title  the title for the frame.
+     * @param width  width of the frame in pixels.
+     * @param height height of the frame in pixels.
+     */
     public SimpleFrame( final String title, final int width, final int height )
     {
         this( title, width, height, null );
     }
 
 
+    /**
+     * Creates a new SimpleFrame, and immediately shows it.
+     *
+     * @param title         the title for the frame.
+     * @param width         width of the frame in pixels.
+     * @param height        height of the frame in pixels.
+     * @param mainComponent the UI component to show in the frame.
+     */
     public SimpleFrame( final String title, final int width, final int height, 
final Component mainComponent )
     {
         super( title );
@@ -92,19 +128,25 @@
     //----------------------------------------------------------------------
     // Other Public Methods
 
+    /**
+     * @return the main panel that contains the user specified UI component.
+     */
     public JPanel getMainPanel()
     {
         return myMainPanel;
     }
 
 
+    /**
+     * @param component the user specified component to add to the main panel, 
and thus show in the frame.
+     */
     void setContent( final Component component )
     {
         ParameterChecker.checkNotNull( component, "component" );
 
         myMainPanel.add( component, BorderLayout.CENTER );
 
-        // TODO: Force a damn redraw...
+        // TODO: Force a redraw...
         this.invalidate();
         this.repaint();
     }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

Other related posts:

  • » [skycastle-commits] SF.net SVN: skycastle: [335] trunk/skycastle/modules/utils/src/main/java/ org/skycastle/util/simpleui/SimpleFrame.java