ラベル EXTJS の投稿を表示しています。 すべての投稿を表示
ラベル EXTJS の投稿を表示しています。 すべての投稿を表示

2016年2月15日月曜日

GeoExt3-dev 9 - Feature Grid Example 2

9-2 JavaScript ファイルの作成
「grid.js(9-geoext3.js)」は、マップを表示するための JavaScript ファイルです。

「9-geoext3.js」
Ext.require([
/** require( expressions, [fn], [scope] )
 * Loads all classes by the given names and all their 
 * direct dependencies; optionally executes the given 
 * callback function when finishes, within the optional 
 * scope.
 * 指定された名前とそのすべての直接依存によって、すべて
 * のクラスをロードします。任意の範囲内で、終了するとき
 * に任意で与えられたコールバック関数を実行します。
 * (GeoExt doc[w/ext])
 */
 'Ext.container.Container',
 /** Ext.container.Container
  * Base class for any Ext.Component that may contain other 
  * Components. Containers handle the basic behavior of 
  * containing items, namely adding, inserting and removing 
  * items.
  * The most commonly used Container classes are 
  * Ext.panel.Panel, Ext.window.Window and Ext.tab.Panel. 
  * If you do not need the capabilities offered by the 
  * aforementioned classes you can create a lightweight 
  * Container to be encapsulated by an HTML element to your 
  * specifications by using the autoEl config option.
  * 他の Component を含むことができる任意の Ext.Component の
  * 基本クラス。コンテナ(Container)は、items(アイテム)を
  * 含む基本的な動作、すなわち、items(アイテム)を追加、挿入、
  * 削除すること、を処理します。
  * 最も一般的に使用される Container クラスは Ext.panel.Panel、
  * Ext.window.Window と Ext.tab.Panel です。上記のクラスに
  * よって提供される機能が必要ない場合は、autoEl 設定オプショ
  * ンを使用して、にHTML要素によってカプセル化される軽量のコン
  * テナを独自に作成することができます。
  * (GeoExt doc[w/ext])
  */
 'Ext.panel.Panel',
 /** Ext.panel.Panel
  * Panel is a container that has specific functionality 
  * and structural components that make it the perfect 
  * building block for application-oriented user interfaces.
  * Panels are, by virtue of their inheritance from 
  * Ext.container.Container, capable of being configured 
  * with a layout, and containing child Components.
  * パネルは、特定の機能とそれアプリケーション指向のユーザ
  * インターフェイスに最適なビルディングブロックにする構造
  * 的要素を持っているコンテナです。パネルは、
  * Ext.container.Container からの継承のおかげで、layout 
  * で構成し、子コンポーネントを含むことができます。
  * (GeoExt doc[w/ext])
  */
 'Ext.grid.Panel',
 /** Ext.grid.Pane
  * Grids are an excellent way of showing large amounts of 
  * tabular data on the client side. Essentially a 
  * supercharged <table>, GridPanel makes it easy to fetch, 
  * sort and filter large amounts of data.
  * Grids are composed of two main pieces - a Store full of 
  * data and a set of columns to render.
  * grid(グリッド)は、クライアント側で大量の表データを示すた
  * めの優れた方法です。基本的に過給された <table> は、
  * GridPanelは、大量のデータを簡単にフェッチ、並べ替え、および
  * フィルタリングすることができます。
  * grid は、 2つの主要部品 - データの完全な保存とレンダリング
  * する列のセット - で構成されています。
  * (GeoExt doc[w/ext])
  */
 'GeoExt.component.Map',
 /** GeoExt.component.Map
  * The map component and a panel side by side
  * map component(マップコンポーネント)とパネルの位置関
  * 係(並び)。
  * (GeoExt doc[w/ext])
  */
 'GeoExt.data.store.Features',
 /** GeoExt.data.store.Features
  * A data store holding OpenLayers feature objects 
  * (ol.Feature).
  * OpenLayers feature オブジェクトを保持するデータストア
  *  (ol.Feature)。
  * (GeoExt doc[w/ext])
  */
 'GeoExt.grid.column.Symbolizer'
 /** GeoExt.grid.column.Symbolizer
  * An Ext.grid.column.Column pre-configured with a 
  * GeoExt.FeatureRenderer. This can be used to display the 
  * rendering style of a vector feature in a grid column.
  * GeoExt.FeatureRenderer を使用して事前に設定された 
  * Ext.grid.column.Column。これは、グリッドカラムにベクタ
  * フィーチャのレンダリングスタイルを表示するために使用されま
  * す。
  * (GeoExt doc[w/ext])
  */
]);
var olMap, gridWest, gridEast, featStore1, featStore2;
Ext.application({
/** Ext.app.Application
 * Represents an Ext JS application, which is typically 
 * a single page app using a Viewport.
 * An application consists of one or more Views. The 
 * behavior of a View is managed by its corresponding 
 * ViewController and ViewModel.
 * Global activities are coordinated by Controllers 
 * which are ultimately instantiated by an instance 
 * of this (or a derived) class.
 * 通常、ビューポートを使用して1つのページの app である 
 * ExtJS アプリケーションを表します。
 * アプリケーションは、1つまたは複数の View で構成されて
 * います。View の動作は、その対応する ViewController 
 * と ViewModel によって管理されます。
 * グローバルな動作は、このインスタンス(または派生)
 * クラスで最終的にインスタンス化されている Controller 
 * によって調整されます。(GeoExt doc[w/ext])
 */
 name: 'FeatureGrids',
 /** name : String
  * The name of your application. This will also be the 
  * namespace for your views, controllers models and 
  * stores. Don't use spaces or special characters in 
  * the name. Application name is mandatory.
  * アプリケーションの名前。これはまた、views、controllers 
  * models と stores の名前空間になります。name には
  * スペースや特殊文字を使用しないでください。アプリケー
  * ション名は必須です。初期値は、''。
  * (GeoExt doc[w/ext])
  */
 launch: function() {
 /** launch( profile ) : Booleantemplate
  * Called automatically when the page has completely 
  * loaded. This is an empty function that should be 
  * overridden by each application that needs to take 
  * action on page load.
  * ページが完全にロードされたときに自動的に呼び出されます。
  * これは、ページのロード時にアクションを実行する必要があ
  * る各アプリケーションによって上書きされなければならない
  * 空の関数です。(GeoExt doc[w/ext])
  */
  var geojson1 = {
   "type": "FeatureCollection",
   "features": [
    {
     "type": "Feature",
     "properties": {
      "city": "Hamburg",
      "pop": 1700000
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       10.107421874999998,
       53.527247970102465
      ]
     }
    },
    {
     "type": "Feature",
     "properties": {
      "city": "Frankfurt / Main",
      "pop": 700000
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       8.76708984375,
       50.064191736659104
      ]
     }
    },
    {
     "type": "Feature",
     "properties": {
      "city": "Berlin",
      "pop": 3500000
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       13.447265624999998,
       52.53627304145948
      ]
     }
    },
    {
     "type": "Feature",
     "properties": {
      "city": "München",
      "pop": 1400000
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       11.6455078125,
       48.1367666796927
      ]
     }
    }
   ]
  };
  var geojson2 = {
   "type": "FeatureCollection",
   "features": [
    {
     "type": "Feature",
     "properties": {
      "city": "Dortmund"
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       7.481689453125,
       51.49506473014368
      ]
     }
    },
    {
     "type": "Feature",
     "properties": {
      "city": "Köln"
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       6.976318359375,
       50.93073802371819
      ]
     }
    },
    {
     "type": "Feature",
     "properties": {
      "city": "Kaiserslautern"
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       7.7838134765625,
       49.44670029695474
      ]
     }
    },
    {
     "type": "Feature",
     "properties": {
      "city": "Bonn"
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       7.102661132812499,
       50.74688365485319
      ]
     }
    },
    {
     "type": "Feature",
     "properties": {
      "city": "Stuttgart"
     },
     "geometry": {
      "type": "Point",
      "coordinates": [
       9.1461181640625,
       48.77429274267509
      ]
     }
    }
   ]
  };
  // style objects
  var blueStyle = new ol.style.Style({
  /** ol.style.Style 
   * Container for vector feature rendering styles. Any 
   * changes made to the style or its children through 
   * set*() methods will not take effect until the 
   * feature or layer that uses the style is re-rendered.
   * ベクタフィーチャがスタイルを描画するためのコンテナ。
   * スタイルや set*() メソッドを通じてその子に加えられた変
   * 更は、スタイルを使用するフィーチャまたはレイヤが再レン
   * ダリングされるまで有効になりません。
   * (ol3 API[説明は Stable Only のチェックを外すと表示])
   */
   image: new ol.style.Circle({
   /** ol.style.Circle
    * Set circle style for vector features.
    * ベクタフィーチャの円のスタイルを設定。(ol3 API)
    */
    radius: 6,
    fill: new ol.style.Fill({
    /** ol.style.Fill 
     * Set fill style for vector features.
     * ベクタフィーチャの塗りつぶしスタイルを設定。
     * (ol3 API[説明は Stable Only のチェックを外すと表示])
     */
     color: '#0099CC'
    }),
    stroke: new ol.style.Stroke({
    /** ol.style.Stroke 
     * Set stroke style for vector features. 
     * Note that the defaults given are the Canvas defaults, 
     * which will be used if option is not defined. 
     * The get functions return whatever was entered 
     * in the options;  they will not return the default.
     * ベクタフィーチャのためのストロークスタイルの設定。
     * デフォルトは、オプションが定義されていない場合に使用さ
     * れる Canvas のデフォルトを与えられることに注意してくだ
     * さい。GET 関数は、オプションで入力されたものはすべて返
     * す。それらはデフォルトを返しません。
     * (ol3 API[説明は Stable Only のチェックを外すと表示])
     */
     color: '#fff',
     width: 2
    })
   })
  });
  var redStyle = new ol.style.Style({
   image: new ol.style.Circle({
    radius: 6,
    fill: new ol.style.Fill({
     color: '#8B0000'
    }),
    stroke: new ol.style.Stroke({
     color: '#fff',
     width: 2
    })
   })
  });
  var selectStyle = new ol.style.Style({
   image: new ol.style.Circle({
    radius: 6,
    fill: new ol.style.Fill({
     color: '#EE0000'
    }),
    stroke: new ol.style.Stroke({
     color: 'gray',
     width: 3
    })
   })
  });
  // create a feature collection in order to put into a 
  // feature store
  //フィーチャストアに置くためにフィーチャコレクションを作成
  //します。
  var vectorSource = new ol.source.Vector({
  /** ol.source.Vector
   * Provides a source of features for vector layers. 
   * Vector features provided by this source are 
   * suitable for editing. See ol.source.VectorTile for 
   * vector data that is optimized for rendering.
   * ベクタレイヤのフィーチャのソースを用意します。このソース
   * が提供するベクタフィーチャは、編集に適しています。レンダ
   * リングのために最適化されたベクタデータの 
   * ol.source.VectorTile を参照してください。(ol3 API)
   */
   features: (new ol.format.GeoJSON()).readFeatures(geojson1, {
   /** ol.format.GeoJSON 
    * Feature format for reading and writing data in the 
    * GeoJSON format.
    * GeoJSON フォーマットのデータを読み書きするためのフィー
    * チャフォーマット。(ol3 API)
    */
   /** readFeatures(source, opt_options)
    * Read all features from a GeoJSON source.
    * Works with both Feature and FeatureCollection 
    * sources. 
    * GeoJSON ソースからすべてのフィーチャを読み取ります。
    * フィーチャとフィーチャコレクションソースの両方で動作し
    * ます。
    * (ol3 API)
    */
    dataProjection: 'EPSG:4326',
    /** dataProjection:
     * Projection of the data we are reading. If not 
     * provided, the projection will be derived from the 
     * data (where possible) or the defaultDataProjection 
     * of the format is assigned (where set). If the 
     * projection can not be derived from the data and if 
     * no defaultDataProjection is set for a format, the 
     * features will not be reprojected.
     * 読み込んでいるデータの投影。提供されていない場合は、
     * 投影は、データ(可能な場合)または、割り当てられた
     * フォーマットの defaultDataProjection (設定されてい
     * る場合)が導き出されます。投影がデータから導き出され
     * ることができない場合、そして、defaultDataProjection 
     * がフォーマットに対して設定されていない場合、フィーチャ
     * は再投影されることはありません。(ol3 API)
     */
    featureProjection: 'EPSG:3857'
    /** featureProjection:
     * Projection of the feature geometries created by the 
     * format reader. If not provided, features will be 
     * returned in the dataProjection.
     * フォーマットリーダによって作成されたフィーチャジオメト
     * リの投影。提供されていない場合、フィーチャは、
     * dataProjection で返されます。(ol3 API)
     */
   })
  });
  var featColl = new ol.Collection(vectorSource.getFeatures());
  /** ol.Collection
   * An expanded version of standard JS Array, adding 
   * convenience methods for manipulation. Add and remove 
   * changes to the Collection trigger a Collection event. 
   * Note that this does not cover changes to the objects 
   * within the Collection; they trigger events on the 
   * appropriate object, not on the Collection as a whole.
   * 標準 JS Array の拡張バージョン、操作のための便利なメソッド
   * を追加します。Collection イベントを Collection トリガへ変
   * 更することを追加、削除します。これは Collection 内のオブ
   * ジェクトへの変更をカバーしていないことに注意してください。
   * それらは適切なオブジェクトにイベントをトリガし、Collection 
   * 全体にはしません。(ol3 API)
   */
  /** getFeatures()
   * Get all features on the source.
   * ソース上の不すべてのフィーチャを取得します。
   * (ol3 API)
   */
  // loading data via into ol source and create a vector 
  // layer to bind a vector layer to a feature store
  // ol.source を経由してデータをロードし、ベクタレイヤを
  // フィーチャストアに結合するためのベクタレイヤを作成します。
  var vectorLayer = new ol.layer.Vector({
  /** ol.layer.Vector
   * Vector data that is rendered client-side.
   * クライアント側で描画されるベクタデータ。(ol3 API)
   */
   source: new ol.source.Vector({
    features: (new ol.format.GeoJSON()).readFeatures(geojson2, {
     dataProjection: 'EPSG:4326',
     featureProjection: 'EPSG:3857'
    })
   }),
   style: redStyle
  });
  olMap = new ol.Map({
   layers: [
    new ol.layer.Tile({
    /** ol.layer.Tile 
     * For layer sources that provide pre-rendered, tiled 
     * images in grids that are organized by zoom levels 
     * for specific resolutions. 
     * プリレンダリング(事前描画)を提供するレイヤソースの
     * ための、特定の解像度でのズームレベルによって編成され
     * ているグリッドのタイルイメージ。(ol3 API)
     */
     source: new ol.source.TileWMS({
     /** ol.source.TileWMS
      * Layer source for tile data from WMS servers.
      * WMS サーバからのタイルデータのレイヤソース。
      * (ol3 API)
      */
      url: 'http://ows.terrestris.de/osm-gray/service',
      params: {'LAYERS': 'OSM-WMS', 'TILED': true}
     })
    }),
    vectorLayer
   ],
   view: new ol.View({
    center: ol.proj.fromLonLat([8, 50]),
    /** ol.proj.fromLonLat(coordinate, opt_projection)
     * Transforms a coordinate from longitude/latitude to a 
     * different projection.
     * 緯度/経度座標から異なる投影に変換します。(ol3 API)
     */
    zoom: 5
   })
  });
  // create feature store by passing a feature collection
  // フィーチャコレクションを渡すことによって、フィーチャスト
  // アを作成します。
  featStore1 = Ext.create('GeoExt.data.store.Features', {
  /** create( [name], [args] ) : Object
   * Instantiate a class by either full name, alias or 
   * alternate name.
   * If Ext.Loader is enabled and the class has not been 
   * defined yet, it will attempt to load the class via 
   * synchronous loading.
   * 完全な名前、別名または代替名のいずれかによってクラスを
   * インスタンス化します。
   * Ext.Loader が有効になっており、クラスがまだ定義されて
   * いない場合は、同期ロードを経由してクラスをロードしよう
   * とします。(GeoExt doc[w/ext)
   */
   features: featColl,
   /** features : ol.Collection
    * Initial set of features. Has to be an ol.Collection 
    * object with ol.Feature objects in it.
    * フィーチャの初期セット。その中で ol.Feature オブジェク
    * トと ol.Collection オブジェクトである必要があります。
    * (GeoExt doc[w/ext)
    */
   map: olMap,
   /** map : ol.Map
    * A map object to which a possible layer will be added.
    * 可能なレイヤが追加されるマップオブジェクト。
    * (GeoExt doc[w/ext)
    */
   createLayer: true,
   /** createLayer : Boolean
    * Setting this flag to true will create a vector layer 
    * with the given features and adds it to the given map 
    * (if available).
    * Defaults to: false
    * このフラグを true に設定すると、指定したfフィーチャを備え
    * たベクトルレイヤを作成し、(可能なら)それを指定されたマッ
    * プに追加します。
    * デフォルトは:false。(GeoExt doc[w/ext)
    */
   style: blueStyle
   /** style : ol.Style
    * An OpenLayers 3 style object to style the vector layer 
    * representing the features of this store.
    * このストアのフィーチャを表すベクトルレイヤのスタイルを設定
    * する OpenLayers 3 スタイルオブジェクト。
    * (GeoExt doc[w/ext)
    */
  });
  // create feature store by passing a vector layer
  // ベクタレイヤを通すことによってフィーチャストアを作成
  featStore2 = Ext.create('GeoExt.data.store.Features', {
   layer: vectorLayer,
   /** layer : ol.Layer
    * Initial layer holding features which will be added to 
    * the store.
    * ストアに追加されるフィーチャを保持する初期レイヤ。
    * (GeoExt doc[w/ext)
    */
   map: olMap
  });
  // default feature grid
  gridWest = Ext.create('Ext.grid.Panel', {
  /** Ext.grid.Panel
   * Grids are an excellent way of showing large amounts of 
   * tabular data on the client side. Essentially a 
   * supercharged <table>, GridPanel makes it easy to fetch, 
   * sort and filter large amounts of data.
   * グリッドは、クライアント側で表形式の大量のデータを示すための
   * 優れた方法です。基本的にあふれるほどの <table> に、グリッド
   * パネルは、大量のデータを簡単に読み込み、ソート、および、フィ
   * ルタリングすることができます。
   * (GeoExt doc[w/ext)
   */
   title: 'Feature Grid',
   /** title : String
    * The title text to be used to display in the Panel 
    * Header. Or a config object for a Panel Title. When 
    * a title is specified the Ext.panel.Header will 
    * automatically be created and displayed unless header 
    * is set to false.
    * Panel Header に表示するために使用される title テキスト。
    * または Panel Title のための config オブジェクト。タイト
    * ルが指定されている場合、ヘッダがfalseに設定されていない限 
    * り Ext.panel.Headerが自動的に作成され、表示されます。
    * (GeoExt doc[w/ext)
    */
   border: true,
   /** border : Boolean
    * Specify as false to render the Panel with zero width 
    * borders.
    * Leaving the value as true uses the selected theme's 
    * $panel-border-width
    * Defaults to false when using or extending Neptune.
    * Defaults to: true
    * Overrides: Ext.Component.border
    * ゼロ幅の border(境界線)でパネルを描画するため false 
    * を指定します。
    * true として値を残すためには、選択されたテーマ 
    * $panel-border-width を使用します。
    * ネプチューン(Neptune Theme)を使用するか拡張すると
    * き、デフォルトは false です。
    * デフォルトは:true。
    * (GeoExt doc[w/ext)
    */
   region: 'west',
   /** region : "north"/"south"/"east"/"west"/"center"
    * Defines the region inside border layout.
    * ボーダレイアウトの内側の領域を定義します。
    * Possible values:
    * north - Positions component at top.
    * south - Positions component at bottom.
    * east - Positions component at right.
    * west - Positions component at left.
    * center - Positions component at the remaining space. 
    *  There must be a component with region: "center" in 
    *  every border layout.
    *  region でコンポーネント、すべてのボーダレイアウト内の
    *  「center」、が存在する必要があります。
    * (GeoExt doc[w/ext)
    */
   store: featStore1,
   /** store : Ext.data.Store/String/Object
    * The data source to which the grid / tree is bound. 
    * Acceptable values for this property are:
    * grid / tree がバインドされているデータソース。このプロ
    * パティに指定できる値は以下のとおりです。
    * 
    * any Store class / subclass
    * an ID of a store
    * a Store config object. When passing a config you can 
    * specify the store type by alias. Passing a config 
    * object with a store type will dynamically create a 
    * new store of that type when the grid / tree is 
    * instantiated.
    * 設定を渡すときは、エイリアスによって、ストレージタイプを
    * 指定することができます。grid / tree がインスタンス化さ
    * れるときにストアタイプでconfigオブジェクトを渡すと、動
    * 的にそのタイプの新しいストアを作成します。
    * (GeoExt doc[w/ext)
    */
   columns: [
   /** columns : Ext.grid.column.Column[]/Object
    * An array of column definition objects which define all 
    * columns that appear in this grid. Each column 
    * definition provides the header text for the column, 
    * and a definition of where the data for that column 
    * comes from.
    * This can also be a configuration object for a 
    * HeaderContainer which may override certain default 
    * configurations if necessary. For example, the special 
    * layout may be overridden to use a simpler layout, or 
    * one can set default values shared by all columns:
    * このグリッドに表示されるすべてのカラムを定義するカラム定義
    * オブジェクトの配列。各カラム定義は、カラムに対してヘッダー
    * テキスト、およびそのカラムのデータの発生場所の定義を提供し
    * ます。
    * これは、必要に応じて、特定のデフォルト設定を上書きすること
    * ができる HeaderContainer ための設定オブジェクトにすること
    * もできます。例えば、特殊なレイアウト(layout)が簡単なレイ
    * アウトを使用するために上書きすることができ、または、すべて
    * のカラムによって共有されるデフォルト値を設定することができ
    * ます。
    * (GeoExt doc[w/ext)
    */
    {xtype: 'gx_symbolizercolumn', width: 40},
    /** gx_symbolizercolumn
     * Alias for GeoExt.grid.column.Symbolizer.
     * Defaults to: 'gx_symbolizercolumn'
     * (GeoExt doc[w/ext)
     */
    /** GeoExt.grid.column.Symbolizer
     * An Ext.grid.column.Column pre-configured with a 
     * GeoExt.FeatureRenderer. This can be used to display 
     * the rendering style of a vector feature in a grid 
     * column.
     * GeoExt.FeatureRenderer で事前に設定された 
     * Ext.grid.column.Column 。これは、グリッドカラムにベクタ
     * のフィーチャのレンダリングスタイルを表示するために使用で
     * きます。
     * (GeoExt doc[w/ext)
     */
    {text: 'Name', dataIndex: 'city', flex: 1},
    /** dataIndex : String
     * The name of the field in the grid's 
     * Ext.data.Store's Ext.data.Model definition from 
     * which to draw the column's value. Required.
     * グリッドのExt.data.Store.のカラムの値を描画する 
     * Ext.data.Model 定義内のフィールド名。必須。
     * (GeoExt doc[w/ext])
     */
    /** flex : Number
     * Flex may be applied to child items of a box layout 
     * (vbox or hbox). Each child item with a flex property 
     * will fill space (horizontally in hbox, vertically in 
     * vbox) according to that item's relative flex value 
     * compared to the sum of all items with a flex value 
     * specified.
     * Any child items that have either a flex of 0 or 
     * undefined will not be 'flexed' (the initial size 
     * will not be changed).
     * flex(フレックス)は、ボックスレイアウト(VBOX または 
     * hbox)の子 item(アイテム)に適用することができます。
     * flex プロパティを持つそれぞれの子 item は、指定された 
     * flex 値を持つすべての item の合計と比べ、その item の
     * 相対的な flex 値に応じて(VBOX に垂直方向、hbox に水
     * 平方向)スペースを埋めます。
     * 0 flex または、未定義のいずれかを持っている任意の子 
     * item は、「(ウィンドウに合わせて)伸縮」されることは
     * ありません(初期サイズは変更されません)。
     * (GeoExt doc[w/ext)
     */
    {
     text: 'Population',
     dataIndex: 'pop',
     xtype: 'numbercolumn',
     /** numbercolumn(Ext.grid.column.Number)
      * Ext.grid.column.Number
      * A Column definition class which renders a numeric 
      * data field according to a format string.
      * 書式文字列に従って、数値データフィールドをレンダリン
      * グするカラム定義クラス。
      * (GeoExt doc[w/ext)
      */
     format: '0,000',
     /** format : String
      * A formatting string as used by Ext.util.Format.number
      * to format a numeric value for this Column.
      * Defaults to: '0,000.00'
      * このカラムの数値をフォーマットするため 
      * Ext.util.Format.number で使用される書式文字列。
      * デフォルト:「0,000.00」
      * (GeoExt doc[w/ext)
      */
     flex: 1
    }
   ],
   width: 250
   /** width : Number|String
    * The width of this component. A numeric value will be 
    * interpreted as the number of pixels; a string value 
    * will be treated as a CSS value with units.
    * このコンポーネントの幅。数値は、ピクセル数として解釈さ
    * れます。文字列値は単位でCSS値として扱われます。
    * (GeoExt doc[w/ext)
    */
  });
  // feature grid with some selection logic
  gridEast = Ext.create('Ext.grid.Panel', {
   title: 'Feature Grid with selection',
   border: true,
   region: 'east',
   store: featStore2,
   columns: [
    {xtype: 'gx_symbolizercolumn', width: 40},
    {text: 'Name', dataIndex: 'city', flex: 2}
   ],
   width: 250,
   listeners: {
   /** listeners : Object
    * A config object containing one or more event handlers 
    * to be added to this object during initialization. This 
    * should be a valid listeners config object as specified 
    * in the addListener example for attaching multiple 
    * handlers at once.
    * 初期化中にこのオブジェクトに追加される、1つまたは複数の
    * イベントハンドラを含む設定オブジェクト。これは、一度に
    * 複数のハンドラを取り付ける addListener の例で指定され
    * た有効なリスナ設定オブジェクトである必要があります。
    * (GeoExt doc[w/ext)
    */
    'selectionchange': function(grid, selected) {
     // reset all selections
     featStore2.each(function(rec) {
     /**.each( function )
      * Iterate over a jQuery object, executing a function 
      * for each matched element. 
      * 一致する各要素に対して関数を実行し、jQueryオブジェク
      * トを反復処理します。
      * (jQuery[http://api.jquery.com/each/])
      */
      rec.getFeature().setStyle(redStyle);
      /** getFeatures()
       * Get the selected features.
       * 選択されたフィーチャを取得します。
       * Return: Features collection(ol3 API)
       */
      /** setStyle(style)
       * Set the style for the feature. This can be a single 
       * style object, an array of styles, or a function 
       * that takes a resolution and returns an array of 
       * styles. If it is null the feature has no style (a 
       * null style).
       * フィーチャのスタイルを設定します。これは、単一のスタイ
       * ルオブジェクト、スタイルの配列、または解像度をとり、ス
       * タイルの配列を返す関数とすることができます。null の場
       * 合、フィーチャは、スタイルなし(null のスタイル)を持
       * ちます。(ol3 API)
       */
     });
     // highlight grid selection in map
     Ext.each(selected, function(rec) {
     /** each( iterable, fn, [scope], [reverse] ) : Boolean
      * Iterates an array or an iterable value and invoke 
      * the given callback function for each item.
      * 配列または反復可能オブジェクトの値を反復処理し、各項
      * 目に与えられたコールバック関数を呼び出します。
      * (GeoExt doc[w/ext)
      */
      rec.getFeature().setStyle(selectStyle);
     });
    }
   }
  });
  var mapComponent = Ext.create('GeoExt.component.Map', {
   map: olMap
  });
  var mapPanel = Ext.create('Ext.panel.Panel', {
   region: 'center',
   height: 400,
   /** height : Number|String
    * The height of this component. A numeric value will be 
    * interpreted as the number of pixels; a string value 
    * will be treated as a CSS value with units.
    * このコンポーネントの高さ。数値は、ピクセル数として解釈さ
    * れます。文字列値は単位でCSS値として扱われます。
    * (GeoExt doc[w/ext)
    */
   layout: 'fit',
   /** layout
    * By default, a lockable grid uses an HBox layout to 
    * arrange the two grids (possibly separated by a 
    * splitter).
    * Using this config it is possible to specify a 
    * different layout to arrange the two grids.
    * Defaults to: 'fit'
    * Overrides: Ext.grid.locking.Lockable.layout 
    * デフォルトでは、ロック可能なグリッドは(おそらくスプリッ
    * タで分離された)2つのグリッドを配置するのHBoxレイアウトを
    * 使用しています。
    * この設定を使用すると、2つのグリッドを配置する別のレイアウ
    * トを指定することが可能です。
    * デフォルト:"fit"
    * オーバーライド:Ext.grid.locking.Lockable.layout
    * (GeoExt doc[w/ext)
    */
   items: [mapComponent]
   /** layout : Ext.enums.Layout/Object
    * Important: In order for child items to be correctly 
    * sized and positioned, typically a layout manager must 
    * be specified through the layout configuration option.
    * The sizing and positioning of child items is the 
    * responsibility of the Container's layout manager 
    * which creates and manages the type of layout you have 
    * in mind. 
    * 重要:子アイテムが正しいサイズと配置されるためには、
    * 一般的にレイアウトマネージャは、layout configuration 
    * option(レイアウト設定オプション)を使用して指定する
    * 必要があります。
    * 子アイテムのサイズと位置は、レイアウトの種類を管理す
    * るContainer's layout manager(コンテナレイアウトマ
    * ネージャ)の役割です。
    * (GeoExt doc[w/ext)
    */
  });
  var description = Ext.create('Ext.panel.Panel', {
   contentEl: 'description',
   /** contentEl : String
    * Specify an existing HTML element, or the id of an 
    * existing HTML element to use as the content for this 
    * component.
    * This config option is used to take an existing HTML 
    * element and place it in the layout element of a new 
    * component (it simply moves the specified DOM element 
    * after the Component is rendered to use as the content.
    * 既存のHTMLエレメントを指定するか、既存のHTMLエレメン
    * トの id は、このコンポーネントのコンテンツとして使用
    * します。
    * Component(コンポーネント)が 、content(コンテンツ)
    * として使用するためにレンダリングされた後に、この設定オ
    * プションは、既存のHTMLエレメントを取得し、新しい 
    * component(コンポーネント)の layout(レイアウト)エレ
    * メントでそれを配置するために使用されます(それは単に指定
    * された DOM エレメントを移動させます)。
    * (GeoExt doc[w/ext)
    */
   region: 'south',
   title: 'Description',
   height: 180,
   border: false,
   bodyPadding: 5,
   /** bodyPadding : Number/String
    * A shortcut for setting a padding style on the body 
    * element. The value can either be a number to be 
    * applied to all sides, or a normal css string 
    * describing padding.
    * bodyエレメントにパディングスタイルを設定するための
    * ショートカット。値は、すべての側面に適用される数字、
    * または通常のCSSの文字列記述パディングのいずれかにで
    * きます。
    * (GeoExt doc[w/ext)
    */
   autoScroll: true
   /** autoScroll : Booleandeprecated
    * This cfg has been deprected since 5.1.0
    * Use scrollable instead
    */
  });
  Ext.create('Ext.Viewport', {
  /** Ext.Viewport (Ext.container.Viewport)
   * A specialized container representing the viewable 
   * application area (the browser viewport).
   * The Viewport renders itself to the document body, 
   * and automatically sizes itself to the size of the 
   * browser viewport and manages window resizing. There 
   * may only be one Viewport created in a page.
   * 表示可能なアプリケーション領域(ブラウザのビューポート)
   * を表す特殊なコンテナ。
   * Viewport は、document body にそれ自身をレンダリングし、
   * 自動的に自身のサイズをブラウザのビューポートのサイズにし、
   * ウィンドウのサイズ変更を管理します。1ページに作成した
   * ビューポートは一つだけ設定できます。
   * (GeoExt doc[w/ext])
   */
   layout: 'border',
   /** layout : Ext.enums.Layout/Object
    * Important: In order for child items to be correctly 
    * sized and positioned, typically a layout manager must 
    * be specified through the layout configuration option.
    * The sizing and positioning of child items is the 
    * responsibility of the Container's layout manager 
    * which creates and manages the type of layout you have 
    * in mind. 
    * 重要:子アイテムが正しいサイズと配置されるためには、
    * 一般的にレイアウトマネージャは、layout configuration 
    * option(レイアウト設定オプション)を使用して指定する
    * 必要があります。
    * 子アイテムのサイズと位置は、レイアウトの種類を管理す
    * るContainer's layout manager(コンテナレイアウトマ
    * ネージャ)の役割です。
    * (GeoExt doc[w/ext)
    */
   items: [mapPanel, gridWest, gridEast, description]
  });
 }
});

