X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..2e847cf21b8ab9d15fa167b315ca5b2fa92638fc:/docs/output/Ext.Viewport.html diff --git a/docs/output/Ext.Viewport.html b/docs/output/Ext.Viewport.html index b36369cf..2cd7f204 100644 --- a/docs/output/Ext.Viewport.html +++ b/docs/output/Ext.Viewport.html @@ -1,4 +1,4 @@ -
Properties Methods Events Config Options Direct Link
Observable
  Component
    BoxComponent
      Container
        Viewport

Class Ext.Viewport

Package:Ext
Defined In:Viewport.js
Class:Viewport
Extends:Container
xtype:viewport

A specialized container representing the viewable application area (the browser viewport).

+
Observable
  Component
    BoxComponent
      Container
        Viewport

Class Ext.Viewport

Package:Ext
Defined In:Viewport.js
Class:Viewport
Extends:Container

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. Inner layouts are available by virtue of the fact that all Panels @@ -19,7 +19,7 @@ for scrolling if needed using the TreePanel or a Panel with Accordion layout + // the west region might typically utilize a TreePanel or a Panel with Accordion layout }, { region: 'south', title: 'Title for Panel', @@ -51,14 +51,14 @@ container's...

A string component id or the numeric index container's layout on render. For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first item in the container's collection). activeItem only applies to layout styles that can display items one at a time (like Ext.layout.AccordionLayout, Ext.layout.CardLayout and -Ext.layout.FitLayout). Related to Ext.layout.ContainerLayout.activeItem.
Container anchor : String
Note: this config is only used when this Component is rendered +Ext.layout.FitLayout). Related to Ext.layout.ContainerLayout.activeItem.
Container anchor : String
Note: this config is only used when this Component is rendered by a Container which has been configured to use an Anc...

Note: this config is only used when this Component is rendered -by a Container which has been configured to use an AnchorLayout +by a Container which has been configured to use an AnchorLayout (or subclass thereof). based layout manager, for example:

-

See Ext.layout.AnchorLayout.anchor also.

Component autoDestroy : Boolean
If true the container will automatically destroy any contained component that is removed from it, else +

See Ext.layout.AnchorLayout.anchor also.

BoxComponent autoDestroy : Boolean
If true the container will automatically destroy any contained component that is removed from it, else destruction mu...
If true the container will automatically destroy any contained component that is removed from it, else destruction must be handled manually (defaults to true).
Container autoEl : Mixed
A tag name or DomHelper spec used to create the Element which will encapsulate this Component. @@ -89,12 +89,25 @@ different DOM elements. Example usage:

{
         autoEl: 'li',
         html: 'First list item'
     }
-}
Component autoShow : Boolean
True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove +}
Component autoScroll : Boolean
true to use overflow:'auto' on the components layout element and show scroll bars automatically when +necessary, false...
true to use overflow:'auto' on the components layout element and show scroll bars automatically when +necessary, false to clip any overflowing content (defaults to false).
BoxComponent autoShow : Boolean
True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render...
True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove -them on render (defaults to false).
Component bufferResize : Boolean/Number
When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer -t...
When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer +them on render (defaults to false).
Component boxMaxHeight : Number
The maximum value in pixels which this BoxComponent will set its height to. +Warning: This will override any size mana...

The maximum value in pixels which this BoxComponent will set its height to.

+

Warning: This will override any size management applied by layout managers.

BoxComponent boxMaxWidth : Number
The maximum value in pixels which this BoxComponent will set its width to. +Warning: This will override any size manag...

The maximum value in pixels which this BoxComponent will set its width to.

+

Warning: This will override any size management applied by layout managers.

BoxComponent boxMinHeight : Number
The minimum value in pixels which this BoxComponent will set its height to. +Warning: This will override any size mana...

The minimum value in pixels which this BoxComponent will set its height to.

+

Warning: This will override any size management applied by layout managers.

BoxComponent boxMinWidth : Number
The minimum value in pixels which this BoxComponent will set its width to. +Warning: This will override any size manag...

The minimum value in pixels which this BoxComponent will set its width to.

+

Warning: This will override any size management applied by layout managers.

BoxComponent bubbleEvents : Array
An array of events that, when fired, should be bubbled to any parent container. +See Ext.util.Observable.enableBubble....

An array of events that, when fired, should be bubbled to any parent container. +See Ext.util.Observable.enableBubble. +Defaults to ['add', 'remove'].

