X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/output/Ext.SplitBar.html diff --git a/docs/output/Ext.SplitBar.html b/docs/output/Ext.SplitBar.html index 2df34651..32f15525 100644 --- a/docs/output/Ext.SplitBar.html +++ b/docs/output/Ext.SplitBar.html @@ -1,12 +1,12 @@ -
Observable SplitBar
Package: | Ext |
Defined In: | SplitBar.js |
Class: | SplitBar |
Extends: | Observable |
var split = new Ext.SplitBar("elementToDrag", "elementToSize",
- Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT);
-split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container"));
-split.minSize = 100;
-split.maxSize = 600;
-split.animate = true;
+Observable
SplitBar
Class Ext.SplitBar
Package: Ext Defined In: SplitBar.js Class: SplitBar Extends: Observable
Creates draggable splitter bar functionality from two elements (element to be dragged and element to be resized).
+
+Usage:
+var split = new Ext.SplitBar("elementToDrag", "elementToSize",
+ Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT);
+split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container"));
+split.minSize = 100;
+split.maxSize = 600;
+split.animate = true;
split.on('moved', splitterMoved);
Config Options
Config Options Defined By listeners : ObjectA config object containing one or more event handlers to be added to this
object during initialization. This should ...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
@@ -63,11 +63,13 @@ Ext.DomObserver = Ext.extend(Object, {
mode: 'local',
triggerAction: 'all'
});
Observable
Public Properties
Property Defined By animate : BooleanWhether to animate the transition to the new size SplitBar maxSize : NumberThe maximum size of the resizing element. (Defaults to 2000) SplitBar minSize : NumberThe minimum size of the resizing element. (Defaults to 0) SplitBar tickSize : NumberThe increment, in pixels by which to move this SplitBar. When undefined, the SplitBar moves smoothly. SplitBar useShim : BooleanWhether to create a transparent shim that overlays the page when dragging, enables dragging across iframes. SplitBar
Public Methods
Method Defined By SplitBar( Mixed dragElement
, Mixed resizingElement
, [Number orientation
], [Number placement
] )
- Create a new SplitBarCreate a new SplitBarParameters:dragElement
: MixedThe element to be dragged and act as the SplitBar.resizingElement
: MixedThe element to be resized based on where the SplitBar element is draggedorientation
: Number(optional) Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)placement
: Number(optional) Either Ext.SplitBar.LEFT or Ext.SplitBar.RIGHT for horizontal or
- Ext.SplitBar.TOP or Ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the initial
- position of the SplitBar).
Returns:- void
SplitBar addEvents( Object object
)
+ Create a new SplitBarCreate a new SplitBarParameters:dragElement
: MixedThe element to be dragged and act as the SplitBar.resizingElement
: MixedThe element to be resized based on where the SplitBar element is draggedorientation
: Number(optional) Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)placement
: Number(optional) Either Ext.SplitBar.LEFT or Ext.SplitBar.RIGHT for horizontal or
+ Ext.SplitBar.TOP or Ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the initial
+ position of the SplitBar).
Returns:- void
SplitBar addEvents( Object|String o
, string Optional.
)
:
- voidUsed to define events on this ObservableUsed to define events on this ObservableParameters:object
: ObjectThe object with the events defined
Returns:- void
Observable addListener( String eventName
, Function handler
, [Object scope
], [Object options
] )
+ voidAdds the specified events to the list of events which this Observable may fire.Adds the specified events to the list of events which this Observable may fire.Parameters:o
: Object|StringEither an object with event names as properties with a value of true
+or the first event name string if multiple event names are being passed as separate parameters.Optional.
: stringEvent name if multiple event names are being passed as separate parameters.
+Usage:this.addEvents('storeloaded', 'storecleared');
Returns:- void
Observable addListener( String eventName
, Function handler
, [Object scope
], [Object options
] )
:
voidAppends an event handler to this object.Appends an event handler to this object.Parameters:eventName
: StringThe name of the event to listen for.handler
: FunctionThe method the event invokes.scope
: Object(optional) The scope (this
reference) in which the handler function is executed.
If omitted, defaults to the object which fired the event.options
: Object(optional) An object containing handler configuration.
@@ -88,8 +90,8 @@ Using the options argument, it is possible to combine different types of listene
A delayed, one-time listener.
myDataView.on('click', this.onClick, this, {
- single: true,
- delay: 100
+single: true,
+delay: 100
});
Attaching multiple handlers in 1 call
@@ -97,32 +99,64 @@ The method also allows for a single argument to be passed which is a config obje
which specify multiple handlers.
myGridPanel.on({
- 'click' : {
- fn: this.onClick,
- scope: this,
- delay: 100
- },
- 'mouseover' : {
- fn: this.onMouseOver,
- scope: this
- },
- 'mouseout' : {
- fn: this.onMouseOut,
- scope: this
- }
+'click' : {
+ fn: this.onClick,
+ scope: this,
+ delay: 100
+},
+'mouseover' : {
+ fn: this.onMouseOver,
+ scope: this
+},
+'mouseout' : {
+ fn: this.onMouseOut,
+ scope: this
+}
});
Or a shorthand syntax:
myGridPanel.on({
- 'click' : this.onClick,
- 'mouseover' : this.onMouseOver,
- 'mouseout' : this.onMouseOut,
- scope: this
+'click' : this.onClick,
+'mouseover' : this.onMouseOver,
+'mouseout' : this.onMouseOut,
+ scope: this
});
Returns:- void
Observable destroy( Boolean removeEl
)
:
- voidDestroy this splitbar.Destroy this splitbar.Parameters:removeEl
: BooleanTrue to remove the element
Returns:- void
SplitBar enableBubble( Object events
)
- :
- voidUsed to enable bubbling of eventsUsed to enable bubbling of eventsParameters:events
: Object
Returns:- void
Observable fireEvent( String eventName
, Object... args
)
+ voidDestroy this splitbar.Destroy this splitbar.Parameters:removeEl
: BooleanTrue to remove the element
Returns:- void
SplitBar 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');
+ }
+ }
+});
Parameters:events
: String/ArrayThe event name to bubble, or an Array of event names.
Returns:- void
Observable 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).