GeoExt3-dev 9 - Feature Grid Example 1

GeoExt3(https://geoext.github.io/geoext3/)の例(Examoles)をみていきます。

9 - Feature Grid Example
「Feature Grid Example(grid.html)」(「Examples」の「Feature Grid」)を参考に地図を表示してみます。
説明に次のようにあります。

This example shows how to display features in grids.

The grid on the left side is created by passing an OpenLayers collection (ol.Collection) with feature objects (ol.Feature)
The grid on the right side is created from an existing vector layer and also highlights the selected feature in the grid on the map.

この例では、グリッドのフィーチャを表示する方法を示しています。

左側のグリッドがフィーチャオブジェクト(ol.Feature)と共に OpenLayers コレクション(ol.Collection)を渡すことによって作成されます。
右側のグリッドは、既存のベクトルレイヤから作成され、また、マップ上のグリッド内の選択したフィーチャを強調しています。

9-1 HTML ファイルの作成
1 NetBeans を起動します。









2 「プロジェクト」ペインでツリーを geoext3proj -> サイト・ルート -> js -> libs -> geoext3-master -> examples -> features とクリックして展開し grid.html をダブルクリックして開きます。grid.js もダブルクリックして開きます。



3 「新規ファイル」ボタンをクリックします。

4 ステップ「1.ファイル・タイプを選択」の「カテゴリ」で「HTML5」、「ファイルタイプ」で「HTMLファイル」を選択して「次>」ボタンをクリックします。






5 「new HTML ファイル」ダイアログで「ファイル名」を「9-geoext3」と入力して「終了」ボタンをクリックします。







保存フォルダを変更するときは、「フォルダ」右の「参照」ボタンをクリックして「フォルダを参照」で「geoext3proj-サイト・ルート」をクリックして選択し「フォルダを選択」ボタンをクリックします。









6 「grid.html」の内容をコピーして「9-geoext3.html」に貼り付け、修正します。

7 同じように、「新規ファイル」ボタンをクリックし、ステップ「1.ファイル・タイプを選択」の「カテゴリ」で「HTML5」、「ファイルタイプ」で「JavaScriptファイル」をクリックして選択し「次>」ボタンをクリック。「ファイル名」を「9-geoext3」と入力して「終了」ボタンをクリック。「grid.js」の内容をコピーして貼り付け、修正します。



「index.html」
<html>
 <head>
  <title>TODO supply a title</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 </head>
 <body>
  <div>TODO write content</div>
  <div><a href="./3-geoext3.html">3-geoext3.html</a></div>
  <div><a href="./4-geoext3.html">4-geoext3.html</a></div>
  <div><a href="./5-geoext3.html">5-geoext3.html</a></div>
  <div><a href="./6-geoext3.html">6-geoext3.html</a></div>
  <div><a href="./7-geoext3.html">7-geoext3.html</a></div>
  <div><a href="./8-geoext3.html">8-geoext3.html</a></div>
  <div><a href="./9-geoext3.html">9-geoext3.html</a></div>
 </body>
</html>


「9-geoext3.html」
<!DOCTYPE HTML>
<html>
 <head>
  <meta charset=utf-8" />
  <title>Feature Grid Example</title>
  <link rel="stylesheet" type="text/css" href="http://openlayers.org/en/master/css/ol.css" />
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css" />
 </head>
 <body>
  <div id='description'>
   <p>This example shows how to display features in grids. 
    <br><br>
    The grid on the left side is created by passing an 
    OpenLayers collection (ol.Collection) with feature 
    objects (ol.Feature)<br>
    The grid on the right side is created from an existing  
    vector layer and also highlights the selected feature  
    in the grid on the map. </p>
   <p>Have a look at 
    <!-- <a href="grid.js">grid.js</a> --> 
    <a href="9-geoext3.js">9-geoext3.js</a> 
    to see how this is done.</p>
  </div>
  <script src="http://openlayers.org/en/master/build/ol.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"></script>
  <script>
   Ext.Loader.setConfig({
   /** ExtLoader
    * This class provides dynamic loading support for 
    * JavaScript classes. Application code does not 
    * typically need to call Ext.Loader except perhaps 
    * to configure path mappings when not using Sencha 
    * Cmd.
    * このクラスは、JavaScript クラスの動的ローディン
    * グサポートを提供します。アプリケーションコードは、
    * Sencha Cmd を使用しないでパスマッピングを設定する
    * 大方の場合以外 通常、Ext.Loader を呼び出す必要は
    * ありません。
    * (GeoExt doc[w/ext])
    */
   /** setConfig(config) 
    * Set the configuration for the loader. This should 
    * be called right after ext-(debug).js is included 
    * in the page, and before Ext.onReady. i.e:
    * ローダの設定を設定します。これは、ext-(debug).js 
    * がページに読み込まれる後と Ext.onReady の前に正し
    * く呼び出さなければなりません。
    * (GeoExt doc[w/ext])
    */
    enabled: true,
    /** nabled : Boolean
     * Whether or not to enable the dynamic dependency 
     * loading feature. Defaults to: true.
     * 動的依存関係のロード機能の有効または無効。
     * デフォルト: true
     * (GeoExt doc[w/ext])
     */
    paths: {
    /** paths : Object
     * The mapping from namespaces to file paths.
     * Note that all relative paths are relative to the 
     * current HTML document. If not being specified, 
     * for example, Other.awesome.Class will simply be 
     * loaded from "./Other/awesome/Class.js".
     * 名前空間からファイルパスへのマッピング。すべて
     * の相対パスは、現在のHTMLドキュメントに対して相
     * 対的であることに注意してください。指定されてい
     * ない場合には、例えば、Other.awesome.Class は単
     * に「./Other/awesome/Class.js」からロードされま
     * す。
     * (GeoExt doc[w/ext])
     */
     // 'GeoExt': '../../src/'
     'GeoExt': './js/libs/geoext3-master/src/'
    }
   });
  </script>
  <!-- <script src="gridp.js"></script> -->
  <script src="9-geoext3.js"></script>
 </body>
</html>

GeoExt3-dev 8 - Popup Example 2

8-2 JavaScript ファイルの作成
「gx-popup.js(8-geoext3.js)」は、マップを表示するための JavaScript ファイルです。

「8-geoext3.js」
Ext.require([
/** require( expressions, [fn], [scope] )
 * Loads all classes by the given names and all their 
 * direct dependencies; optionally executes the given 
 * callback function when finishes, within the optional 
 * scope.
 * 指定された名前とそのすべての直接依存によって、すべて
 * のクラスをロードします。任意の範囲内で、終了するとき
 * に任意で与えられたコールバック関数を実行します。
 * (GeoExt doc[w/ext])
 */
 'GeoExt.component.Map',
 /** GeoExt.component.Map
  * The map component and a panel side by side
  * map component(マップコンポーネント)とパネルの位置関
  * 係(並び)。
  * (GeoExt doc[w/ext])
  */
]);
var olMap,
 mapComp,
 popup;
Ext.application({
/** Ext.app.Application
 * Represents an Ext JS application, which is typically 
 * a single page app using a Viewport.
 * An application consists of one or more Views. The 
 * behavior of a View is managed by its corresponding 
 * ViewController and ViewModel.
 * Global activities are coordinated by Controllers 
 * which are ultimately instantiated by an instance 
 * of this (or a derived) class.
 * 通常、ビューポートを使用して1つのページの app である 
 * ExtJS アプリケーションを表します。
 * アプリケーションは、1つまたは複数の View で構成されて
 * います。View の動作は、その対応する ViewController 
 * と ViewModel によって管理されます。
 * グローバルな動作は、このインスタンス(または派生)
 * クラスで最終的にインスタンス化されている Controller 
 * によって調整されます。(GeoExt doc[w/ext])
 */
 name: 'Popup',
 /** name : String
  * The name of your application. This will also be the 
  * namespace for your views, controllers models and 
  * stores. Don't use spaces or special characters in 
  * the name. Application name is mandatory.
  * アプリケーションの名前。これはまた、views、controllers 
  * models と stores の名前空間になります。name には
  * スペースや特殊文字を使用しないでください。アプリケー
  * ション名は必須です。初期値は、''。
  * (GeoExt doc[w/ext])
  */
 launch: function() {
 /** launch( profile ) : Booleantemplate
  * Called automatically when the page has completely 
  * loaded. This is an empty function that should be 
  * overridden by each application that needs to take 
  * action on page load.
  * ページが完全にロードされたときに自動的に呼び出されます。
  * これは、ページのロード時にアクションを実行する必要があ
  * る各アプリケーションによって上書きされなければならない
  * 空の関数です。(GeoExt doc[w/ext])
  */
  var description;
  olMap = new ol.Map({
   layers: [
    new ol.layer.Tile({
    /** ol.layer.Tile 
     * For layer sources that provide pre-rendered, tiled 
     * images in grids that are organized by zoom levels 
     * for specific resolutions. 
     * プリレンダリング(事前描画)を提供するレイヤソースの
     * ための、特定の解像度でのズームレベルによって編成され
     * ているグリッドのタイルイメージ。(ol3 API)
     */
     source: new ol.source.Stamen({
     /** ol.source.Stamen
      * Layer source for the Stamen tile server.
      * Stamen タイルサーバのレイヤソース。(ol3 API)
      * (2 - ol3ex 24b - Stamen example 1 参照)
      */
      layer: 'watercolor'
     })
    }),
    new ol.layer.Tile({
     source: new ol.source.Stamen({
      layer: 'terrain-labels'
     })
    })
   ],
   view: new ol.View({
    center: ol.proj.fromLonLat( [-122.416667, 37.783333] ),
    /** ol.proj.fromLonLat(coordinate, opt_projection)
     * Transforms a coordinate from longitude/latitude to a 
     * different projection.
     * 緯度/経度座標から異なる投影に変換します。(ol3 API)
     */
    zoom: 12
   })
  });
  popup = Ext.create('GeoExt.component.Popup', {
  /** create( [name], [args] ) : Object
   * Instantiate a class by either full name, alias or 
   * alternate name.
   * If Ext.Loader is enabled and the class has not been 
   * defined yet, it will attempt to load the class via 
   * synchronous loading.
   * 完全な名前、別名または代替名のいずれかによってクラスを
   * インスタンス化します。
   * Ext.Loader が有効になっており、クラスがまだ定義されて
   * いない場合は、同期ロードを経由してクラスをロードしよう
   * とします。(GeoExt doc[w/ext)
   */
  /** GeoExt.component.Popup
   * An GeoExt.component.Popup can be used to displays a 
   * popup over the map.
   * GeoExt.component.Popup はマップ(map)上にポップアップ
   * を表示するために使用されます。
   * (GeoExt doc[w/ext])
   */
   map: olMap,
   width: 140
   /** width : Number|String
    * The width of this component. A numeric value will be 
    * interpreted as the number of pixels; a string value 
    * will be treated as a CSS value with units.
    * このコンポーネントの幅。数値は、ピクセル数として解釈され
    * ます。文字列値は単位でCSS値として扱われます。
    * (GeoExt doc[w/ext])
    */
  });
  mapComp = Ext.create('GeoExt.component.Map', {
   title: 'GeoExt.component.Map Example',
   /** title : String
    * The title text to be used to display in the Panel 
    * Header. Or a config object for a Panel Title.
    * Panel Header に表示するために使用される title テキ
    * スト。または Panel Title のための config オブジェ
    * クト。(GeoExt doc[w/ext)
    */
   map: olMap,
   region: 'center',
   /** region : "north"/"south"/"east"/"west"/"center"
    * Defines the region inside border layout.
    * ボーダレイアウト内の領域を遅疑します。
    * (GeoExt doc[w/ext])
    */
   pointerRest: true,
   /** pointerRest : Boolean
    * A boolean flag to control whether the map component 
    * will fire the events pointerrest and pointerrestout. 
    * If this is set to false (the default), no such events 
    * will be fired.Whether the component shall provide the 
    * pointerrest and pointerrestout events.
    * Defaults to: false
    * マップコンポーネントが pointerrest と pointerrestout 
    * イベントを発生するかどうかを制御するための boolean フラ
    * グ。これが false に設定されている(デフォルト)場合は、
    * コンポーネントが pointerrest と pointerrestoutイベント
    * を提供しなければならないかどうかというようなイベントは発
    * 生されません。
    * デフォルト:false
    * (GeoExt doc[w/ext])
    */
   pointerRestInterval: 750,
   /** pointerRestInterval : Number
    * The amount of milliseconds after which we will 
    * consider a rested pointer as pointerrest. Only 
    * relevant if pointerRest is true.The interval in 
    * milliseconds.
    * Defaults to: 1000
    * pointerrest として停止ポインタを考慮した後のミリ秒単位の
    * 量。pointerRest が true の場合のみ関連性があります。ミリ
    * 秒単位の間隔。
    * デフォルト: 1000
    * (GeoExt doc[w/ext])
    */
   pointerRestPixelTolerance: 5
   /** pointerRestPixelTolerance : Number
    * The amount of pixels that a pointer may move in both 
    * vertical and horizontal direction, and still be 
    * considered to be a pointerrest. Only relevant if 
    * pointerRest is true.The tolerance in pixels.
    * Defaults to: 3
    * ポインタはまだ両方の垂直および水平方向に移動でき、そして 
    * pointerrest であると考られるピクセルの量。pointerRest 
    * が true の場合のみ関連性がある。ピクセル単位の許容範囲。
    * デフォルト:3
    * (GeoExt doc[w/ext])
    */
  });
  // Add a pointerrest handler to the map component to 
  // render the popup.
  // ポップアップをレンダリングするためにマップコンポーネント
  // にpointerrestハンドラを追加します。
  mapComp.on('pointerrest', function(evt) {
  /** on( eventName, [fn], [scope], [options], [order] ) : 
   * Object
   * The on method is shorthand for addListener.
   * on メソッドは addListener の短縮形。
   * (GeoExt doc[w/ext])
   */
   var coordinate = evt.coordinate,
   /** coordinate{ol.Coordinate}
    * The coordinate of the original browser event.
    * オリジナルブラウザイベントの coordinate。(ol3 API)
    */
   hdms = ol.coordinate.toStringHDMS(ol.proj.transform(
    coordinate, 'EPSG:3857', 'EPSG:4326'));
   /** ol.coordinate.toStringHDMS(coordinate)
    * Format a geographic coordinate with the hemisphere, 
    * degrees, minutes, and seconds.
    * 半球、度、分、秒で地理座標をフォーマットします。
    * (ol3 API)
    */
   /** ol.proj.transform(coordinate, source, destination)
    * Transforms a coordinate from source projection to 
    * destination projection. This returns a new coordinate 
    * (and does not modify the original).
    * ソース投影から変換先投影に座標変換します。これは、新しい座
    * 標を返します(オリジナルを変更しません)。(ol3 API)
    */
   // Insert a linebreak after either N or S in hdms
   // hdms の N または S いずれかの後に改行を挿入します。
   hdms = hdms.replace(/([NS])/, '$1<br>');
   /** String.prototype.replace()
    * replace() メソッドは、pattern にマッチした文字列の一部ま
    * たは全てを replacement で置き換えた新しい文字列を返しま
    * す。pattern は文字列または RegExp、replacement は文字列
    * または各マッチで呼び出される関数です。
    * str.replace(pattern, replacement[, flags])
    * (MDN[https://developer.mozilla.org/ja/docs/Web/
    * JavaScript/Reference/Global_Objects/String/replace])
    */
   // set content and position popup
   // コンテンツを設定しポップアップを配置します。
   popup.setHtml('<p><strong>Pointer rested on</strong>' +
    '<br /><code>' + hdms + '</code></p>');
   /** setHtml( html )private
    * Parameters - html : Object(GeoExt doc[w/ext])
    */
   popup.position(coordinate);
   /** position(coordinate)
    * (Re-)Positions the popup to the given coordinates.
    * 指定された座標にポップアップを配置します。
    * (GeoExt doc[w/ext])
    */
   popup.show();
   /** show( this, eOpts )
    * Fires after the component is shown when calling the 
    * show method.
    * show メソッドを呼び出すときにコンポーネントが表示された
    * 後発生します。
    * (GeoExt doc[w/ext])
    */
  });
  // hide the popup once it isn't on the map any longer
  //それがマップ(map)上にすでにないときポップアップを隠します。
  mapComp.on('pointerrestout', popup.hide, popup);
  description = Ext.create('Ext.panel.Panel', {
  /** Ext.panel.Panel
   * Panel is a container that has specific functionality 
   * and structural components that make it the perfect 
   * building block for application-oriented user interfaces.
   * Panels are, by virtue of their inheritance from 
   * Ext.container.Container, capable of being configured 
   * with a layout, and containing child Components.
   * パネルは、特定の機能とそれアプリケーション指向のユーザ
   * インターフェイスに最適なビルディングブロックにする構造
   * 的要素を持っているコンテナです。パネルは、
   * Ext.container.Container からの継承のおかげで、layout 
   * で構成し、子コンポーネントを含むことができます。
   * (GeoExt doc[w/ext])
   */
   contentEl: 'description',
   /** contentEl : String
    * Specify an existing HTML element, or the id of an 
    * existing HTML element to use as the content for this 
    * component.
    * This config option is used to take an existing HTML 
    * element and place it in the layout element of a new 
    * component (it simply moves the specified DOM element 
    * after the Component is rendered to use as the content.
    * 既存のHTMLエレメントを指定するか、既存のHTMLエレメン
    * トの id は、このコンポーネントのコンテンツとして使用
    * します。
    * Component(コンポーネント)が 、content(コンテンツ)
    * として使用するためにレンダリングされた後に、この設定オ
    * プションは、既存のHTMLエレメントを取得し、新しい 
    * component(コンポーネント)の layout(レイアウト)エレ
    * メントでそれを配置するために使用されます(それは単に指定
    * された DOM エレメントを移動させます)。
    * (GeoExt doc[w/ext)
    */
   title: 'Description',
   region: 'east',
   width: 300,
   border: false,
   /** border : Boolean
    * Specify as false to render the Panel with zero width 
    * borders.
    * Leaving the value as true uses the selected theme's 
    * $panel-border-width.
    * Defaults to false when using or extending Neptune.
    * Defaults to: true.
    * ゼロ幅の border(境界線)でパネルを描画するため false 
    * を指定します。
    * true として値を残すためには、選択されたテーマ 
    * $panel-border-width を使用します。
    * ネプチューン(Neptune Theme)を使用するか拡張すると
    * き、デフォルトは false です。
    * デフォルトは:true。
    * (GeoExt doc[w/ext)
    */
   bodyPadding: 5
   /** bodyPadding : Number/String
    * A shortcut for setting a padding style on the body 
    * element. The value can either be a number to be 
    * applied to all sides, or a normal css string 
    * describing padding.
    * bodyエレメントにパディングスタイルを設定するための
    * ショートカット。値は、すべての側面に適用される数字、
    * または通常のCSSの文字列記述パディングのいずれかにで
    * きます。
    * (GeoExt doc[w/ext)
    */
  });
  Ext.create('Ext.Viewport', {
  /** Ext.Viewport (Ext.container.Viewport)
   * A specialized container representing the viewable 
   * application area (the browser viewport).
   * The Viewport renders itself to the document body, 
   * and automatically sizes itself to the size of the 
   * browser viewport and manages window resizing. There 
   * may only be one Viewport created in a page.
   * 表示可能なアプリケーション領域(ブラウザのビューポート)
   * を表す特殊なコンテナ。
   * Viewport は、document body にそれ自身をレンダリングし、
   * 自動的に自身のサイズをブラウザのビューポートのサイズにし、
   * ウィンドウのサイズ変更を管理します。1ページに作成した
   * ビューポートは一つだけ設定できます。
   * (GeoExt doc[w/ext])
   */
   layout: "border",
   /** layout : Ext.enums.Layout/Object
    * Important: In order for child items to be correctly 
    * sized and positioned, typically a layout manager must 
    * be specified through the layout configuration option.
    * The sizing and positioning of child items is the 
    * responsibility of the Container's layout manager 
    * which creates and manages the type of layout you have 
    * in mind. 
    * 重要:子アイテムが正しいサイズと配置されるためには、
    * 一般的にレイアウトマネージャは、layout configuration 
    * option(レイアウト設定オプション)を使用して指定する
    * 必要があります。
    * 子アイテムのサイズと位置は、レイアウトの種類を管理す
    * るContainer's layout manager(コンテナレイアウトマ
    * ネージャ)の役割です。
    * (GeoExt doc[w/ext)
    */
   items: [
   /** items : Object/Object[]
    * A single item, or an array of child Components to be 
    * added to this container
    * Unless configured with a layout, a Container simply 
    * renders child Components serially into its 
    * encapsulating element and performs no sizing or 
    * positioning upon them.
    * 単一の item(アイテム)、または子 Compornents(コン
    * ポーネント)の配列は、このコンテナに追加します。
    * layout(レイアウト)で構成されていない限り、Container
    * (コンテナ)は単に、子 Compornents(コンポーネント)
    * をそのカプセル化要素に直列にレンダリングし、それらに
    * サイズや位置調整も実行しません。
    * (GeoExt doc[w/ext)
    */
    mapComp,
    description
   ]
  });
 }
});

GeoExt3-dev 8 - Popup Example 1

GeoExt3(https://geoext.github.io/geoext3/)の例(Examoles)をみていきます。

8 - Popup Example
「Popup(gx-popup.html)」(「Examples」の「Popup」)を参考に地図を表示してみます。
説明に次のようにあります。

This example shows a simple popup showing the position that was hovered.

To achieve this effect, the GeoExt.component.Map is instantiated with pointerRest: true, so that the events pointerrest and pointerout become available. Whenever pointerrest is fired, an instance of GeoExt.panel.Popup is positioned and its HTML updated.

この例では、ホバーした位置を示す簡単なポップアップが表示されます。

この効果を達成するために、GeoExt.component.Map は pointerRest:true でインスタンス化され、それによって イベント pointerrest と pointerout は利用可能になります。pointerrest が起動されるたびに、 GeoExt.panel.Popup のインスタンスが配置され、そのHTMLが更新されます。
8-1 HTML ファイルの作成
1 NetBeans を起動します。









2 「プロジェクト」ペインでツリーを geoext3proj -> サイト・ルート -> js -> libs -> geoext3-master -> examples -> popup とクリックして展開し gx-popup.html をダブルクリックして開きます。gx-popup.js もダブルクリックして開きます。



3 「新規ファイル」ボタンをクリックします。

4 ステップ「1.ファイル・タイプを選択」の「カテゴリ」で「HTML5」、「ファイルタイプ」で「HTMLファイル」を選択して「次>」ボタンをクリックします。






5 「new HTML ファイル」ダイアログで「ファイル名」を「8-geoext3」と入力して「終了」ボタンをクリックします。







保存フォルダを変更するときは、「フォルダ」右の「参照」ボタンをクリックして「フォルダを参照」で「geoext3proj-サイト・ルート」をクリックして選択し「フォルダを選択」ボタンをクリックします。









6 「gx-popup.html」の内容をコピーして「8-geoext3.html」に貼り付け、修正します。

7 同じように、「新規ファイル」ボタンをクリックし、ステップ「1.ファイル・タイプを選択」の「カテゴリ」で「HTML5」、「ファイルタイプ」で「JavaScriptファイル」をクリックして選択し「次>」ボタンをクリック。「ファイル名」を「8-geoext3」と入力して「終了」ボタンをクリック。「gx-popup.js」の内容をコピーして貼り付け、修正します。



「index.html」
<html>
 <head>
  <title>TODO supply a title</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 </head>
 <body>
  <div>TODO write content</div>
  <div><a href="./3-geoext3.html">3-geoext3.html</a></div>
  <div><a href="./4-geoext3.html">4-geoext3.html</a></div>
  <div><a href="./5-geoext3.html">5-geoext3.html</a></div>
  <div><a href="./6-geoext3.html">6-geoext3.html</a></div>
  <div><a href="./7-geoext3.html">7-geoext3.html</a></div>
  <div><a href="./8-geoext3.html">8-geoext3.html</a></div>
 </body>
</html>


「8-geoext3.html」
<!DOCTYPE HTML>
<html>
 <head>
  <meta charset=utf-8" />
  <title>Popup Example</title>
  <link rel="stylesheet" type="text/css" href="http://openlayers.org/en/master/css/ol.css" />
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css" />
  <!-- <link rel="stylesheet" type="text/css" href="../../resources/css/gx-popup.css" /> -->
  <link rel="stylesheet" type="text/css" href="./js/libs/geoext3-master/resources/css/gx-popup.css" />
  <style>
   .gx-popup p {
    padding: 5px 5px 0 5px;
    border-radius: 7px;
    background-color: rgba(255,255,255,0.85);
    border: 3px solid white;
    margin: 0;
    text-align: center;
   }
  </style>
 </head>
 <body>
  <div id='description'>
   <p>This example shows a simple popup showing the position 
    that was hovered.</p>
   <p>To achieve this effect, the 
    <code>GeoExt.component.Map</code> is instantiated with 
    <code>pointerRest: true</code>, so that the events 
    <code>pointerrest</code> and <code>pointerout</code> 
    become available. Whenever <code>pointerrest</code> 
    is fired, an instance of <code>GeoExt.panel.Popup</code> 
    is positioned and its HTML updated.</p>
   <p>Have a look at 
    <!-- <a href="gx-popup.js">gx-popup.js</a> --> 
    <a href="8-geoext3.js">8-geoext3.js</a> 
    to see how this is done.</p>
  </div>
  <script src="http://openlayers.org/en/master/build/ol.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"></script>
  <script>
   Ext.Loader.setConfig({
   /** ExtLoader
    * This class provides dynamic loading support for 
    * JavaScript classes. Application code does not 
    * typically need to call Ext.Loader except perhaps 
    * to configure path mappings when not using Sencha 
    * Cmd.
    * このクラスは、JavaScript クラスの動的ローディン
    * グサポートを提供します。アプリケーションコードは、
    * Sencha Cmd を使用しないでパスマッピングを設定する
    * 大方の場合以外 通常、Ext.Loader を呼び出す必要は
    * ありません。
    * (GeoExt doc[w/ext])
    */
   /** setConfig(config) 
    * Set the configuration for the loader. This should 
    * be called right after ext-(debug).js is included 
    * in the page, and before Ext.onReady. i.e:
    * ローダの設定を設定します。これは、ext-(debug).js 
    * がページに読み込まれる後と Ext.onReady の前に正し
    * く呼び出さなければなりません。
    * (GeoExt doc[w/ext])
    */
    enabled: true,
    /** nabled : Boolean
     * Whether or not to enable the dynamic dependency 
     * loading feature. Defaults to: true.
     * 動的依存関係のロード機能の有効または無効。
     * デフォルト: true
     * (GeoExt doc[w/ext])
     */
    paths: {
    /** paths : Object
     * The mapping from namespaces to file paths.
     * Note that all relative paths are relative to the 
     * current HTML document. If not being specified, 
     * for example, Other.awesome.Class will simply be 
     * loaded from "./Other/awesome/Class.js".
     * 名前空間からファイルパスへのマッピング。すべて
     * の相対パスは、現在のHTMLドキュメントに対して相
     * 対的であることに注意してください。指定されてい
     * ない場合には、例えば、Other.awesome.Class は単
     * に「./Other/awesome/Class.js」からロードされま
     * す。
     * (GeoExt doc[w/ext])
     */
     // 'GeoExt': '../../src/'
     'GeoExt': './js/libs/geoext3-master/src/'
    }
   });
  </script>
  <!-- <script src="gx-popup.js"></script> -->
  <script src="8-geoext3.js"></script>
 </body>
</html>

GeoExt3-dev 7 - GeoExt.data.MapfishPrintProvider Example 1

GeoExt3(https://geoext.github.io/geoext3/)の例(Examoles)をみていきます。

7 - GeoExt.data.MapfishPrintProvider Example
「GeoExt.data.MapfishPrintProvider Example (basic-mapfish.html)」(「Examples」の「Mapfish Print」)を参考に地図を表示してみます。
説明に次のようにあります。

This example shows how to use the GeoExt.data.MapfishPrintProvider class to talk to a Mapfish Print Server (v3.x).

Afterwards we have all information to create a valid POST to the servlet. The printed extent is highlighte as vector layer. If you move around or change the zoom, the extent will adjust accordingly.
Click the button labelled 'Print' to actually create a PDF for the displayed extent.

この例では、Mapfishプリントサーバー(バージョン3.x)と通信するためにGeoExt.data.MapfishPrintProviderクラスを使用する方法を示しています。

以降、我々は、サーブレットへの有効なPOSTを作成するためのすべての情報を持っています。印刷範囲は、ベクトルレイヤとして強調表示されます。あなたの周りに移動したり、ズームを変更すると、範囲はそれに応じて調整されます。
実際に表示された範囲のPDFを作成するには「Print」と書かれたボタンをクリックします。

7-1 HTML ファイルの作成
1 NetBeans を起動します。









2 「プロジェクト」ペインでツリーを geoext3proj -> サイト・ルート -> js -> libs -> geoext3-master -> examples -> print とクリックして展開し basic-mapfish.html をダブルクリックして開きます。basic-mapfish.js もダブルクリックして開きます。



3 「新規ファイル」ボタンをクリックします。

4 ステップ「1.ファイル・タイプを選択」の「カテゴリ」で「HTML5」、「ファイルタイプ」で「HTMLファイル」を選択して「次>」ボタンをクリックします。






5 「new HTML ファイル」ダイアログで「ファイル名」を「7-geoext3」と入力して「終了」ボタンをクリックします。







保存フォルダを変更するときは、「フォルダ」右の「参照」ボタンをクリックして「フォルダを参照」で「geoext3proj-サイト・ルート」をクリックして選択し「フォルダを選択」ボタンをクリックします。









6 「basic-mapfish.html」の内容をコピーして「7-geoext3.html」に貼り付け、修正します。

7 同じように、「新規ファイル」ボタンをクリックし、ステップ「1.ファイル・タイプを選択」の「カテゴリ」で「HTML5」、「ファイルタイプ」で「JavaScriptファイル」をクリックして選択し「次>」ボタンをクリック。「ファイル名」を「7-geoext3」と入力して「終了」ボタンをクリック。「basic-mapfish.js」の内容をコピーして貼り付け、修正します。



「index.html」
<html>
 <head>
  <title>TODO supply a title</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 </head>
 <body>
  <div>TODO write content</div>
  <div><a href="./3-geoext3.html">3-geoext3.html</a></div>
  <div><a href="./4-geoext3.html">4-geoext3.html</a></div>
  <div><a href="./5-geoext3.html">5-geoext3.html</a></div>
  <div><a href="./6-geoext3.html">6-geoext3.html</a></div>
  <div><a href="./7-geoext3.html">7-geoext3.html</a></div>
 </body>
</html>


「7-geoext3.html」
<!DOCTYPE HTML>
<html>
 <head>
  <meta charset=utf-8" />
  <title>GeoExt.data.MapfishPrintProvider Example</title>
  <link rel="stylesheet" type="text/css" href="http://openlayers.org/en/master/css/ol.css" />
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css" />
 </head>
 <body>
  <div id='description'>
   <p>This example shows how to use the 
    <code>GeoExt.data.MapfishPrintProvider</code> class to 
    talk to a Mapfish Print Server (v3.x).</p>
   <p>Afterwards we have all information to create a valid 
    POST to the servlet. The printed extent is highlighte as 
    vector layer. If you move around or change the zoom, the 
    extent will adjust accordingly.</p>
   <p>Click the button labelled 'Print' to actually create a 
    PDF for the displayed extent.</p>
   <p>Have a look at 
    <!-- <a href="basic-mapfish.js">basic-mapfish.js</a> --> 
    <a href="7-geoext3.js">7-geoext3.js</a> 
    to see how this is done.</p>
</div>
  <script src="http://openlayers.org/en/master/build/ol.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"></script>
  <script>
   Ext.Loader.setConfig({
   /** ExtLoader
    * This class provides dynamic loading support for 
    * JavaScript classes. Application code does not 
    * typically need to call Ext.Loader except perhaps 
    * to configure path mappings when not using Sencha 
    * Cmd.
    * このクラスは、JavaScript クラスの動的ローディン
    * グサポートを提供します。アプリケーションコードは、
    * Sencha Cmd を使用しないでパスマッピングを設定する
    * 大方の場合以外 通常、Ext.Loader を呼び出す必要は
    * ありません。
    * (GeoExt doc[w/ext])
    */
   /** setConfig(config) 
    * Set the configuration for the loader. This should 
    * be called right after ext-(debug).js is included 
    * in the page, and before Ext.onReady. i.e:
    * ローダの設定を設定します。これは、ext-(debug).js 
    * がページに読み込まれる後と Ext.onReady の前に正し
    * く呼び出さなければなりません。
    * (GeoExt doc[w/ext])
    */
    enabled: true,
    /** nabled : Boolean
     * Whether or not to enable the dynamic dependency 
     * loading feature. Defaults to: true.
     * 動的依存関係のロード機能の有効または無効。
     * デフォルト: true
     * (GeoExt doc[w/ext])
     */
    paths: {
    /** paths : Object
     * The mapping from namespaces to file paths.
     * Note that all relative paths are relative to the 
     * current HTML document. If not being specified, 
     * for example, Other.awesome.Class will simply be 
     * loaded from "./Other/awesome/Class.js".
     * 名前空間からファイルパスへのマッピング。すべて
     * の相対パスは、現在のHTMLドキュメントに対して相
     * 対的であることに注意してください。指定されてい
     * ない場合には、例えば、Other.awesome.Class は単
     * に「./Other/awesome/Class.js」からロードされま
     * す。
     * (GeoExt doc[w/ext])
     */
     // 'GeoExt': '../../src/'
     'GeoExt': './js/libs/geoext3-master/src/'
    }
   });
  </script>
  <!-- <script src="basic-mapfish.js"></script> -->
  <script src="7-geoext3.js"></script>
 </body>
</html>

GeoExt3-dev 6 - Ext.tree.Panel plus layer legends Example 2

6-2 JavaScript ファイルの作成
「tree-legend-simple.js(6-geoext3.js)」は、マップを表示するための JavaScript ファイルです。

「6-geoext3.js」
Ext.require([
/** require( expressions, [fn], [scope] )
 * Loads all classes by the given names and all their 
 * direct dependencies; optionally executes the given 
 * callback function when finishes, within the optional 
 * scope.
 * 指定された名前とそのすべての直接依存によって、すべて
 * のクラスをロードします。任意の範囲内で、終了するとき
 * に任意で与えられたコールバック関数を実行します。
 * (GeoExt doc[w/ext])
 */
 'GeoExt.component.Map',
 /** GeoExt.component.Map
  * The map component and a panel side by side
  * map component(マップコンポーネント)とパネルの位置関
  * 係(並び)。
  * (GeoExt doc[w/ext])
  */
 'GeoExt.data.store.LayersTree'
 /** GeoExt.data.store.LayersTree
  * A store that is synchronized with a 
  * GeoExt.data.store.Layers. It can be used by an 
  * Ext.tree.Panel.
  * GeoExt.data.store.Layers と同期される store。これは 
  * Ext.tree.Panel によって使用することができます。
  * (GeoExt doc[w/ext])
  */
]);
/**
 * A plugin for Ext.grid.column.Column s that overwrites the 
 * internal cellTpl to support legends.
 * 凡例をサポートするための内部 cellTpl を上書きする 
 * Ext.grid.column.Column s のプラグイン。
 */
/** Ext.grid.column.Column
 * This class specifies the definition for a column inside a 
 * Ext.grid.Panel. It encompasses both the grid header 
 * configuration as well as displaying data within the grid 
 * itself. If the columns configuration is specified, this 
 * column will become a column group and can contain other 
 * columns inside. In general, this class will not be 
 * created directly, rather an array of column 
 * configurations will be passed to the grid:
 * このクラスは、Ext.grid.Panel内部のカラムの定義を指定します。
 * これは、グリッド自体の中に、表示データと同様にグリッドヘッダ
 * の構成の両方を含みます。カラムの設定が指定されている場合は、
 * このカラムはカラムグループになり、内部に他のカラムを含めるこ
 * とができます。一般的に、カラム構成の配列がグリッドに渡される
 * よりもこのクラスは直接作成されません。
 * (GeoExt doc[w/ext])
 */
Ext.define('BasicTreeColumnLegends', {
/** define( className, data, [createdFn] ) : Ext.Base
 * Defines a class or override. 
 * クラスを定義、または、上書きします。
 * (GeoExt doc[w/ext])
 */
 extend: 'Ext.AbstractPlugin',
 /** extend : String
  * The parent class that this class extends. 
  * このクラスが拡張する親クラス。
  * (GeoExt doc[w/ext])
  **/
 /** Ext.AbstractPlugin
  * The AbstractPlugin class is the base class from which 
  * user-implemented plugins should inherit.
  * AbstractPluginクラスは、ユーザー実装のプラグインが継承する
  * 基本クラスです。
  * (GeoExt doc[w/ext])
  */
 alias: 'plugin.basic_tree_column_legend',
 /** alias : String/String[]
  * List of short aliases for class names. An alias consists 
  * of a namespace and a name concatenated by a period as 
  * <namespace>.<name>.
  * クラス名の短いエイリアスのリスト。エイリアスは、<namespace> 
  * <name> としてピリオドによって連結された名前空間(namespace)
  * と名前(name)で構成されます。
  * (GeoExt doc[w/ext])
  */
 /**
  * @private
  */
 originalCellTpl: Ext.clone(Ext.tree.Column.prototype.cellTpl).join(''),
 /** clone( item ) : Object
  * Clone simple variables including array, {}-like objects, 
  * DOM nodes and Date without keeping the old reference. A 
  * reference for the object itself is returned if it's not 
  * a direct descendant of Object. For model cloning, see 
  * Model.copy.
  * 古い参照を保持することなく、オブジェクトの様な {} 配列、DOM 
  * ノードと Date を含む単純変数をクローンします。オブジェクト
  * の直接の子孫ではない場合、オブジェクト自体の参照が返されま
  * す。モデルクローニングについては、Model.copy を参照してく
  * ださい。
  * (GeoExt doc[w/ext])
  */
 /** Ext.tree.Column
  * Provides indentation and folder structure markup for a 
  * Tree taking into account depth and position within the 
  * tree hierarchy.
  * ツリー階層内のアカウントの深さと位置を考慮して Tree のため
  * のインデントとフォルダ構造のマークアップを提供します。
  * (GeoExt doc[w/ext])
  */
 /** cellTpl : Arrayprivate
  * (GeoExt doc[w/ext] を参照してください。)
  */
 /** Array.prototype.join()
  * join() メソッドは、配列のすべての要素を繋いで文字列にします。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/
  * JavaScript/Reference/Global_Objects/Array/join])
  */
 /**
  * The Xtemplate strings that will be used instead of the 
  * plain {value} when rendering.
  * レンダリング時に plain {value} の代わりに使用される 
  * XTemplate 文字列。
  */
 valueReplacementTpl: [
  '{value}',
  '<tpl if="this.hasLegend(values.record)"><br />',
  '<tpl for="lines">',
  '<img src="{parent.blankUrl}"',
  ' class="{parent.childCls} {parent.elbowCls}-img ',
  '{parent.elbowCls}-<tpl if=".">line<tpl else>empty</tpl>"',
  ' role="presentation"/>',
  '</tpl>',
  '<img src="{blankUrl}" class="{childCls} x-tree-elbow-img">',
  '<img src="{blankUrl}" class="{childCls} x-tree-elbow-img">',
  '<img src="{blankUrl}" class="{childCls} x-tree-elbow-img">',
  '{[this.getLegendHtml(values.record)]}',
  '</tpl>'
 ],
 /**
  * The context for methods available in the template
  * テンプレートで使用可能なメソッドのコンテキスト。
  */
 valueReplacementContext: {
  hasLegend: function(rec){
   var isChecked = rec.get('checked');
   var layer = rec.data;
   return isChecked && !(layer instanceof ol.layer.Group);
   /** instanceof
    * instanceof 演算子は、オブジェクトが自身のプロトタイプに
    * コンストラクタの prototype プロパティを持っているかを確
    * 認します。
    * (MDN[https://developer.mozilla.org/ja/docs/JavaScript/
    * Reference/Operators/instanceof])
    */
  },
  getLegendHtml: function(rec){
   var layer = rec.data;
   var legendUrl = layer.get('legendUrl');
   if (!legendUrl) {
    legendUrl = "http://geoext.github.io/geoext2/" +
     "website-resources/img/GeoExt-logo.png";
   }
   return '<img class="legend" src="' + legendUrl + '" height="32" />';
  }
 },
 init: function(column){
  var me = this;
  if(!(column instanceof Ext.grid.column.Column)) {
   Ext.log.warn("Plugin shall only be applied to instances of" +
    " Ext.grid.column.Column");
   /** Ext.log( [options], [message] )
    * Logs a message. If a console is present it will be 
    * used. On Opera, the method "opera.postError" is called. 
    * In other cases, the message is logged to an array 
    * "Ext.log.out". An attached debugger can watch this 
    * array and view the log. The log buffer is limited to a 
    * maximum of "Ext.log.max" entries (defaults to 250).
    * メッセージをログに記録します。コンソールが存在する場合、そ
    * れが使用されます。Opera では、メソッド「opera.postError」
    * と呼ばれています。他の例では、メッセージは配列
    * 「Ext.log.out」に記録されます。添付デバッガはこの配列をみ
    * て、ログを表示することができます。ログバッファは
    * 「Ext.log.max」のエントリ(デフォルトは 250)の最大値に制
    * 限されています。
    * (GeoExt doc[w/ext])
    */
   return;
  }
  var valuePlaceHolderRegExp = /\{value\}/g;
  var replacementTpl = me.valueReplacementTpl.join('');
  var newCellTpl = me.originalCellTpl.replace(
  /** String.prototype.replace()
   * replace() メソッドは、pattern にマッチした文字列の一部ま
   * たは全てを replacement で置き換えた新しい文字列を返します。
   * pattern は文字列または RegExp、replacement は文字列また
   * は各マッチで呼び出される関数です。
   * str.replace(pattern, replacement[, flags])
   * (MDN[https://developer.mozilla.org/ja/docs/Web/
   * JavaScript/Reference/Global_Objects/String/replace])
   */
   valuePlaceHolderRegExp, replacementTpl
  );
  column.cellTpl = [
   newCellTpl,
   me.valueReplacementContext
  ];
 }
});
var mapComponent, mapPanel,
 treePanel, treePanel2;
Ext.application({
/** Ext.app.Application
 * Represents an Ext JS application, which is typically 
 * a single page app using a Viewport.
 * An application consists of one or more Views. The 
 * behavior of a View is managed by its corresponding 
 * ViewController and ViewModel.
 * Global activities are coordinated by Controllers 
 * which are ultimately instantiated by an instance 
 * of this (or a derived) class.
 * 通常、ビューポートを使用して1つのページの app である 
 * ExtJS アプリケーションを表します。
 * アプリケーションは、1つまたは複数の View で構成されて
 * います。View の動作は、その対応する ViewController 
 * と ViewModel によって管理されます。
 * グローバルな動作は、このインスタンス(または派生)
 * クラスで最終的にインスタンス化されている Controller 
 * によって調整されます。(GeoExt doc[w/ext])
 */
 name: 'LegendTrees',
 /** name : String
  * The name of your application. This will also be the 
  * namespace for your views, controllers models and 
  * stores. Don't use spaces or special characters in 
  * the name. Application name is mandatory.
  * アプリケーションの名前。これはまた、views、controllers 
  * models と stores の名前空間になります。name には
  * スペースや特殊文字を使用しないでください。アプリケー
  * ション名は必須です。初期値は、''。
  * (GeoExt doc[w/ext])
  */
 launch: function(){
 /** launch( profile ) : Booleantemplate
  * Called automatically when the page has completely 
  * loaded. This is an empty function that should be 
  * overridden by each application that needs to take 
  * action on page load.
  * ページが完全にロードされたときに自動的に呼び出されます。
  * これは、ページのロード時にアクションを実行する必要があ
  * る各アプリケーションによって上書きされなければならない
  * 空の関数です。(GeoExt doc[w/ext])
  */
  var source1, source2, source3,
   layer1, layer2, layer3, layer4,
   group,
   olMap,
   treeStore, treeStore2;
  source1 = new ol.source.MapQuest({layer: 'sat'});
  /** ol.source.MapQuest
   * Layer source for the MapQuest tile server.
   * MapQuest タイルサーバのレイヤソース。(ol3 API
   * 2 - ol3ex 23b - MapQuest example 2 参照)
   */
  layer1 = new ol.layer.Tile({
  /** ol.layer.Tile 
   * For layer sources that provide pre-rendered, tiled 
   * images in grids that are organized by zoom levels 
   * for specific resolutions. 
   * プリレンダリング(事前描画)を提供するレイヤソースの
   * ための、特定の解像度でのズームレベルによって編成され
   * ているグリッドのタイルイメージ。(ol3 API)
   */
   legendUrl: 'https://otile4-s.mqcdn.com/tiles/1.0.0/sat/4/4/7.jpg',
   source: source1,
   name: 'MapQuest Satellite'
  });
  source2 = new ol.source.MapQuest({layer: 'osm'});
  layer2 = new ol.layer.Tile({
   legendUrl: 'https://otile4-s.mqcdn.com/tiles/1.0.0/osm/4/4/7.jpg',
   source: source2,
   name: 'MapQuest OSM'
  });
  source3 = new ol.source.MapQuest({layer: 'hyb'});
  layer3 = new ol.layer.Tile({
   legendUrl: 'https://otile4-s.mqcdn.com/tiles/1.0.0/hyb/4/4/7.jpg',
   source: source3,
   name: 'MapQuest Hybrid'
  });
  layer4 = new ol.layer.Vector({
  /** ol.layer.Vector
   * Vector data that is rendered client-side.
   * クライアント側で描画されたベクタデータ。(ol3 API)
   */
   source: new ol.source.Vector(),
   /** ol.source.Vector
    * Provides a source of features for vector layers.
    * ベクタレイヤのフィーチャのソースを用意します。(ol3 API)
    */
   name: 'Vector '
  });
  group = new ol.layer.Group({
  /** ol.layer.Group
   * A ol.Collection of layers that are handled together.
   * A generic change event is triggered when the 
   * group/Collection changes.
   * 同時に扱うレイヤの ol.Collection
   * 一般的な change イベントは、グループ/コレクションを変更
   * するときトリガされます。(ol3 API)
   */
   layers: [layer1, layer2]
  });
  olMap = new ol.Map({
   layers: [group, layer3, layer4],
   view: new ol.View({
    center: [0, 0],
    zoom: 2
   })
  });
  mapComponent = Ext.create('GeoExt.component.Map', {
  /** create( [name], [args] ) : Object
   * Instantiate a class by either full name, alias or 
   * alternate name.
   * If Ext.Loader is enabled and the class has not been 
   * defined yet, it will attempt to load the class via 
   * synchronous loading.
   * 完全な名前、別名または代替名のいずれかによってクラスを
   * インスタンス化します。
   * Ext.Loader が有効になっており、クラスがまだ定義されて
   * いない場合は、同期ロードを経由してクラスをロードしよう
   * とします。(GeoExt doc[w/ext)
   */
   map: olMap
  });
  mapPanel = Ext.create('Ext.panel.Panel', {
  /** Ext.panel.Panel
   * Panel is a container that has specific functionality 
   * and structural components that make it the perfect 
   * building block for application-oriented user interfaces.
   * Panels are, by virtue of their inheritance from 
   * Ext.container.Container, capable of being configured 
   * with a layout, and containing child Components.
   * パネルは、特定の機能とそれアプリケーション指向のユーザ
   * インターフェイスに最適なビルディングブロックにする構造
   * 的要素を持っているコンテナです。パネルは、
   * Ext.container.Container からの継承のおかげで、layout 
   * で構成し、子コンポーネントを含むことができます。
   * (GeoExt doc[w/ext])
   */
   region: 'center',
   /** region : "north"/"south"/"east"/"west"/"center"
    * Defines the region inside border layout.
    * ボーダレイアウトの内側の領域を定義します。
    * (GeoExt doc[w/ext)
    */
   layout: 'fit',
   /** layout : Ext.enums.Layout/Object
    * Important: In order for child items to be correctly 
    * sized and positioned, typically a layout manager must 
    * be specified through the layout configuration option.
    * The sizing and positioning of child items is the 
    * responsibility of the Container's layout manager 
    * which creates and manages the type of layout you have 
    * in mind. 
    * 重要:子アイテムが正しいサイズと配置されるためには、
    * 一般的にレイアウトマネージャは、layout configuration 
    * option(レイアウト設定オプション)を使用して指定する
    * 必要があります。
    * 子アイテムのサイズと位置は、レイアウトの種類を管理す
    * るContainer's layout manager(コンテナレイアウトマ
    * ネージャ)の役割です。
    * (GeoExt doc[w/ext)
    */
   border: false,
   /** border : Boolean
    * Specify as false to render the Panel with zero width 
    * borders.
    * Leaving the value as true uses the selected theme's 
    * $panel-border-width.
    * Defaults to false when using or extending Neptune.
    * Defaults to: true.
    * ゼロ幅の border(境界線)でパネルを描画するため false 
    * を指定します。
    * true として値を残すためには、選択されたテーマ 
    * $panel-border-width を使用します。
    * ネプチューン(Neptune Theme)を使用するか拡張すると
    * き、デフォルトは false です。
    * デフォルトは:true。
    * (GeoExt doc[w/ext)
    */
   items: [mapComponent]
   /** items : Object/Object[]
    * A single item, or an array of child Components to be 
    * added to this container
    * Unless configured with a layout, a Container simply 
    * renders child Components serially into its 
    * encapsulating element and performs no sizing or 
    * positioning upon them.
    * 単一の item(アイテム)、または子 Compornents(コン
    * ポーネント)の配列は、このコンテナに追加します。
    * layout(レイアウト)で構成されていない限り、Container
    * (コンテナ)は単に、子 Compornents(コンポーネント)
    * をそのカプセル化要素に直列にレンダリングし、それらに
    * サイズや位置調整も実行しません。
    * (GeoExt doc[w/ext)
    */
  });
  treeStore = Ext.create('GeoExt.data.store.LayersTree', {
   layerGroup: olMap.getLayerGroup()
   /** layerGroup : ol.layer.Group
    * The ol.layer.Group that the tree is derived from.
    * tree が派生された ol.layer.Group。
    * (GeoExt doc[w/ext)
    */
   /** getLayerGroup()
    * Get the layergroup associated with this map.
    * このマップ(map)に関連付けられている layergroup を取得し
    * ます。(ol3 API)
    */
  });
  treePanel = Ext.create('Ext.tree.Panel', {
  /** Ext.tree.Panel
   * The TreePanel provides tree-structured UI 
   * representation of tree-structured data. A TreePanel 
   * must be bound to a Ext.data.TreeStore.
   * TreePanels support multiple columns through the columns 
   * configuration.
   * By default a TreePanel contains a single column which 
   * uses the text Field of the store's nodes.
   * TreePanel は、ツリー構造データのツリー構造 UI 表現を提供
   * します。 TreePanel は Ext.data.TreeStore にバインドする
   * 必要があります。
   * TreePanel は、カラム設定を使用して複数のカラムをサポート
   * しています。
   * デフォルトでは TreePanel はストアノードのテキストフィール
   * ドを使用して単一のカラムを含んでいます。
   * (GeoExt doc[w/ext)
   */
   title: 'Legends in tree panel',
   /** title : String
    * The title text to be used to display in the Panel 
    * Header. Or a config object for a Panel Title.
    * Panel Header に表示するために使用される title テキ
    * スト。または Panel Title のための config オブジェ
    * クト。(GeoExt doc[w/ext)
    */
   store: treeStore,
   /** store : Ext.data.TreeStore required
    * The Store the tree should use as its data source.
    * Overrides: Ext.panel.Table.store
    * tree がそのデータソースとして使用する Store。
    * (GeoExt doc[w/ext)
    */
   border: false,
   rootVisible: false,
   /** rootVisible : Boolean
    * False to hide the root node.
    * Note that trees always have a root node. If you do not 
    * specify a root node, one will be created.
    * If the root node is not visible, then in order for a 
    * tree to appear to the end user, the root node is 
    * autoloaded with its child nodes.
    * Defaults to: true
    * ルートノードを非表示にする場合は False。
    * ツリーは常にルートノードを持っていることに注意してくださ
    * い。ルートノードを指定しない場合、1つ作成されます。
    * ルートノードが表示されていない場合、ツリーがエンドユーザに
    * 表示されるようにするために、ルートノードは、その子ノードと
    * 共に自動的にロードされます。
    * デフォルトは:true。
    * (GeoExt doc[w/ext)
    */
   hideHeaders: true,
   /** hideHeaders : Boolean
    * True to hide the headers.
    * Overrides: Ext.panel.Table.hideHeaders
    * ヘッダを非表示にするには true。
    * 上書きは、Ext.panel.Table.hideHeaders。
    * (GeoExt doc[w/ext)
    */
   lines: false,
   /** lines : Boolean
    * False to disable tree lines.
    * Defaults to: true
    * ツリーラインを無効にする場合は false。
    * デフォルトは:true。
    * (GeoExt doc[w/ext)
    */
   flex: 1,
   /** flex : Number
    * Flex may be applied to child items of a box layout 
    * (vbox or hbox). Each child item with a flex property 
    * will fill space (horizontally in hbox, vertically in 
    * vbox) according to that item's relative flex value 
    * compared to the sum of all items with a flex value 
    * specified.
    * Any child items that have either a flex of 0 or 
    * undefined will not be 'flexed' (the initial size will 
    * not be changed).
    * flex(フレックス)は、ボックスレイアウト(VBOX または 
    * hbox)の子 item(アイテム)に適用することができます。flex 
    * プロパティを持つそれぞれの子 item は、指定された flex 値
    * を持つすべての item の合計と比べ、その item の相対的な 
    * flex 値に応じて(VBOX に垂直方向、hbox に水平方向)スペー
    * スを埋めます。
    * 0 flex または、未定義のいずれかを持っている任意の子 item 
    * は、「(ウィンドウに合わせて)伸縮」されることはありません
    * (初期サイズは変更されません)。
    * (GeoExt doc[w/ext)
    */
   columns: {
   /** columns : Ext.grid.column.Column[]/Object
    * An array of column definition objects which define all 
    * columns that appear in this grid. Each column 
    * definition provides the header text for the column, 
    * and a definition of where the data for that column 
    * comes from.
    * This can also be a configuration object for a 
    * HeaderContainer which may override certain default 
    * configurations if necessary. For example, the special 
    * layout may be overridden to use a simpler layout, or 
    * one can set default values shared by all columns:
    * このグリッドに表示されるすべてのカラムを定義するカラム定義
    * オブジェクトの配列。各カラム定義は、カラムに対してヘッダー
    * テキスト、およびそのカラムのデータの発生場所の定義を提供し
    * ます。
    * これは、必要に応じて、特定のデフォルト設定を上書きすること
    * ができる HeaderContainer ための設定オブジェクトにすること
    * もできます。例えば、特殊なレイアウト(layout)が簡単なレイ
    * アウトを使用するために上書きすることができ、または、すべて
    * のカラムによって共有されるデフォルト値を設定することができ
    * ます。
    * (GeoExt doc[w/ext)
    */
    header: false,
    /** header : Boolean/Object
     * Pass as false to prevent a Header from being created 
     * and shown.
     * Pass as a config object (optionally containing an 
     * xtype) to custom-configure this Panel's header.
     * See Ext.panel.Header for all the options that may be 
     * specified here.
     * A panel header is a Ext.container.Container which 
     * contains the Panel's title and tools. You may also 
     * configure the Panel's header option with its own 
     * child items which go before the tools
     * By default the panel title is inserted after items 
     * configured in this config, but before any tools. To 
     * insert the title at any point in the full array, 
     * specify the titlePosition config:
     * 作成され、表示されることからヘッダを防ぐために false とし
     * て渡します。
     * カスタム構成のこの Panel ヘッダに設定オブジェクト(オプ
     * ション xtype を含む)として渡します。
     * ここで指定することができるすべてのオプションに対する 
     * Ext.panel.Header を参照してください。
     * パネル・ヘッダは、Panel のタイトルやツールを含む 
     * Ext.container.Container です。また、ツールの前に動作する
     * その子アイテム(item)で Panel のヘッダオプションを設定す
     * ることもできます。
     * デフォルトでは、パネルタイトル(panel  title)は、この設
     * 定で構成されたアイテム(item)の後に挿入されますが、すべ
     * てのツールの前です。完全な配列のすべての点でタイトル
     * (title)を挿入するには、titlePosition 設定を指定します。
     * (GeoExt doc[w/ext)
     */
    items: [
     {
      xtype: 'treecolumn',
      /** xtype : Ext.enums.Widget
       * Note: Only applies to Ext.Component derived classes 
       * when used as a config in Ext.define.
       * This property provides a shorter alternative to 
       * creating objects than using a full class name. 
       * Using xtype is the most common way to define 
       * component instances, especially in a container.
       * 注:Ext.define で設定として使用された場合、派生クラス
       * を Ext.Component にのみ適用されます。
       * このプロパティは、完全なクラス名を使用するよりも、オブ
       * ジェクトを作成する短い代替手段を提供します。 xtype を
       * 使用することは、特にコンテナで、コンポーネントのインス
       * タンスを定義する最も一般的な方法です。 
       * (GeoExt doc[w/ext])
       */
      /** treecolumn
       * Ext.tree.Column の エイリアス。
       */
      dataIndex: 'text',
      /** dataIndex : String
       * The name of the field in the grid's 
       * Ext.data.Store's Ext.data.Model definition from 
       * which to draw the column's value. Required.
       * グリッドのExt.data.Store.のカラムの値を描画する 
       * Ext.data.Model 定義内のフィールド名。必須。
       * (GeoExt doc[w/ext])
       */
      flex: 1,
      plugins: [
      /** plugins : Ext.plugin.Abstract[]/
       * Ext.plugin.Abstract/Object[]/Object/
       * Ext.enums.Plugin[]/Ext.enums.Plugin
       * An array of plugins to be added to this component. 
       * Can also be just a single plugin instead of array.
       * Plugins provide custom functionality for a 
       * component. 
       * The only requirement for a valid plugin is that it 
       * contain an init method that accepts a reference of 
       * type Ext.Component. When a component is created, if 
       * any plugins are available, the component will call 
       * the init method on each plugin, passing a reference 
       * to itself. Each plugin can then call methods or 
       * respond to events on the component as needed to 
       * provide its functionality.
       * このコンポーネントに追加されるプラグインの配列。配列の
       * 代わりに1つだけのプラグインにすることもできます。
       * プラグインは、コンポーネントのカスタム機能を提供します。
       * 有効なプラグインの唯一の要件は、それが参照型 
       * Ext.Component を受け入れる init メソッドが含まれてい
       * ることです。コンポーネントが作成されると、任意のプラグ
       * インが利用可能である場合、コンポーネントは、それ自身へ
       * の参照を渡し、各プラグインに init メソッドを呼び出しま
       * す。各プラグインは、その後、メソッドを呼び出したり、そ
       * の機能を提供するために、必要に応じてコンポーネント上の
       * イベントに応答することができます。
       * (GeoExt doc[w/ext)
       */
       {
        ptype: 'basic_tree_column_legend'
        /** ptype:
         * プラグインのエイリアス。
         */
       }
      ]
     }
    ]
   }
  });
  treeStore2 = Ext.create('GeoExt.data.store.LayersTree', {
   layerGroup: olMap.getLayerGroup()
  });
  treePanel2 = Ext.create('Ext.tree.Panel', {
   title: 'treePanel',
   store: treeStore2,
   rootVisible: false,
   border: false,
   flex: 1,
   hideHeaders: true,
   lines: false,
   features: [{
   /** features : Ext.grid.feature.Feature[]/Object[]/
    * Ext.enums.Feature[]
    * An array of grid Features to be added to this grid. 
    * Can also be just a single feature instead of array.
    * このグリッドに追加されるグリッド Feature の配列。配列の代
    * わりに、1つだけの feature にすることもできます。
    * (GeoExt doc[w/ext)
    */
    ftype: 'rowbody',
    /** ftype:
     * feature のエイリアス。
     */
    /** rowbody
     * Ext.grid.feature.RowBody のエイリアス。
     * Ext.grid.feature.RowBody
     * The rowbody feature enhances the grid's markup to 
     * have an additional tr -> td -> div which spans 
     * the entire width of the original row.
     * This is useful to to associate additional information 
     * with a particular record in a grid.
     * Rowbodies are initially hidden unless you override 
     * setupRowData.
     * Will expose additional events on the gridview with 
     * the prefix of 'rowbody'. For example: 'rowbodyclick', 
     * 'rowbodydblclick', 'rowbodycontextmenu'.
     * rowbody feature は、元の行の幅全体に及ぶ追加の tr -> 
     * td -> div を持つグリッドのマークアップを強化します。
     * これは、グリッド内の特定のレコードに追加情報を関連付け
     * るのに有用です。
     * setupRowData を上書きしない限り Rowbodiesは、最初は隠
     * されています。
     * 'rowbody'の接頭辞を持つ gridview に関し て追加のイベン
     * トを公開します。 たとえば:'rowbodyclick'、
     * ' rowbodydbclick'、'rowbodycontextmenu' です。
     * (GeoExt doc[w/ext)
     */
    setupRowData: function(rec, rowIndex, rowValues) {
    /** setupRowData( record, idx, rowValues )private
     * Parameters
     * record : Object, idx : Object, rowValues : Object
     */
     var headerCt = this.view.headerCt,
     colspan = headerCt.getColumnCount(),
     /** getColumnCount( )
      * Returns the number of grid columns descended from 
      * this HeaderContainer. Group Columns are 
      * HeaderContainers. All grid columns are returned, 
      * including hidden ones.
      * この HeaderContainer からの子グリッドカラムの数を返しま
      * す。グループカラム(Group Column)は HeaderContainers 
      * です。すべてのグリッドカラムが非表示のものも含めて、返さ
      * れます。
      * (GeoExt doc[w/ext)
      */
     isChecked = rec.get('checked'),
     layer = rec.data,
     GrpClass = ol.layer.Group,
     hasLegend = isChecked && !(layer instanceof GrpClass),
     legendUrl = hasLegend && layer.get('legendUrl'),
     legHtml = "";
     if (!legendUrl) {
      legendUrl = "http://geoext.github.io/geoext2/" +
       "website-resources/img/GeoExt-logo.png";
     }
     legHtml = '<img class="legend" src="' + legendUrl +
      '" height="32" />';
     //Usually you would style the my-body-class in CSS file
     //通常、css ファイルに my-body-class をスタイル設定します。
     Ext.apply(rowValues, {
     /** Ext.apply ( object, config, [defaults] ) : Object
      * Copies all the properties of config to the specified 
      * object.
      * すべての設定のプロパティを指定されたオブジェクトにコピー
      * します。 
      * (GeoExt doc[w/ext)
      */
     /** rowValues
      * Private properties used during the row and cell 
      * render process. They are allocated here on the 
      * prototype, and cleared/re-used to avoid GC churn 
      * during repeated rendering.
      * 行とセルがプロセスをレンダリングする間に使用されるプライ
      * ベートプロパティ。それらはプロトタイプでここに割り当てら
      * れ、レンダリングを繰り返す間、GC churn を回避するために
      * 削除/再使用されます。
      * (GeoExt doc[w/ext)
      */
      rowBody: hasLegend ? legHtml : "",
      /** 条件演算子 condition ? expr1 : expr2 
       * condition: true か false かを評価する条件文です。
       * expr1, expr2: 各々の値の場合に実行する式です。
       * condition が true の場合、演算子は expr1 の値を選択し
       * ます。そうでない場合は expr2 の値を選択します。
       * (MDN[https://developer.mozilla.org/ja/docs/Web/
       * JavaScript/Guide/Expressions_and_Operators])
       */
      rowBodyCls: "my-body-class",
      /** rowBodyCls:String
       * Defaults to: Ext.baseCSSPrefix + 'grid-row-body'
       * (GeoExt doc[w/ext)
       * baseCSSPrefix : String
       * The base prefix to use for all Ext components. 
       * すべての Ext コンポーネントに使用するベースプレフィッ
       * クス。
       */
      rowBodyColspan: colspan
     });
    }
   }]
  });
  var description = Ext.create('Ext.panel.Panel', {
   contentEl: 'description',
   /** contentEl : String
    * Specify an existing HTML element, or the id of an 
    * existing HTML element to use as the content for this 
    * component.
    * This config option is used to take an existing HTML 
    * element and place it in the layout element of a new 
    * component (it simply moves the specified DOM element 
    * after the Component is rendered to use as the content.
    * 既存のHTMLエレメントを指定するか、既存のHTMLエレメン
    * トの id は、このコンポーネントのコンテンツとして使用
    * します。
    * Component(コンポーネント)が 、content(コンテンツ)
    * として使用するためにレンダリングされた後に、この設定オ
    * プションは、既存のHTMLエレメントを取得し、新しい 
    * component(コンポーネント)の layout(レイアウト)エレ
    * メントでそれを配置するために使用されます(それは単に指定
    * された DOM エレメントを移動させます)。
    * (GeoExt doc[w/ext)
    */
   title: 'Description',
   height: 200,
   /** height : Number|String
    * The height of this component. A numeric value will be 
    * interpreted as the number of pixels; a string value 
    * will be treated as a CSS value with units.
    * このコンポーネントの高さ。数値は、ピクセル数として解釈さ
    * れます。文字列値が単位で CSS 値として扱われます。
    * (GeoExt doc[w/ext)
    */
   border: false,
   bodyPadding: 5
   /** bodyPadding : Number/String
    * A shortcut for setting a padding style on the body 
    * element. The value can either be a number to be 
    * applied to all sides, or a normal css string 
    * describing padding.
    * bodyエレメントにパディングスタイルを設定するための
    * ショートカット。値は、すべての側面に適用される数字、
    * または通常のCSSの文字列記述パディングのいずれかにで
    * きます。
    * (GeoExt doc[w/ext)
    */
  });
  Ext.create('Ext.Viewport', {
  /** Ext.Viewport (Ext.container.Viewport)
   * A specialized container representing the viewable 
   * application area (the browser viewport).
   * The Viewport renders itself to the document body, 
   * and automatically sizes itself to the size of the 
   * browser viewport and manages window resizing. There 
   * may only be one Viewport created in a page.
   * 表示可能なアプリケーション領域(ブラウザのビューポート)
   * を表す特殊なコンテナ。
   * Viewport は、document body にそれ自身をレンダリングし、
   * 自動的に自身のサイズをブラウザのビューポートのサイズにし、
   * ウィンドウのサイズ変更を管理します。1ページに作成した
   * ビューポートは一つだけ設定できます。
   * (GeoExt doc[w/ext])
   */
   layout: "border",
   items: [
    mapPanel,
    {
     xtype: 'panel',
     region: 'west',
     width: 400,
     /** width : Number|String
      * The width of this component. A numeric value will be 
      * interpreted as the number of pixels; a string value 
      * will be treated as a CSS value with units.
      * このコンポーネントの幅。数値は、ピクセル数として解釈さ
      * れます。文字列値が単位で CSS 値として扱われます。
      * (GeoExt doc[w/ext)
      */
     layout: {
     /** layout [Specify as an Object]
      * type
      * The layout type to be used for this container. If 
      * not specified, a default Ext.layout.container.Auto 
      * will be created and used.
      * Valid layout type values are listed in 
      * Ext.enums.Layout. Layout specific configuration 
      * properties Additional layout specific configuration 
      * properties may also be specified. For complete 
      * details regarding the valid config options for each 
      * layout type, see the layout class corresponding to 
      * the type specified.
      * type(タイプ)
      * layout type(レイアウトタイプ)は、この container(コン
      * テナ)に使用されます。
      * 指定しない場合、デフォルトの Ext.layout.container.Auto 
      * が作成および使用されます。
      * 有効な layout type の値は Ext.enums.Layout に記載され
      * ています。
      * layout(レイアウト)固有の設定プロパティー
      * 追加の layout 固有の構成プロパティを指定することもでき
      * ます。各 layout type に有効な設定オプションに関する詳
      * 細については、指定された type に対応する layout クラス
      * を参照してください。(GeoExt doc[w/ext])
      */
      type: 'vbox',
      align: 'stretch'
     },
     items: [
      treePanel,
      description,
      treePanel2
     ]
    }
   ]
  });
 }
});