oscar.Gui.Grid

This oscar.Gui.Grid widget is designed to hold a tabView display which has the information of selected features as its content.

@deprecated

Summary
oscar.Gui.GridThis oscar.Gui.Grid widget is designed to hold a tabView display which has the information of selected features as its content.
Properties
processor {<oscar.Handler>} The handler object whichexecutes the action and returns the requested information.
doDialog{Boolean} Indicates whether or not to display the grid in a dialog.
div{String} The id of the div tag to display the grid in.
features{Array(Array(<OpenLayers.Feature>))} The two dimensional array of feature objects passed in either by the processor or user manually.
tabView{YAHOO.widget.TabView} The YUI TabView control element.
map{oscar.Map} The reference to the map object.
tables{Object} An object referencing the tables for features
featureCtrl {<OpenLayers.Control.SelectFeature>} Referenceto an OpenLayers.Control.SelectFeature control.
featureLayer {<OpenLayers.Layer.Vector>} Reference to anOpenLayers.Layer.Vector layer for displaying features.
Constructor
oscar.Gui.Grid
Functions
processResultsThis method is used to process the results returned by the processor object.
showGridDisplays the features in a TabView grid.
buildTabLayoutCreates the elements to contain the tabs and places them in the DOM.
buildTable Builds the tables to show the feature information.
cleanClears the selection result features on the map and the grid.
selectFeatureCalled when a feature is selected.
unSelectFeatureCalled when a feature is unselected.
_selectRowCalled when a row in a table is selected.
_getListByNameRetrieves the array of features contained in the features array by name
_findTabRetrieves the currently activated tab.
_addTabCreates a tab in the TabView.
_buildTableCalls the buildTable method with the correct parameters.
Constants
CLASS_NAME - oscar.Gui.Grid

Properties

processor {<oscar.Handler>} The handler object which

executes the action and returns the requested information.  The value of this object can be set via the constructor’s options argument.

doDialog

{Boolean} Indicates whether or not to display the grid in a dialog.

div

{String} The id of the div tag to display the grid in.

features

{Array(Array(<OpenLayers.Feature>))} The two dimensional array of feature objects passed in either by the processor or user manually.

tabView

{YAHOO.widget.TabView} The YUI TabView control element.

map

{oscar.Map} The reference to the map object.

tables

{Object} An object referencing the tables for features

featureCtrl {<OpenLayers.Control.SelectFeature>} Reference

to an OpenLayers.Control.SelectFeature control.

featureLayer {<OpenLayers.Layer.Vector>} Reference to an

OpenLayers.Layer.Vector layer for displaying features.

Constructor

oscar.Gui.Grid

Parameters: options{Object} An optional object whose properties will be set on this instance.

Functions

processResults

processResults : function(layer)

This method is used to process the results returned by the processor object.

Parameters: results{Object} An object that contains the information to be processed.  It may have the following format: (start code) results = { map : oscar.Map, // A reference to an oscar.Map object; features : this.features, // A reference to an {Array(Array(<OpenLayers.Feature>))} object; object : this.processor // A reference to handler object; } (end code) This results parameter can be passed in by user or returned by the processor object.

showGrid

showGrid : function()

Displays the features in a TabView grid.

buildTabLayout

buildTabLayout : function()

Creates the elements to contain the tabs and places them in the DOM.

buildTable Builds the tables to show the feature information.

Parameters: div{HTMLElement} a div HTMLElement. key - {String} The
*key* String of a feature object. features{Array({<OpenLayers.Feature.Vector>})} an Array of OpenLayers.Feature.Vector objects.

clean

clean : function()

Clears the selection result features on the map and the grid.

selectFeature

selectFeature : function(feature)

Called when a feature is selected.  Creates the pop-up which is displayed on screen.

Parameters: feature{<OpenLayers.Feature.Vector>} an OpenLayers.Feature.Vector object.

unSelectFeature

unSelectFeature : function(feature)

Called when a feature is unselected.  Removes the pop-up from the map.

Parameters: feature{<OpenLayers.Feature.Vector>} an OpenLayers.Feature.Vector object.

_selectRow

_selectRow : function(feature)

Called when a row in a table is selected.  Will attempt to select a feature on the map.

Parameters: feature{<OpenLayers.Feature.Vector>} an OpenLayers.Feature.Vector object.

_getListByName

_getListByName : function(name)

Retrieves the array of features contained in the features array by name

Parameters: namename of the feature array.

_findTab

_findTab : function(name)

Retrieves the currently activated tab.

Parameters: name{String} the label String of the tab.

_addTab

_addTab : function(lbl)

Creates a tab in the TabView.

Parameters: lbl{String} The key String of a feature object, and it will be used as the label of a tab.
Returns: newTab{<YAHOO.widget.Tab>} a new tab object.

_buildTable

_buildTable : function(tab,
key,
features)

Calls the buildTable method with the correct parameters.

Parameters: tab{<YAHOO.widget.Tab>} a reference to a tab object. key -
{String} The *key* String of a feature object. features{<OpenLayers.Feature.Vector>} an Array of OpenLayers.Feature.Vector objects.

Constants

CLASS_NAME - oscar.Gui.Grid

processResults : function(layer)
This method is used to process the results returned by the processor object.
showGrid : function()
Displays the features in a TabView grid.
buildTabLayout : function()
Creates the elements to contain the tabs and places them in the DOM.
clean : function()
Clears the selection result features on the map and the grid.
selectFeature : function(feature)
Called when a feature is selected.
unSelectFeature : function(feature)
Called when a feature is unselected.
_selectRow : function(feature)
Called when a row in a table is selected.
_getListByName : function(name)
Retrieves the array of features contained in the features array by name
_findTab : function(name)
Retrieves the currently activated tab.
_addTab : function(lbl)
Creates a tab in the TabView.
_buildTable : function(tab,
key,
features)
Calls the buildTable method with the correct parameters.