[Commits] r925 - in apps/opengeo/geoexplorer/trunk/lib: . GeoExplorer GeoExplorer/Embed GeoExplorer/Full

commits at geoext.org commits at geoext.org
Sat May 30 00:06:02 CEST 2009


Author: dwins
Date: 2009-05-30 00:06:02 +0200 (Sat, 30 May 2009)
New Revision: 925

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Embed/Embed.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Full/Full.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/LayerMenuItem.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolMenu.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolSplitToggle.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolToggle.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Viewer.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Wizard.js
Log:
Sphinxification of API comments


Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -5,23 +5,19 @@
  */
 
 /**
- * Class: CapabilitiesGrid
- * Create a new grid displaying the WMS cabilities of a URL,
- *     or the contents of a <GeoExt.data.WMSCapabilitiesStore>.  The user can
- *     add layers to a passed in <GeoExt.MapPanel> from the grid.
- *
- * Extends:
- *  - <Ext.grid.GridPanel>
+ * api: (define)
+ * module = GeoExplorer
+ * class = CapabilitiesGrid(config)
+ * extends = Ext.grid.GridPanel
  */
 
-/**
- * Constructor: CapabilitiesGrid
- *     Creates a panel with a map inside it.
+/** api: constructor
+ * ..class:: CapabilitiesGrid(config)
+ * :param: config: A configuration :class:`Object`
  *
- * Parameters:
- * config - {Object} A config object. In addition to the config options
- *     of its parent class, this object can receive specific options,
- *     see the API properties to know about these specific options.
+ * Create a new grid displaying the WMS cabilities of a URL, or the contents of 
+ * a :class:`GeoExt.data.WMSCapabilitiesStore`\ .  The user can add layers to a
+ * passed-in :class:`GeoExt.MapPanel` from the grid.
  */
 
 var CapabilitiesGrid = Ext.extend(Ext.grid.GridPanel, {
@@ -31,27 +27,25 @@
     cm: null,
 
     /**
-     * APIProperty: mapPanel
-     * {<GeoExt.MapPanel>} A MapPanel to which layers can be added
-     *    via this grid.
+     * api: property[mapPanel]
+     * A :class:`GeoExt.MapPanel` to which layers can be added via this grid.
      */
     mapPanel : null,
 
-    /**
-     * APIProperty: url
-     * {String} An OWS url to which the GetCapabilities request is sent.
-     * Necessary if a store is not passed in as a configuration option.
+    /** api: property[url]
+     * A :class:`String` containing an OWS URL to which the GetCapabilities 
+     * request is sent.  Necessary if a store is not passed in as a 
+     * configuration option.
      */
     url: null,
 
     autoExpandColumn: "title",
 
-    /**
-     * Method: initComponent
+    /** api: method[initComponent]
      * 
-     * Initializes the CapabilitiesGrid. Creates and loads a WMS
-     *     Capabilities store from the url property if one is not passed as a
-     *     configuration option. 
+     * Initializes the CapabilitiesGrid. Creates and loads a WMS Capabilities 
+     * store from the url property if one is not passed as a configuration 
+     * option. 
      */
     initComponent: function(){
 
@@ -79,10 +73,11 @@
         CapabilitiesGrid.superclass.initComponent.call(this);       
     },
 
-    /**
-     * Method: addLayers
+    /** api: method[addLayers]
+     * :param: base: a boolean indicating whether or not to make the new layer 
+     *     a base layer.
      * 
-     * Adds a layer to the <GeoExt.MapPanel> of this instance.
+     * Adds a layer to the :class:`GeoExt.MapPanel` of this instance.
      */    
     addLayers : function(base){
 

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Embed/Embed.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Embed/Embed.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Embed/Embed.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -1,7 +1,7 @@
 /** api: (define)
  *  module = GeoExplorer
  *  class = Embed
- *  base_link = `GeoExplorer <http://extjs.com/deploy/dev/docs/?class=Ext.Panel>`_
+ *  base_link = GeoExplorer
  */
 Ext.namespace("GeoExplorer");
 

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Full/Full.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Full/Full.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Full/Full.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -1,3 +1,19 @@
+/**
+ * Copyright (c) 2009 The Open Planning Project
+ */
+
+/**
+ * api: (define)
+ * module = GeoExplorer
+ * class = GeoExplorer.Full(config)
+ * extends = GeoExplorer
+ */
+
+/** api: constructor
+ *  .. class:: GeoExplorer.Full(config)
+ *
+ *      Create a GeoExplorer application intended for full-screen display.
+ */
 GeoExplorer.Full = Ext.extend(GeoExplorer, {
     /**
      * api: method[createTools]
@@ -32,6 +48,14 @@
         return tools;
     },
 
+    /** private: method[showEmbedWizard]
+     *
+     * Builds several panels and combines them into a 
+     * :class:``GeoExplorer.Wizard`` to guide the user through customizing and 
+     * exporting a map for display embedded in another website.
+     *
+     * ..seealso:: :method:`GeoExplorer.Full.makeLayerWizardPane`, :method:`GeoExplorer.Full.makeFinalWizardPane`
+     */
     showEmbedWizard: function() {
         var config = this.extractConfiguration();
 
@@ -54,6 +78,11 @@
         wizard.show();
     },
 
+    /** private: method[makeFinalWizardPane]
+     *
+     * Create the 'okay, done!' page of the export wizard, providing the HTML 
+     * snippet to use for embedding the map, etc. 
+     */
     makeFinalWizardPane: function(config) {
         var description = new Ext.Panel({
             cls: 'gx-wizard-description',
@@ -154,6 +183,9 @@
         });
     },
 
+    /** api: method[makeLayerWizardPane]
+     * Create the layer selection page for the export wizard.
+     */
     makeLayerWizardPane: function (config) {
         var datalayers = [];
         var basemaps = [];

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/LayerMenuItem.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/LayerMenuItem.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/LayerMenuItem.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -1,7 +1,24 @@
 /**
- * @author David Winslow <dwinslow at opengeo.org>
+ * Copyright (c) 2009 The Open Planning Project
  */
 
+/**
+ * api: (define)
+ * module = GeoExplorer
+ * class = LayerMenuItem(config)
+ * extends = Ext.menu.Adapter
+ */
+
+/** ..class:: GeoExplorer.LayerMenuItem(config)
+ *      :param: config: the configuration for the menu item
+ *
+ *      A menu item for toggling a layer visibility, as used in 
+ *      :class:`GeoExplorer.Embed`.
+ */
+
+/** api: config[layer] 
+ * The :class:`GeoExt.data.LayerRecord` to be toggled.
+ */
 GeoExplorer.LayerMenuItem = function(config) {
     config.layout = config.layout || 'column';
 

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolMenu.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolMenu.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolMenu.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -3,35 +3,45 @@
  */
 
 /**
- * About: Examples
+ * api: (define)
+ * module = MapToolMenu
+ * class = MapToolMenu(config)
+ * extends = Ext.menu.Menu
+ */
+
+/**
+ * api: example
  *
- * This example uses default names and icons for the menu entries.
- * : var measure, select, zoomBox, draw; // OpenLayers Controls
- * > var menu = new MapToolMenu({tools: [measure, select, zoomBox, draw]});
+ * This example uses default names and icons for the menu entries::
  *
- * This one provides a custom name and icon for one of the entries.
- * : var measure, select, zoomBox, draw; // OpenLayers Controls
- * > var menu = new MapToolMenu({tools: [{
- * >         text: 'Find a distance', 
- * >         tool: measure, 
- * >         iconCls: 'x-icon-distance-finder'
- * >     }, 
- * >     select, 
- * >     zoomBox, 
- * >     draw
- * > ]});
+ *     var measure, select, zoomBox, draw; // OpenLayers Controls
+ *     var menu = new MapToolMenu({tools: [measure, select, zoomBox, draw]});
+ *
+ * This one provides a custom name and icon for one of the entries::
+ *
+ *     var measure, select, zoomBox, draw; // OpenLayers Controls
+ *     var menu = new MapToolMenu({tools: [{
+ *             text: 'Find a distance', 
+ *             tool: measure, 
+ *             iconCls: 'x-icon-distance-finder'
+ *         }, 
+ *         select, 
+ *         zoomBox, 
+ *         draw
+ *     ]});
  */
 
 /*
- * Constructor: MapToolMenu
- * Simply create a menu that manipulates OpenLayers map controls 
+ * api: constructor[MapToolMenu]
+ * :param: config: The configuration object for the new menu
  *
- * Parameters: 
- * config - {Object} Various options, see {Ext.menu.Menu}
+ * Simply create a menu that manipulates OpenLayers map controls.
  *
- * In addition to the normal [items] array, MapToolMenu recognizes a [tools] array. 
- * This can be an array of OpenLayers Control objects, or of simple configuration 
- * objects analogous to Ext Map entries.
+ * In addition to the normal ``[items]`` array, :class:`MapToolMenu` recognizes
+ * a ``[tools]`` array.  This can be an array of OpenLayers Control objects, or
+ * of simple configuration objects analogous to Ext Map entries.
+ *
+ * ..seealso:: :class:`Ext.menu.Menu`
  */
 var MapToolMenu = function(options) { 
     options.items = options.items || [];

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolSplitToggle.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolSplitToggle.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolSplitToggle.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -5,41 +5,53 @@
  */
 
 /**
- * About: Examples
+ * api: (define)
+ * module = MapToolSplitToggle
+ * class = MapToolSplitToggle(config)
+ * extends = Ext.SplitButton
+ */
+
+/**
+ * api: example
  *
- * This example uses default names and icons for the button and menu entries.
- * : var measure, select, zoomBox, draw; // OpenLayers Controls
- * : var menu = new MapToolSplitToggle({defaultTool: select, tools: [measure, select, zoomBox, draw]});
+ * This example uses default names and icons for the button and menu entries::
+ *      var measure, select, zoomBox, draw; // OpenLayers Controls
+ *      var menu = new MapToolSplitToggle({defaultTool: select, tools: [measure, select, zoomBox, draw]});
  *
- * This one provides a custom name and icon for one of the entries.
- * : var measure, select, zoomBox, draw; // OpenLayers Controls
- * : var menu = new MapToolSplitToggle({
- * >     defaultTool: zoomBox,
- * >     tools: [{
- * >         text: 'Find a distance', 
- * >         tool: measure, 
- * >         iconCls: 'x-icon-distance-finder'
- * >     }, 
- * >     select, 
- * >     zoomBox, 
- * >     draw
- * > ]});
+ * This one provides a custom name and icon for one of the entries::
+ *      var measure, select, zoomBox, draw; // OpenLayers Controls
+ *      var menu = new MapToolSplitToggle({
+ *          defaultTool: zoomBox,
+ *          tools: [{
+ *              text: 'Find a distance', 
+ *              tool: measure, 
+ *              iconCls: 'x-icon-distance-finder'
+ *          }, 
+ *          select, 
+ *          zoomBox, 
+ *          draw
+ *      ]});
  */
 
 /**
- * Constructor: MapToolSplitToggle
- * Creates an Ext SplitButton suited to switching between multiple related OpenLayers Controls.
- * The MapToolSplitToggle accepts an array of controls, which can be activated from the dropdown menu.
- * The main button simply toggles the most recently used control.
+ * api: constructor[MapToolSplitToggle]
+ * :param: config - the configuration options for the component
  *
- * Parameters:
- * config - {Object} the configuration options for this split toggle, see {Ext.SplitButton}. 
+ * Creates an Ext SplitButton suited to switching between multiple related 
+ * OpenLayers Controls. The MapToolSplitToggle accepts an array of controls,
+ * which can be activated from the dropdown menu.  The main button simply 
+ * toggles the most recently used control.
  *
- * In addition to the options accepted by Ext.SplitButton, the MapToolSplitToggle accepts:
- * defaultTool - {OpenLayers.Control} the control which is to be activated if the button is toggled 
- * before the user selects one from the drop-down menu.
- * tools - {Array} the controls to display in the drop-down menu.  These may be simple Control objects,
- * or Ext menu specifications with a tool parameter containing the control.  (see MapToolMenu)
+ * In addition to the options accepted by Ext.SplitButton, the 
+ * MapToolSplitToggle accepts:
+ *  * defaultTool - :class:`OpenLayers.Control` the control which is to be 
+ *    activated if the button is toggled before the user selects one from the
+ *    drop-down menu.
+ *  * tools - :class:`Array` the controls to display in the drop-down menu.  
+ *    These may be simple Control objects, or Ext menu specifications with a 
+ *    tool parameter containing the control.  
+ *
+ * ..seealso:: MapToolMenu
  */
 var MapToolSplitToggle = function(options) { 
     this.lastActiveTool = options.defaultTool || options.tools[0];
@@ -68,14 +80,15 @@
 
 Ext.extend(MapToolSplitToggle, Ext.SplitButton, {
     /**
-     * Property: lastActiveTool
-     * The most recently selected OpenLayers Control, to be toggled when the main button is.
+     * api: property[lastActiveTool]
+     * The most recently selected :class:`OpenLayers.Control`, to be toggled 
+     * when the main button is.
      */
     lastActiveTool: null,
 
     /**
-     * Property: tools
-     * {Array} the OpenLayers tools from this component's configuration.
+     * api: property[tools]
+     * :class:`Array` the OpenLayers tools from this component's configuration.
      */
     tools: null,
 
@@ -106,12 +119,12 @@
         }
     },
     
-    /**
-     * Method: handleEvent
-     * Called when the main button is toggled, handled the (de)activation of the last active tool.
+    /** api: method[handleEvent]
+     * :param: item: the component that triggered the event (ie, this 
+     *      SplitButton)
      *
-     * Parameters:
-     * item - the component that triggered the event (ie, this SplitButton)
+     * Called when the main button is toggled, handled the (de)activation of 
+     * the last active tool.
      */
     handleEvent: function(item) {
         if (item.pressed) {
@@ -121,14 +134,13 @@
         }
     }, 
 
-    /**
-     * Method: handleMenu
-     * Called when an item in the menu is selected.  All this does is update lastActiveTool;
-     * the menu should be a {MapToolMenu} to handle the control (de)activation.
+    /** api: method[handleMenu]
+     * :param: item: the component that triggered the event (ie, the Menu item)
+     * :param: evt: the Ext selection event
      *
-     * Parameters:
-     * item - the component that triggered the event (ie, the Menu item)
-     * evt  - the Ext selection event
+     * Called when an item in the menu is selected.  All this does is update 
+     * :attr:`~MapToolSplitToggle.lastActiveTool`; the menu should be a 
+     * :class:`MapToolMenu` to handle the control (de)activation.
      */
     handleMenu: function(item, evt) {
         for (var i = 0, len = this.tools.length; i < len; i++) {
@@ -141,13 +153,11 @@
         }
     },
     
-    /**
-     * Method: findIconCls
-     * Determine the icon class for this split button, based on the {OpenLayers.Control} the
-     * button has been configured with.
+    /** private: method[findIconCls]
+     * Determine the icon class for this split button, based on the 
+     * :class:`OpenLayers.Control` the button has been configured with.
      */
     findIconCls: function() {
         return this.lastActiveTool.CLASS_NAME;
     }
-
 });

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolToggle.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolToggle.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/MapToolToggle.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -3,31 +3,37 @@
  */
 
 /**
- * About: Examples
+ * api: example
  *
- * This example uses default names and icons for the button.
- * : var measure = new OpenLayers.Control.Measure(OpenLayers.Handler.Path);
- * : var btn = new MapToolToggle({tool: measure});
+ * This example uses default names and icons for the button:: 
  *
- * This one provides a custom name and icon.
- * : var measure = new OpenLayers.Control.Measure(OpenLayers.Handler.Path);
- * : var btn = new MapToolToggle({
- * >         text: 'Find a distance', 
- * >         tool: measure, 
- * >         iconCls: 'x-icon-distance-finder'
- * >     });
+ *      var measure = new OpenLayers.Control.Measure(OpenLayers.Handler.Path);
+ *      var btn = new MapToolToggle({tool: measure});
+ *
+ * This one provides a custom name and icon::
+ *
+ *      var measure = new OpenLayers.Control.Measure(OpenLayers.Handler.Path);
+ *      var btn = new MapToolToggle({
+ *              text: 'Find a distance', 
+ *              tool: measure, 
+ *              iconCls: 'x-icon-distance-finder'
+ *          });
  */
 
 /**
- * Constructor: MapToolToggle
- * Creates an Ext Button suited to activating and deactivating an {OpenLayers.Control}.
- * The MapToolToggle accepts a control as part of its configuration.
+ * api: constructor[MapToolToggle]
+ * :param: config: :class:`Object` with the configuration options for this 
+ *     split toggle
  *
- * Parameters:
- * config - {Object} the configuration options for this split toggle, see {Ext.Button}. 
+ * Creates a :class:`Ext.Button` suited to activating and deactivating an 
+ * :class:`OpenLayers.Control`. The MapToolToggle accepts a control as part of 
+ * its configuration.
  *
- * In addition to the options accepted by Ext.Button, the MapToolToggle accepts:
- * tool - {OpenLayers.Control} the control which is to be manipulated by the button 
+ * In addition to the options accepted by :class:`Ext.Button`, the MapToolToggle
+ * accepts a property named ``tool``\ , an :class:`OpenLayers.Control` to be 
+ * manipulated by the button 
+ *
+ * .. seealso:: :class:`Ext.Button`
  */
 var MapToolToggle = function(options) {
     this.mapTool = options.tool;
@@ -42,18 +48,17 @@
 };
 
 Ext.extend(MapToolToggle, Ext.Button, {
-    /**
-     * Property: mapTool
-     * The OpenLayers Control that this Action toggles.
+    /** api: property[mapTool]
+     * The OpenLayers Control that this button toggles.
      */
     mapTool: null,
 
-    /**
-     * Method: handleEvent
-     * Called when the main button is toggled, handled the (de)activation of the last active tool.
+    /** api: method[handleEvent]
+     * :param: item: the component that triggered the event 
+     *     (ie, this SplitButton)
      *
-     * Parameters:
-     * item - the component that triggered the event (ie, this SplitButton)
+     * Called when the button is toggled, handling the (de)activation of the 
+     * button's tool.
      */
     handleEvent: function(item) {
         if (item.pressed) {
@@ -63,19 +68,17 @@
         }
     }, 
     
-    /**
-     * Method: findIconCls
-     * Determine the icon class for this split button, based on the {OpenLayers.Control} the
-     * button has been configured with.
+    /** api: method[findIconCls] *
+     * Determine the icon class for this split button, based on the 
+     * :class:`OpenLayers.Control` the button has been configured with.
      */
     findIconCls: function() {
         return this.mapTool.CLASS_NAME;
     },
 
-    /**
-     * Method: findLabel
-     * Determine the text label for this split button, based on the {OpenLayers.Control} the
-     * button has been configured with.
+    /** api: method[findLabel]
+     * Determine the text label for this split button, based on the 
+     * :class:`OpenLayers.Control` the button has been configured with.
      */
     findLabel: function() {
         return this.mapTool.CLASS_NAME;

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Viewer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Viewer.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Viewer.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -3,20 +3,20 @@
  */
 
 /**
- * Constructor: Viewer
- * Create a new Viewer application.
+ * api: (define)
+ * module = GeoExplorer
+ * class = Viewer(config)
+ * extends = Ext.util.Observable
+ */
+
+/** api: constructor
+ * ..class:: Viewer(config)
+ * :param: config - optional application configuration properties
  *
- * Parameters:
- * config - {Object} Optional application configuration properties.
- *
- * Extends:
- *  - Ext.util.Observable
+ * Create a new Viewer application.
  */
 var Viewer = Ext.extend(Ext.util.Observable, {
     
-    /**
-     * Constructor: Viewer
-     */
     constructor: function(config) {
 
         var query = Ext.urlDecode(document.location.search.substr(1));
@@ -42,26 +42,23 @@
         
     },
     
-    /**
-     * Method: load
+    /** api: method[load]
      * Called to load the application.  Implemented by a subclass.
      */
     load: Ext.emptyFn,
 
-    /**
-     * Method: dispatch
+    /** api: method[dispatch]
+     * :param: functions: :class:`Array(Function)` List of functions to be 
+     *     called.  All functions will be called with two arguments - a callback
+     *     to call when the sequence is done and a storage object
+     * :param: complete: :class:`Function` A function that will be called when 
+     *     all other functions report that they are done.  The final callback 
+     *     will be called with the storage object passed to all other functions.
+     * :param: scope: :class:`Object` Optional object to be set as the scope of
+     *     all functions called.
+     *
      * Allows multiple asynchronous sequences to be called in parallel.  A final
-     *     callback is called when all other sequences report that they are done.
-     * 
-     * Parameters:
-     * functions - {Array(Function)} List of functions to be called.  All
-     *     functions will be called with two arguments - a callback to call when
-     *     the sequence is done and a storage object
-     * complete - {Function} A function that will be called when all other
-     *     functions report that they are done.  The final callback will be
-     *     called with the storage object passed to all other functions.
-     * scope - {Object} Optional object to be set as the scope of all functions
-     *     called.
+     * callback is called when all other sequences report that they are done.
      */
     dispatch: function(functions, complete, scope) {
         complete = complete || Ext.emptyFn;

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Wizard.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Wizard.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Wizard.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -1,5 +1,31 @@
+/**
+ * Copyright (c) 2009 The Open Planning Project
+ */
+
 Ext.namespace("GeoExplorer");
 
+/**
+ * api: (define)
+ * module = GeoExplorer
+ * class = Wizard(config)
+ * extends = Ext.Window
+ */
+
+/** api: constructor
+ *  .. class:: GeoExplorer.Wizard(config)
+ *     Create a wizard for guiding the user through a sequence of operations.
+ */
+
+/** api: config[pages]
+ * An array of :class:`Object`\ s defining the steps of the wizard.  Each object
+ * should define:
+ *
+ * title
+ *     the user-visible title of this step in the wizard
+ * panel
+ *     the :class:`Ext.Panel` instance to display for this wizard step.
+ */
+
 GeoExplorer.Wizard = function(config) { 
     Ext.applyIf(config, {
         layout: 'card',

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-05-29 22:05:28 UTC (rev 924)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-05-29 22:06:02 UTC (rev 925)
@@ -7,86 +7,97 @@
  */
 
 /**
- * Constructor: GeoExplorer
- * Create a new GeoExplorer application.
+ * api: (define)
+ * module = GeoExplorer
+ * class = GeoExplorer(config)
+ * extends = Viewer
+ */
+
+/** api: constructor
+ *  .. class:: GeoExplorer(config)
+ *     Create a new GeoExplorer application.
  *
- * Parameters:
- * config - {Object} Optional application configuration properties.
+ *     Parameters:
+ *     config - {Object} Optional application configuration properties.
  *
- * Valid config properties:
- * map - {Object} Map configuration object.
- * ows - {String} OWS URL
- * alignToGrid - {boolean} if true, align tile requests to the grid enforced by
- *     tile caches such as GeoWebCache or Tilecache
+ *     Valid config properties:
+ *     map - {Object} Map configuration object.
+ *     ows - {String} OWS URL
+ *     alignToGrid - {boolean} if true, align tile requests to the grid 
+ *         enforced by tile caches such as GeoWebCache or Tilecache
  *
- * Valid map config properties:
- * layers - {Array} A list of layer configuration objects.
- * center - {Array} A two item array with center coordinates.
- * zoom - {Number} An initial zoom level.
+ *     Valid map config properties:
+ *         layers - {Array} A list of layer configuration objects.
+ *         center - {Array} A two item array with center coordinates.
+ *         zoom - {Number} An initial zoom level.
  *
- * Valid layer config properties:
- * name - {String} Required WMS layer name.
- * title - {String} Optional title to display for layer.
+ *     Valid layer config properties:
+ *     name - {String} Required WMS layer name.
+ *     title - {String} Optional title to display for layer.
  *
- * Extends:
- *  - Viewer
  */
 var GeoExplorer = Ext.extend(Viewer, {
     
-    /**
-     * Property: map
-     * {OpenLayers.Map} The application's map.
+    /** api: property[map]
+     * :class:`OpenLayers.Map` The application's map.
      */
     map: null,
     
-    /**
-     * Property: layers
-     * {GeoExt.data.LayerStore} A store containing a record for each layer
-     *     on the map.
+    /** private: property[layers]
+     * A :class:`GeoExt.data.LayerStore` containing a record for each layer
+     * on the map.
      */
     layers: null,
 
-    /**
-     * Property: capabilities
-     * {GeoExt.data.WMSCapabilitiesStore} A store containing a record for each
-     *     layer on the server.
-     */
-    capabilities: null,
 
+
     /**
-     * Property: mapPanel
-     * {GeoExt.MapPanel} the MapPanel instance for the main viewport
+     * private: property[mapPanel]
+     * the :class:`GeoExt.MapPanel` instance for the main viewport
      */
     mapPanel: null,
 
     /**
-     * Property: alignToGrid
-     * whether or not to restrict tile request to tiled mapping service recommendation
+     * api: config[alignToGrid]
+     * A boolean indicating whether or not to restrict tile request to tiled
+     * mapping service recommendation.  
+     *
+     * True => align to grid 
+     * False => unrestrained tile requests
      */
     alignToGrid: false,
 
     /**
-     * Property: capGrid
-     * {<Ext.Window>} A window which includes a CapabilitiesGrid panel.
+     * private: property[capGrid]
+     * :class:`Ext.Window` The window containing the CapabilitiesGrid panel to 
+     * use when the user is adding new layers to the map.
      */
     capGrid: null,
 
     /**
-     * Property: popupCache
-     * {Object} An object containing references to visible popups so that 
-     *     we can insert responses from multiple requests.
+     * private: property[popupCache]
+     * :class:`Object` An object containing references to visible popups so that
+     * we can insert responses from multiple requests.
+     *
+     * ..seealso:: :method:`GeoExplorer.displayPopup()`
      */
     popupCache: {},
     
+    /** api: property[layerSources]
+     * A :class:`Ext.data.Store` containing one 
+     * :class:`GeoExt.data.WMSCapabilitiesStore` for each WMS service in use by
+     * the application, along with service-specific metadata like the service 
+     * name.
+     */
     layerSources: null,
 
     /**
-     * Method: load
+     * private: method[load]
      * Called at the end of construction.  This initiates the sequence that
-     *     prepares the application for use.
+     * prepares the application for use, including tasks such as loading 
+     * capabilities from remote servers, populating the map, etc.
      */
     load: function() {
-        
         this.layerSources = new Ext.data.SimpleStore({
             fields: ["identifier", "name", "store"],
             data: []
@@ -153,6 +164,10 @@
             this.activate);
     },
     
+    /** private: method[createWMSCapabilitiesURL]
+     * Given the URL to an OWS service endpoint, generate a GET request URL for
+     * the service's WMS capabilities.
+     */
     createWMSCapabilitiesURL: function(url) {
         var args = {
             SERVICE: "WMS",
@@ -170,8 +185,7 @@
         return url;
     },
     
-    /**
-     * Method: createLayout
+    /** private: method[createLayout]
      * Create the various parts that compose the layout.
      */
     createLayout: function() {
@@ -388,8 +402,7 @@
         });    
     },
     
-    /**
-     * Method: activate
+    /** private: method[activate]
      * Activate the application.  Call after application is configured.
      */
     activate: function() {
@@ -404,9 +417,9 @@
 
     },
     
-    /**
-     * Method: addLayers
-     * Construct the layer store to be used with the map (referenced as <layers>).
+    /** private: method[addLayers]
+     * Construct the layer store to be used with the map (referenced as 
+     * :attr:`GeoExplorer.layers`).
      */
     addLayers: function() {
         var mapConfig = this.initialConfig.map;
@@ -474,7 +487,7 @@
     },
 
     /**
-     * Method: initCapGrid
+     * private: method[initCapGrid]
      * Constructs a window with a capabilities grid.
      */
     initCapGrid: function(){
@@ -559,8 +572,7 @@
         });
     },
 
-    /**
-     * Method: showCapabilitiesGrid
+    /** private: method[showCapabilitiesGrid]
      * Shows the window with a capabilities grid.
      */
     showCapabilitiesGrid: function() {
@@ -570,6 +582,11 @@
         this.capGrid.show();
     },
 
+    /** private: method[createMapOverlay]
+     * Builds the :class:`Ext.Panel` containing components to be overlaid on the
+     * map, setting up the special configuration for its layout and 
+     * map-friendliness.
+     */
     createMapOverlay: function() {
         var scaleLinePanel = new Ext.Panel({
             cls: 'olControlScaleLine overlay-element overlay-scaleline',
@@ -647,6 +664,11 @@
         return mapOverlay;
     },
 
+    /** private: method[createTools]
+     * Create the toolbar configuration for the main panel.  This method can be 
+     * overridden in derived explorer classes such as :class:`GeoExplorer.Full`
+     * or :class:`GeoExplorer.Embed` to provide specialized controls.
+     */
     createTools: function() {
 
         // create a navigation control
@@ -830,6 +852,14 @@
         return tools;
     },
 
+    /** private: method[createMeasureTool]
+     * :param: handlerType: the :class:`OpenLayers.Handler` for the measurement
+     *     operation
+     * :param: title: the string label to display alongside results
+     *
+     * Convenience method for creating a :class:`OpenLayers.Control.Measure` 
+     * control
+     */
     createMeasureTool: function(handlerType, title) {
         
         var styleMap = new OpenLayers.StyleMap({
@@ -943,7 +973,13 @@
         return measureControl;
     },
 
-    displayPopup: function(evt, title){
+    /** private: method[displayPopup]
+     * :param: evt: the event object from a 
+     *     :class:`OpenLayers.Control.GetFeatureInfo` control
+     * :param: title: a String to use for the title of the results section 
+     *     reporting the info to the user
+     */
+    displayPopup: function(evt, title) {
         var popup;
         var popupKey = evt.xy.x + "." + evt.xy.y;
 
@@ -986,12 +1022,11 @@
 
 
     /**
-     * Method: bookmark
+     * private: method[bookmark]
+     * :return: the URL :class:`String` that was displayed to the user
+     *
      * Creates a window that shows the user a URL that can be used to
      * reload the map in its current configuration.
-     *
-     * Returns:
-     *{String} The URL displayed to the user.
      */ 
     bookmark: function(){
         var config = this.extractConfiguration();
@@ -1021,13 +1056,10 @@
     },
     
     /**
-     * Method: extractConfiguration
-     * Returns an object that represents the app's current configuration.
-     *
-     * Returns:
-     *{Object} An object that represents the app's current configuration.
+     * private: method[extractConfiguration]
+     * :return: an :class:`Object` representing the app's current configuration.
      */ 
-    extractConfiguration: function(){
+    extractConfiguration: function() {
         var config = {};
 
         // Map configuration
@@ -1059,6 +1091,9 @@
         return config;
     },
 
+    /** private: method[displayAppInfo]
+     * Display an informational dialog about the application.
+     */
     displayAppInfo: function() {
         var win = new Ext.Window({
             title: "About GeoExplorer",



More information about the Commits mailing list