Container bufferResize : Boolean/Number
When set to true (50 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer +th...
When set to true (50 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers -with a large quantity of sub-components for which frequent layout calls would be expensive.
Container clearCls : String
The CSS class used to to apply to the special clearing div rendered +with a large quantity of sub-components for which frequent layout calls would be expensive. Defaults to 50.
Container clearCls : String
The CSS class used to to apply to the special clearing div rendered directly after each form field wrapper to provide...

The CSS class used to to apply to the special clearing div rendered directly after each form field wrapper to provide field clearing (defaults to 'x-form-clear-left').

@@ -104,7 +117,21 @@ manager (e.g. fieldLabel is specified or isFormField=true is specified.


See Ext.layout.FormLayout.fieldTpl also.

Component cls : String
An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for ...
An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be -useful for adding customized styles to the component or any of its children using standard CSS rules.
Component ctCls : String
An optional extra CSS class that will be added to this component's container. This can be useful for +useful for adding customized styles to the component or any of its children using standard CSS rules.
Component contentEl : String
Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content +for this comp...

Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content +for this component.

+
    +
  • Description : +
    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.
  • +
  • Notes : +
    The specified HTML element is appended to the layout element of the component after any configured +HTML has been inserted, and so the document will not contain this element at the time the render event is fired.
    +
    The specified HTML element used will not participate in any layout +scheme that the Component may use. It is just HTML. Layouts operate on child items.
    +
    Add either the x-hidden or the x-hide-display CSS class to +prevent a brief flicker of the content before it is rendered to the panel.
  • +
Component ctCls : String
An optional extra CSS class that will be added to this component's container. This can be useful for adding customize...

An optional extra CSS class that will be added to this component's container. This can be useful for adding customized styles to the container or any of its children using standard CSS rules. See Ext.layout.ContainerLayout.extraCls also.

@@ -115,18 +142,23 @@ which assigns a value by default:
To configure the above Class with an extra CSS class append to the default. For example, for BoxLayout (Hbox and Vbox):
ctCls: 'x-box-layout-ct custom-class'
-

Component defaultType : String
The default xtype of child Components to create in this Container when +

Component data : Mixed
The initial set of data to apply to the tpl to +update the content area of the Component.
Component defaultType : String
The default xtype of child Components to create in this Container when a child item is specified as a raw configurati...

The default xtype of child Components to create in this Container when a child item is specified as a raw configuration object, rather than as an instantiated Component.

-

Defaults to 'panel', except Ext.menu.Menu which defaults to 'menuitem', -and Ext.Toolbar and Ext.ButtonGroup which default to 'button'.

Container defaults : Object
A config object that will be applied to all components added to this container either via the items -config or via the...

A config object that will be applied to all components added to this container either via the items -config or via the add or insert methods. The defaults config can contain any -number of name/value property pairs to be added to each item, and should be valid for the types of items -being added to the container. For example, to automatically apply padding to the body of each of a set of -contained Ext.Panel items, you could pass: defaults: {bodyStyle:'padding:15px'}.


-

Note: defaults will not be applied to config objects if the option is already specified. -For example:

defaults: {               // defaults are applied to items, not the container
+

Defaults to 'panel', except Ext.menu.Menu which defaults to 'menuitem', +and Ext.Toolbar and Ext.ButtonGroup which default to 'button'.

Container defaults : Object|Function
This option is a means of applying default settings to all added items whether added through the items +config or via ...

This option is a means of applying default settings to all added items whether added through the items +config or via the add or insert methods.

+

If an added item is a config object, and not an instantiated Component, then the default properties are +unconditionally applied. If the added item is an instantiated Component, then the default properties are +applied conditionally so as not to override existing properties in the item.

+

If the defaults option is specified as a function, then the function will be called using this Container as the +scope (this reference) and passing the added item as the first parameter. Any resulting object +from that call is then applied to the item as default properties.

+

For example, to automatically apply padding to the body of each of a set of +contained Ext.Panel items, you could pass: defaults: {bodyStyle:'padding:15px'}.

+

Usage:

defaults: {               // defaults are applied to items, not the container
     autoScroll:true
 },
 items: [
@@ -153,7 +185,13 @@ Example use:
new Ext.FormPanel({
         xtype: 'textfield',
         fieldLabel: 'Name'
     }]
-});
Component forceLayout : Boolean
If true the container will force a layout initially even if hidden or collapsed. This option +});
Component flex : Number
Note: this config is only used when this Component is rendered +by a Container which has been configured to use a BoxL...

Note: this config is only used when this Component is rendered +by a Container which has been configured to use a BoxLayout. +Each child Component with a flex property will be flexed either vertically (by a VBoxLayout) +or horizontally (by an HBoxLayout) according to the item's relative flex value +compared to the sum of all Components with flex value specified. Any child items that have +either a flex = 0 or flex = undefined will not be 'flexed' (the initial size will not be changed).

BoxComponent forceLayout : Boolean
If true the container will force a layout initially even if hidden or collapsed. This option is useful for forcing fo...
If true the container will force a layout initially even if hidden or collapsed. This option is useful for forcing forms to render in collapsed or hidden containers. (defaults to false).
Container hidden : Boolean
Render this component hidden (default is false). If true, the hide method will be called internally.
Component hideBorders : Boolean
True to hide the borders of each contained component, false to defer to the component's existing @@ -179,7 +217,11 @@ Example use:
new Ext.FormPanel({
 (css display).


Note: the default of 'display' is generally preferred since items are automatically laid out when they are first shown (no sizing -is done while hidden).

Component id : String
The unique id of this component (defaults to an auto-assigned id). +is done while hidden).

Component html : String/Object
An HTML fragment, or a DomHelper specification to use as the layout element +content (defaults to ''). The HTML conten...
An HTML fragment, or a DomHelper specification to use as the layout element +content (defaults to ''). The HTML content is added after the component is rendered, +so the document will not contain this HTML at the time the render event is fired. +This content is inserted into the body before any configured contentEl is appended.
Component id : String
The unique id of this component (defaults to an auto-assigned id). You should assign an id if you need to be able to ...

The unique id of this component (defaults to an auto-assigned id). You should assign an id if you need to be able to access the component later and you do not have an object reference available (e.g., using Ext.getCmp).

@@ -189,8 +231,11 @@ rules to style the specific instance of this component uniquely, and also to sel sub-elements using this component's id as the parent.

Note: to avoid complications imposed by a unique id also see itemId and ref.

-

Note: to access the container of an item see ownerCt.

Component itemCls : String
An additional CSS class to apply to the div wrapping the form item -element of this field. If supplied, itemCls at th...

An additional CSS class to apply to the div wrapping the form item +

Note: to access the container of an item see ownerCt.

Component itemCls : String
Note: this config is only used when this Component is rendered by a Container which +has been configured to use the Fo...

Note: this config is only used when this Component is rendered by a Container which +has been configured to use the FormLayout layout manager (e.g. +Ext.form.FormPanel or specifying layout:'form').


+

An additional CSS class to apply to the div wrapping the form item element of this field. If supplied, itemCls at the field level will override the default itemCls supplied at the container level. The value specified for itemCls will be added to the default class ('x-form-item').

@@ -199,22 +244,22 @@ the default itemCls supplied at the container level. The value s you to write standard CSS rules that can apply to the field, the label (if specified), or any other element within the markup for the field.


Note: see the note for fieldLabel.


-Example use:
// Apply a style to the field's label:
+Example use:
// Apply a style to the field's label:
 <style>
     .required .x-form-item-label {font-weight:bold;color:red;}
 </style>
 
 new Ext.FormPanel({
-	height: 100,
-	renderTo: Ext.getBody(),
-	items: [{
-		xtype: 'textfield',
-		fieldLabel: 'Name',
-		itemCls: 'required' //this label will be styled
-	},{
-		xtype: 'textfield',
-		fieldLabel: 'Favorite Color'
-	}]
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Name',
+        itemCls: 'required' //this label will be styled
+    },{
+        xtype: 'textfield',
+        fieldLabel: 'Favorite Color'
+    }]
 });
