Creates draggable splitter bar functionality from two elements.
Usage:
var split = new YAHOO.ext.SplitBar('elementToDrag', 'elementToSize',
YAHOO.ext.SplitBar.HORIZONTAL, YAHOO.ext.SplitBar.LEFT);
split.setAdapter(new YAHOO.ext.SplitBar.AbsoluteLayoutAdapter("container"));
split.minSize = 100;
split.maxSize = 600;
split.animate = true;
split.onMoved.subscribe(splitterMoved);
|
SplitBar(String/HTMLElement/Element dragElement , String/HTMLElement/Element resizingElement , [Number orientation ], [Number placement ]) |
SplitBar |
Create a new SplitBar |
|
addListener(String eventName , Function handler , [Object scope ], [boolean override ]) : void |
Observable |
Appends an event handler to this component |
|
bufferedListener(String eventName , Function handler , [Object scope ], [Number millis ]) : Function |
Observable |
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specifie... |
|
delayedListener(String eventName , Function handler , [Object scope ], [Number delay ]) : Function |
Observable |
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for e... |
|
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 |
|
on(String eventName , Function handler , [Object scope ], [boolean override ]) : 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 |
animate
public Boolean animate
Whether to animate the transition to the new size
This property is defined by SplitBar.
maxSize
public Number maxSize
The maximum size of the resizing element. (Defaults to 2000)
This property is defined by SplitBar.
minSize
public Number minSize
The minimum size of the resizing element. (Defaults to 0)
This property is defined by SplitBar.
useShim
public Boolean useShim
Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes.
This property is defined by SplitBar.
addListener
public function addListener(String eventName
, Function handler
, [Object scope
], [boolean override
])
Appends an event handler to this component
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
override
: boolean(optional) If true, scope becomes the scope
Returns:
bufferedListener
public function bufferedListener(String eventName
, Function handler
, [Object scope
], [Number millis
])
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specified time-frame, only the last one actually fires.
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
millis
: Number(optional) The number of milliseconds to buffer (defaults to 250)
Returns:
delayedListener
public function delayedListener(String eventName
, Function handler
, [Object scope
], [Number delay
])
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for events that modify the DOM and need to wait for the browser to catch up.
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
delay
: Number(optional) The number of milliseconds to delay (defaults to 1 millisecond)
Returns:
destroy
public function destroy(Boolean removeEl
)
This method is defined by SplitBar.
fireEvent
public function fireEvent(String eventName
, Object... args
)
Fires the specified event with the passed parameters (minus the event name).
getAdapter
public function getAdapter()
Get the adapter this SplitBar uses
This method is defined by SplitBar.
getMaximumSize
public function getMaximumSize()
Gets the maximum size for the resizing element
This method is defined by SplitBar.
getMinimumSize
public function getMinimumSize()
Gets the minimum size for the resizing element
This method is defined by SplitBar.
on
public function on(String eventName
, Function handler
, [Object scope
], [boolean override
])
Appends an event handler to this element (shorthand for addListener)
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
override
: boolean(optional) If true, scope becomes the scope
Returns:
purgeListeners
public function purgeListeners()
Removes all listeners for this object
removeListener
public function removeListener(String eventName
, Function handler
, [Object scope
])
setAdapter
public function setAdapter(Object adapter
)
Set the adapter this SplitBar uses
This method is defined by SplitBar.
setCurrentSize
public function setCurrentSize(Number size
)
Sets the initialize size for the resizing element
Parameters:
size
: NumberThe initial size
Returns:
This method is defined by SplitBar.
setMaximumSize
public function setMaximumSize(Number maxSize
)
Sets the maximum size for the resizing element
Parameters:
maxSize
: NumberThe maximum size
Returns:
This method is defined by SplitBar.
setMinimumSize
public function setMinimumSize(Number minSize
)
Sets the minimum size for the resizing element
Parameters:
minSize
: NumberThe minimum size
Returns:
This method is defined by SplitBar.