X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..refs/heads/old:/docs/output/Ext.ButtonGroup.html?ds=inline diff --git a/docs/output/Ext.ButtonGroup.html b/docs/output/Ext.ButtonGroup.html index a1291f54..be7c6dae 100644 --- a/docs/output/Ext.ButtonGroup.html +++ b/docs/output/Ext.ButtonGroup.html @@ -1,37 +1,42 @@ -
Observable Component BoxComponent Container Panel ButtonGroup
Package: | Ext |
Defined In: | ButtonGroup.js |
Class: | ButtonGroup |
Extends: | Panel |
var p = new Ext.Panel({
- title: 'Panel with Button Group',
- width: 300,
- height:200,
- renderTo: document.body,
- html: 'whatever',
- tbar: [{
- xtype: 'buttongroup',
- columns: 3,
- title: 'Clipboard',
- items: [{
- text: 'Paste',
- scale: 'large',
- rowspan: 3, iconCls: 'add',
- iconAlign: 'top',
- cls: 'x-btn-as-arrow'
- },{
- xtype:'splitbutton',
- text: 'Menu Button',
- scale: 'large',
- rowspan: 3,
- iconCls: 'add',
- iconAlign: 'top',
- arrowAlign:'bottom',
- menu: [{text: 'Menu Item 1'}]
- },{
- xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
- },{
- text: 'Copy', iconCls: 'add16'
- },{
- text: 'Format', iconCls: 'add16'
- }]
- }]
+Observable
+ Component
+ BoxComponent
+ Container
+ Panel
+ ButtonGroup
Class Ext.ButtonGroup
Package: Ext Defined In: ButtonGroup.js Class: ButtonGroup Extends: Panel
Container for a group of buttons. Example usage:
+var p = new Ext.Panel({
+ title: 'Panel with Button Group',
+ width: 300,
+ height:200,
+ renderTo: document.body,
+ html: 'whatever',
+ tbar: [{
+ xtype: 'buttongroup',
+ columns: 3,
+ title: 'Clipboard',
+ items: [{
+ text: 'Paste',
+ scale: 'large',
+ rowspan: 3, iconCls: 'add',
+ iconAlign: 'top',
+ cls: 'x-btn-as-arrow'
+ },{
+ xtype:'splitbutton',
+ text: 'Menu Button',
+ scale: 'large',
+ rowspan: 3,
+ iconCls: 'add',
+ iconAlign: 'top',
+ arrowAlign:'bottom',
+ menu: [{text: 'Menu Item 1'}]
+ },{
+ xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
+ },{
+ text: 'Copy', iconCls: 'add16'
+ },{
+ text: 'Format', iconCls: 'add16'
+ }]
+ }]
});
Config Options
Config Options Defined By activeItem : String/NumberA string component id or the numeric index of the component that should be initially activated within the
container's...A string component id or the numeric index of the component that should be initially activated within the
container's layout on render. For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first
@@ -155,7 +160,7 @@ element:
},
footerCfg: {
tag: 'h2',
- cls: 'x-panel-footer' // same as the Default class
+ cls: 'x-panel-footer', // same as the Default class
html: 'footer html'
},
footerCssClass: 'custom-footer', // additional css class, see addClass
@@ -210,7 +215,7 @@ any other tools in the panel's title bar, false
to render it last (
false
). Panel collapsedCls : StringA CSS class to add to the panel's element after it has been collapsed (defaults to
'x-panel-collapsed'
). Panel collapsible : BooleanTrue to make the panel collapsible and have the expand/collapse toggle button automatically rendered into
the header ...True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into
-the header tool button area, false to keep the panel statically sized with no button (defaults to false). Panel columns : NumberThe columns configuration property passed to the
+the header tool button area, false to keep the panel statically sized with no button (defaults to false). Panel columns : NumberThe columns configuration property passed to the
configured layout manager. See Ext.layout.TableLayout.columns. ButtonGroup contentEl : StringOptional. 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.
@@ -941,14 +946,12 @@ Note: see the Note for el al...The Panel's header Note: see the Note for el
also.
Panel hidden : BooleanTrue if this component is hidden. Read-only. Component initialConfig : ObjectThis Component's initial configuration specification. Read-only. Component items : MixedCollectionThe collection of components in this container as a Ext.util.MixedCollection Container ownerCt : Ext.ContainerThis Component's owner Container (defaults to undefined, and is set automatically when
this Component is added to a C... Component private : ObjectWe can only lay out if there is a view area in which to layout.
-display:none on the layout target, *or any of its par...We can only lay out if there is a view area in which to layout.
-display:none on the layout target, *or any of its parent elements* will mean it has no view area. Container refOwner : Ext.ContainerThe ancestor Container into which the ref reference was inserted if this Component
+Note: to access items within the Container see itemId.
Component refOwner : Ext.ContainerThe ancestor Container into which the ref reference was inserted if this Component
is a child of a Container, and has...The ancestor Container into which the ref reference was inserted if this Component
is a child of a Container, and has been configured with a ref
. Component rendered : BooleanTrue if this component has been rendered. Read-only. Component
Public Methods
Method Defined By ButtonGroup( Object config
)
- Create a new ButtonGroup.Create a new ButtonGroup.Parameters:config
: ObjectThe config object
Returns:- void
ButtonGroup add( Object/Array component
, Object (Optional)
, Object (Optional)
)
+ Create a new ButtonGroup.Create a new ButtonGroup.Parameters:config
: ObjectThe config object
Returns:- void
ButtonGroup add( ...Object/Array component
)
:
- Ext.ComponentAdds Component(s) to this Container.
+ Ext.Component/ArrayAdds Component(s) to this Container.
Description :
<ul class="mdetail-params">
Fires the beforeadd event before addin...Adds Component(s) to this Container.
@@ -973,8 +976,8 @@ tb.BorderLayout
for more details.
-Parameters:component
: Object/ArrayEither a single component or an Array of components to add. See
-items
for additional information.
(Optional)
: Objectcomponent_2(Optional)
: Objectcomponent_n
Returns:Ext.Component
component The Component (or config object) that was added.
Container addButton( String/Object config
, Function handler
, Object scope
)
+Parameters:component
: ...Object/ArrayEither one or more Components to add or an Array of Components to add. See
+items
for additional information.
Returns:Ext.Component/Array
The Components that were added.
Container addButton( String/Object config
, Function handler
, Object scope
)
:
Ext.ButtonAdds a button to this panel. Note that this method must be called prior to rendering. The preferred
approach is to ...Adds a button to this panel. Note that this method must be called prior to rendering. The preferred
@@ -1038,12 +1041,12 @@ Or a shorthand syntax:
scope: this
});Returns:- void
Observable applyToMarkup( String/HTMLElement el
)
:
- voidApply this component to existing markup that is valid. With this function, no call to render() is required.Apply this component to existing markup that is valid. With this function, no call to render() is required.Parameters:el
: String/HTMLElement
Returns:- void
Component bubble( Function fn
, [Object scope
], [Array args
] )
+ voidApply this component to existing markup that is valid. With this function, no call to render() is required.Apply this component to existing markup that is valid. With this function, no call to render() is required.Parameters:el
: String/HTMLElement
Returns:- void
Component bubble( Function fn
, [Object scope
], [Array args
] )
:
- Ext.ContainerBubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of...Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of
+ Ext.ComponentBubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of...Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of
function call will be the scope provided or the current component. The arguments to the function
will be the args provided or the current component. If the function returns false at any point,
-the bubble is stopped.Parameters:fn
: FunctionThe function to callscope
: Object(optional) The scope of the function (defaults to current node)args
: Array(optional) The args to call the function with (default to passing the current component)
Returns:Ext.Container
this
Container cascade( Function fn
, [Object scope
], [Array args
] )
+the bubble is stopped.Parameters:fn
: FunctionThe function to callscope
: Object(optional) The scope of the function (defaults to current node)args
: Array(optional) The args to call the function with (default to passing the current component)
Returns:Ext.Component
this
Component cascade( Function fn
, [Object scope
], [Array args
] )
:
Ext.ContainerCascades down the component/container heirarchy from this component (called first), calling the specified function wi...Cascades down the component/container heirarchy from this component (called first), calling the specified function with
each component. The scope (this) of
@@ -1074,38 +1077,38 @@ calc layouts as required (defaults to false, which calls doLayout recursively fo
:
Ext.ComponentEnable this component and fire the 'enable' event.Enable this component and fire the 'enable' event.Parameters:- None.
Returns:Ext.Component
this
Component enableBubble( String/Array events
)
:
- voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
-this.getBubbleTarget() if present...Enables events fired by this Observable to bubble up an owner hierarchy by calling
-this.getBubbleTarget()
if present. There is no implementation in the Observable base class.
-This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
-implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
-access the required target more quickly.
-Example:
Ext.override(Ext.form.Field, {
- // Add functionality to Field's initComponent to enable the change event to bubble
- initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
- this.enableBubble('change');
- }),
-
- // We know that we want Field's events to bubble directly to the FormPanel.
- getBubbleTarget : function() {
- if (!this.formPanel) {
- this.formPanel = this.findParentByType('form');
- }
- return this.formPanel;
- }
-});
-
-var myForm = new Ext.formPanel({
- title: 'User Details',
- items: [{
- ...
- }],
- listeners: {
- change: function() {
- // Title goes red if form has been modified.
- myForm.header.setStyle('color', 'red');
- }
- }
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present....Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget()
if present. There is no implementation in the Observable base class.
+This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.
+Example:
Ext.override(Ext.form.Field, {
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
+ }
+ }
});
Parameters:events
: String/ArrayThe event name to bubble, or an Array of event names.
Returns:- void
Observable expand( Boolean animate
)
:
Ext.PanelExpands the panel body so that it becomes visible. Fires the beforeexpand event which will
@@ -1126,9 +1129,11 @@ the default), or true to check whether this Component is directly of the specifi
:
Ext.ContainerFind a container above this component at any level by a custom function. If the passed function returns
true, the con...Find a container above this component at any level by a custom function. If the passed function returns
-true, the container will be returned.Parameters:fn
: FunctionThe custom function to call with the arguments (container, this component).
Returns:Ext.Container
The first Container for which the custom function returns true
Component findParentByType( String/Class xtype
)
+true, the container will be returned.Parameters:fn
: FunctionThe custom function to call with the arguments (container, this component).
Returns:Ext.Container
The first Container for which the custom function returns true
Component findParentByType( String/Ext.Component/Class xtype
, [Boolean shallow
] )
:
- Ext.ContainerFind a container above this component at any level by xtype or classFind a container above this component at any level by xtype or classParameters:xtype
: String/ClassThe xtype string for a component, or the class of the component directly
Returns:Ext.Container
The first Container which matches the given xtype or class
Component fireEvent( String eventName
, Object... args
)
+ Ext.ContainerFind a container above this component at any level by xtype or classFind a container above this component at any level by xtype or classParameters:xtype
: String/Ext.Component/ClassThe xtype to check for this Component. Note that the the component can either be an instance
+or a component class:shallow
: Boolean(optional) False to check whether this Component is descended from the xtype (this is
+the default), or true to check whether this Component is directly of the specified xtype.
Returns:Ext.Container
The first Container which matches the given xtype or class
Component fireEvent( String eventName
, Object... args
)
:
BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse...Fires the specified event with the passed parameters (minus the event name).
@@ -1172,7 +1177,9 @@ or use a render listener directly:new Ext.Panel({
},
single: true // Remove the listener after first invocation
}
-});
Parameters:- None.
Returns:Ext.Element
The Element which encapsulates this Component.
Component getFrameHeight()
+});Parameters:- None.
Returns:Ext.Element
The Element which encapsulates this Component.
Component getFooterToolbar()
+ :
+ Ext.Toolbar Panel getFrameHeight()
:
NumberReturns the height in pixels of the framing elements of this panel (including any top and bottom bars and
header and ...Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and
@@ -1274,7 +1281,7 @@ property to the registered type of the Component wanted.
For a list of all available xtypes, see Ext.Component.Returns:Ext.Component
component The Component (or config object) that was
inserted with the Container's default config values applied.
Container isVisible()
:
- BooleanReturns true if this component is visible.Returns true if this component is visible.Parameters:- None.
Returns:Boolean
True if this component is visible, false otherwise.
Component isXType( String xtype
, [Boolean shallow
] )
+ BooleanReturns true if this component is visible.Returns true if this component is visible.Parameters:- None.
Returns:Boolean
True if this component is visible, false otherwise.
Component isXType( String/Ext.Component/Class xtype
, [Boolean shallow
] )
:
BooleanTests whether or not this Component is of a specific xtype. This can test whether this Component is descended
from th...Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended
@@ -1286,7 +1293,11 @@ to participate in determination of inherited xtypes.
var t = new Ext.form.TextField();
var isText = t.isXType('textfield'); // true
var isBoxSubclass = t.isXType('box'); // true, descended from BoxComponent
-var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
Parameters:xtype
: StringThe xtype to check for this Componentshallow
: Boolean(optional) False to check whether this Component is descended from the xtype (this is
+var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instanceParameters:xtype
: String/Ext.Component/ClassThe xtype to check for this Component. Note that the the component can either be an instance
+or a component class:
+var c = new Ext.Component();
+console.log(c.isXType(c));
+console.log(c.isXType(Ext.Component));
shallow
: Boolean(optional) False to check whether this Component is descended from the xtype (this is
the default), or true to check whether this Component is directly of the specified xtype.
Returns:Boolean
True if this component descends from the specified xtype, false otherwise.
Component load( Object/String/Function config
)
:
Ext.PanelLoads this content panel immediately with content returned from an XHR call.Loads this content panel immediately with content returned from an XHR call.Parameters:config
: Object/String/FunctionA config object containing any of the following options:
@@ -1379,10 +1390,10 @@ events fired during event suspension will be sent to any listeners now.Sets the overflow on the content element of the component.Sets the overflow on the content element of the component.Parameters:scroll
: BooleanTrue to allow the Component to auto scroll.
Returns:Ext.BoxComponent
this
BoxComponent setDisabled( Boolean disabled
)
:
- Ext.ComponentConvenience function for setting disabled/enabled by boolean.Convenience function for setting disabled/enabled by boolean.Parameters:disabled
: Boolean
Returns:Ext.Component
this
Component setHeight( Number height
)
+ Ext.ComponentConvenience function for setting disabled/enabled by boolean.Convenience function for setting disabled/enabled by boolean.Parameters:disabled
: Boolean
Returns:Ext.Component
this
Component setHeight( Mixed height
)
:
- Ext.BoxComponentSets the height of the component. This method fires the resize event.Sets the height of the component. This method fires the resize event.Parameters:height
: NumberThe new height to set. This may be one of:
-- A Number specifying the new height in the Element's Ext.Element.defaultUnits (by default, pixels).
+ Ext.BoxComponentSets the height of the component. This method fires the resize event.Sets the height of the component. This method fires the resize event.Parameters:height
: MixedThe new height to set. This may be one of:
+- A Number specifying the new height in the Element's defaultUnits (by default, pixels).
- A String used to set the CSS height style.
- undefined to leave the height unchanged.
Returns:Ext.BoxComponent
this
BoxComponent setIconClass( String cls
)
@@ -1419,10 +1430,10 @@ In order to be able to set the title, a header eleme... Panel setVisible( Boolean visible
)
:
- Ext.ComponentConvenience function to hide or show this component by boolean.Convenience function to hide or show this component by boolean.Parameters:visible
: BooleanTrue to show, false to hide
Returns:Ext.Component
this
Component setWidth( Number width
)
+ Ext.ComponentConvenience function to hide or show this component by boolean.Convenience function to hide or show this component by boolean.Parameters:visible
: BooleanTrue to show, false to hide
Returns:Ext.Component
this
Component setWidth( Mixed width
)
:
- Ext.BoxComponentSets the width of the component. This method fires the resize event.Sets the width of the component. This method fires the resize event.Parameters:width
: NumberThe new width to setThis may be one of:
-- A Number specifying the new width in the Element's Ext.Element.defaultUnits (by default, pixels).
+ Ext.BoxComponentSets the width of the component. This method fires the resize event.Sets the width of the component. This method fires the resize event.Parameters:width
: MixedThe new width to set. This may be one of:
+- A Number specifying the new width in the Element's defaultUnits (by default, pixels).
- A String used to set the CSS width style.
Returns:Ext.BoxComponent
this
BoxComponent show()
: