Alien-Web-ExtJS-V3

 view release on metacpan or  search on metacpan

share/docs/source/BoxComponent.html  view on Meta::CPAN

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='Ext-BoxComponent-method-constructor'><span id='Ext-BoxComponent'>/**
</span></span> * @class Ext.BoxComponent
 * @extends Ext.Component
 * &lt;p&gt;Base class for any {@link Ext.Component Component} that is to be sized as a box, using width and height.&lt;/p&gt;
 * &lt;p&gt;BoxComponent provides automatic box model adjustments for sizing and positioning and will work correctly
 * within the Component rendering model.&lt;/p&gt;
 * &lt;p&gt;A BoxComponent may be created as a custom Component which encapsulates any HTML element, either a pre-existing
 * element, or one that is created to your specifications at render time. Usually, to participate in layouts,
 * a Component will need to be a &lt;b&gt;Box&lt;/b&gt;Component in order to have its width and height managed.&lt;/p&gt;
 * &lt;p&gt;To use a pre-existing element as a BoxComponent, configure it so that you preset the &lt;b&gt;el&lt;/b&gt; property to the
 * element to reference:&lt;pre&gt;&lt;code&gt;
var pageHeader = new Ext.BoxComponent({
    el: 'my-header-div'
});&lt;/code&gt;&lt;/pre&gt;
 * This may then be {@link Ext.Container#add added} to a {@link Ext.Container Container} as a child item.&lt;/p&gt;
 * &lt;p&gt;To create a BoxComponent based around a HTML element to be created at render time, use the
 * {@link Ext.Component#autoEl autoEl} config option which takes the form of a
 * {@link Ext.DomHelper DomHelper} specification:&lt;pre&gt;&lt;code&gt;
var myImage = new Ext.BoxComponent({
    autoEl: {
        tag: 'img',
        src: '/images/my-image.jpg'
    }
});&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
 * @constructor
 * @param {Ext.Element/String/Object} config The configuration options.
 * @xtype box
 */
Ext.BoxComponent = Ext.extend(Ext.Component, {

    // Configs below are used for all Components when rendered by BoxLayout.
<span id='Ext-BoxComponent-cfg-flex'>    /**
</span>     * @cfg {Number} flex
     * &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: this config is only used when this Component is rendered
     * by a Container which has been configured to use a &lt;b&gt;{@link Ext.layout.BoxLayout BoxLayout}.&lt;/b&gt;
     * Each child Component with a &lt;code&gt;flex&lt;/code&gt; property will be flexed either vertically (by a VBoxLayout)
     * or horizontally (by an HBoxLayout) according to the item's &lt;b&gt;relative&lt;/b&gt; &lt;code&gt;flex&lt;/code&gt; value
     * compared to the sum of all Components with &lt;code&gt;flex&lt;/code&gt; value specified. Any child items that have
     * either a &lt;code&gt;flex = 0&lt;/code&gt; or &lt;code&gt;flex = undefined&lt;/code&gt; will not be 'flexed' (the initial size will not be changed).
     */
    // Configs below are used for all Components when rendered by AnchorLayout.
<span id='Ext-BoxComponent-cfg-anchor'>    /**
</span>     * @cfg {String} anchor &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: this config is only used when this Component is rendered
     * by a Container which has been configured to use an &lt;b&gt;{@link Ext.layout.AnchorLayout AnchorLayout} (or subclass thereof).&lt;/b&gt;
     * based layout manager, for example:&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
     * &lt;li&gt;{@link Ext.form.FormPanel}&lt;/li&gt;
     * &lt;li&gt;specifying &lt;code&gt;layout: 'anchor' // or 'form', or 'absolute'&lt;/code&gt;&lt;/li&gt;



( run in 0.627 second using v1.01-cache-2.11-cpan-b50b6a40fd4 )