Component itemId : String
An itemId can be used as an alternative way to get a reference to a component when no object reference is available. ...

An itemId can be used as an alternative way to get a reference to a component when no object reference is available. Instead of using an id with @@ -335,7 +380,7 @@ you have in mind. For example:

new Ext.Window({
     }]
 }).show();

If the layout configuration is not explicitly specified for -a general purpose container (e.g. Container or Panel) the +a general purpose container (e.g. Container or Panel) the default layout manager will be used which does nothing but render child components sequentially into the Container (no sizing or positioning will be performed in this situation). @@ -353,30 +398,30 @@ as a String:

  • Specify as a String
  • @@ -387,13 +432,13 @@ layoutConfig: { padding: '5', align: 'left' }
    -
  • layout
  • -

    The layout type to be used for this container (see list +

  • layout
  • +

    The layout type to be used for this container (see list of valid layout type values above).


    -
  • layoutConfig
  • +
  • layoutConfig

  • Additional layout specific configuration properties. For complete details regarding the valid config options for each layout type, see the -layout class corresponding to the layout specified.

    +layout class corresponding to the layout specified.

    Container layoutConfig : Object
    This is a config object containing properties specific to the chosen layout if layout has been specified as a string.

    Container listeners : Object
    A config object containing one or more event handlers to be added to this @@ -489,9 +534,9 @@ object. The ptype will be looked up at render time up to determine type of Plugin to create.

    If you create your own Plugins, you may register them using Ext.ComponentMgr.registerPlugin in order to be able to -take advantage of lazy instantiation and rendering.
    Component ref : String
    A path specification, relative to the Component's ownerCt specifying into which -ancestor Container to place a named r...

    A path specification, relative to the Component's ownerCt specifying into which -ancestor Container to place a named reference to this Component.

    +take advantage of lazy instantiation and rendering.
    Component ref : String
    A path specification, relative to the Component's ownerCt +specifying into which ancestor Container to place a named r...

    A path specification, relative to the Component's ownerCt +specifying into which ancestor Container to place a named reference to this Component.

    The ancestor axis can be traversed by using '/' characters in the path. For example, to put a reference to a Toolbar Button into the Panel which owns the Toolbar:

    var myGrid = new Ext.grid.EditorGridPanel({
         title: 'My EditorGridPanel',
    @@ -510,13 +555,14 @@ For example, to put a reference to a Toolbar Button into the Panel which owns
             }
         }
     });
    -

    In the code above, if the ref had been 'saveButton' the reference would -have been placed into the Toolbar. Each '/' in the ref moves up one level from the -Component's ownerCt.

    Component region : String
    Note: this config is only used when this BoxComponent is rendered +

    In the code above, if the ref had been 'saveButton' +the reference would have been placed into the Toolbar. Each '/' in the ref +moves up one level from the Component's ownerCt.

    +

    Also see the added and removed events.

    Component region : String
    Note: this config is only used when this BoxComponent is rendered by a Container which has been configured to use the...

    Note: this config is only used when this BoxComponent is rendered by a Container which has been configured to use the BorderLayout layout manager (e.g. specifying layout:'border').


    -

    See Ext.layout.BorderLayout also.

    BoxComponent stateEvents : Array
    An array of events that, when fired, should trigger this component to +

    See Ext.layout.BorderLayout also.

    BoxComponent resizeEvent : String
    The event to listen to for resizing in layouts. Defaults to 'resize'.
    Container stateEvents : Array
    An array of events that, when fired, should trigger this component to save its state (defaults to none). stateEvents ...

    An array of events that, when fired, should trigger this component to save its state (defaults to none). stateEvents may be any type of event supported by this component, including browser or custom events @@ -586,7 +632,20 @@ Ext.Element.ap...

    A custom style specification to be appl } }) ] -});
    Component x : Number
    The local x (left) coordinate for this component if contained within a positioning container.
    BoxComponent xtype : String
    The registered xtype to create. This config option is not used when passing +});
    Component tabTip : String
    Note: this config is only used when this BoxComponent is a child item of a TabPanel. +A string to be used as innerHTML...

    Note: this config is only used when this BoxComponent is a child item of a TabPanel.

    +A string to be used as innerHTML (html tags are accepted) to show in a tooltip when mousing over +the associated tab selector element. Ext.QuickTips.init() +must be called in order for the tips to render.
    BoxComponent tpl : Mixed
    An Ext.Template, Ext.XTemplate +or an array of strings to form an Ext.XTemplate. +Used in conjunction with the data and...
    An Ext.Template, Ext.XTemplate +or an array of strings to form an Ext.XTemplate. +Used in conjunction with the data and +tplWriteMode configurations.
    Component tplWriteMode : String
    The Ext.(X)Template method to use when +updating the content area of the Component. Defaults to 'overwrite' +(see Ext.X...
    The Ext.(X)Template method to use when +updating the content area of the Component. Defaults to 'overwrite' +(see Ext.XTemplate.overwrite).
    Component x : Number
    The local x (left) coordinate for this component if contained within a positioning container.
    BoxComponent xtype : String
    The registered xtype to create. This config option is not used when passing a config object into a constructor. This ...
    The registered xtype to create. This config option is not used when passing a config object into a constructor. This config option is used only when lazy instantiation is being used, and a child item of a Container is being @@ -614,11 +673,15 @@ config for a suggestion, or use a render listener directly:

    new
             single: true  // Remove the listener after first invocation
         }
     });
    -

    See also getEl

    Component hidden : Boolean
    True if this component is hidden. Read-only.
    Component initialConfig : Object
    This Component's initial configuration specification. Read-only.
    Component items : MixedCollection
    The collection of components in this container as a Ext.util.MixedCollection
    Container ownerCt : Ext.Container
    The component's owner Ext.Container (defaults to undefined, and is set automatically when -the component is added to a...
    The component's owner Ext.Container (defaults to undefined, and is set automatically when -the component is added to a container). Read-only. -

    Note: to access items within the container see itemId.

    Component rendered : Boolean
    True if this component has been rendered. Read-only.
    Component

    Public Methods

    MethodDefined By
     hidden : Boolean
    True if this component is hidden. Read-only.
    Component
     initialConfig : Object
    This Component's initial configuration specification. Read-only.
    Component
     items : MixedCollection
    The collection of components in this container as a Ext.util.MixedCollection
    Container
     rendered : Boolean
    True if this component has been rendered. Read-only.
    Component

    Public Methods

    MethodDefined By

    Public Events

    EventDefined By