Package: | Ext |
Class: | SplitBar |
Extends: | Observable |
Defined In: | SplitBar.js |
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);
Property | Defined By | |
---|---|---|
animate : Boolean | SplitBar | |
Whether to animate the transition to the new size | ||
maxSize : Number | SplitBar | |
The maximum size of the resizing element. (Defaults to 2000) | ||
minSize : Number | SplitBar | |
The minimum size of the resizing element. (Defaults to 0) | ||
useShim : Boolean | SplitBar | |
Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes. |
Method | Defined By | |
---|---|---|
SplitBar(String/HTMLElement/Element dragElement , String/HTMLElement/Element resizingElement , [Number orientation ], [Number placement ]) |
SplitBar | |
Create a new SplitBar | ||
addEvents(Object object ) : void |
Observable | |
Copies any events from the passed object onto this object if they do not already exist. The passed object must also ... | ||
addListener(String eventName , Function handler , [Object scope ], [Object options ]) : void |
Observable | |
Appends an event handler to this component | ||
destroy(Boolean removeEl ) : void |
SplitBar | |
Destroy this splitbar. | ||
fireEvent(String eventName , Object... args ) : Boolean |
Observable | |
Fires the specified event with the passed parameters (minus the event name). | ||
getAdapter() : The | SplitBar | |
Get the adapter this SplitBar uses | ||
getMaximumSize() : Number | SplitBar | |
Gets the maximum size for the resizing element | ||
getMinimumSize() : Number | SplitBar | |
Gets the minimum size for the resizing element | ||
hasListener(String eventName ) : Boolean |
Observable | |
Checks to see if this object is currently listening for a specified event | ||
on(String eventName , Function handler , [Object options ]) : void |
Observable | |
Appends an event handler to this element (shorthand for addListener) | ||
purgeListeners() : void | Observable | |
Removes all listeners for this object | ||
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable | |
Removes a listener | ||
setAdapter(Object adapter ) : void |
SplitBar | |
Set the adapter this SplitBar uses | ||
setCurrentSize(Number size ) : void |
SplitBar | |
Sets the initialize size for the resizing element | ||
setMaximumSize(Number maxSize ) : void |
SplitBar | |
Sets the maximum size for the resizing element | ||
setMinimumSize(Number minSize ) : void |
SplitBar | |
Sets the minimum size for the resizing element | ||
un(String eventName , Function handler , [Object scope ]) : void |
Observable | |
Removes a listener (shorthand for removeListener) |
Event | Defined By | |
---|---|---|
beforeresize : (Ext.SplitBar this ) |
SplitBar | |
Fires before the splitter is dragged | ||
moved : (Ext.SplitBar this , Number newSize ) |
SplitBar | |
Fires when the splitter is moved | ||
resize : (Ext.SplitBar this , Number newSize ) |
SplitBar | |
Fires when the splitter is moved (alias for moved) |
public Boolean animate
public Number maxSize
public Number minSize
public Boolean useShim
public function SplitBar(String/HTMLElement/Element dragElement
, String/HTMLElement/Element resizingElement
, [Number orientation
], [Number placement
])
dragElement
: String/HTMLElement/ElementresizingElement
: String/HTMLElement/Elementorientation
: Numberplacement
: Numberpublic function addEvents(Object object
)
object
: Objectvoid
public function addListener(String eventName
, Function handler
, [Object scope
], [Object options
])
eventName
: Stringhandler
: Functionscope
: Objectoptions
: Object Combining Options
Using the options argument, it is possible to combine different types of listeners:
A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
el.on('click', this.onClick, this, { single: true, delay: 100, stopEvent : true, forumId: 4 });
The method also allows for a single argument to be passed which is a config object containing properties which specify multiple handlers.
Attaching multiple handlers in 1 call
Code:
el.on({ 'click' : { fn: this.onClick scope: this, delay: 100 }, 'mouseover' : { fn: this.onMouseOver scope: this }, 'mouseout' : { fn: this.onMouseOut scope: this } });
Or a shorthand syntax:
Code:
el.on({ 'click' : this.onClick, 'mouseover' : this.onMouseOver, 'mouseout' : this.onMouseOut scope: this });
void
public function destroy(Boolean removeEl
)
removeEl
: Booleanvoid
public function fireEvent(String eventName
, Object... args
)
eventName
: Stringargs
: Object...Boolean
public function getAdapter()
The
public function getMaximumSize()
Number
public function getMinimumSize()
Number
public function hasListener(String eventName
)
eventName
: StringBoolean
public function on(String eventName
, Function handler
, [Object options
])
eventName
: Stringhandler
: Functionoptions
: Objectvoid
public function purgeListeners()
void
public function removeListener(String eventName
, Function handler
, [Object scope
])
eventName
: Stringhandler
: Functionscope
: Objectvoid
public function setAdapter(Object adapter
)
adapter
: Objectvoid
public function setCurrentSize(Number size
)
size
: Numbervoid
public function setMaximumSize(Number maxSize
)
maxSize
: Numbervoid
public function setMinimumSize(Number minSize
)
minSize
: Numbervoid
public function un(String eventName
, Function handler
, [Object scope
])
eventName
: Stringhandler
: Functionscope
: Objectvoid
public event beforeresize
this
: Ext.SplitBarpublic event moved
this
: Ext.SplitBarnewSize
: Numberpublic event resize
this
: Ext.SplitBarnewSize
: Number