2081 lines
No EOL
116 KiB
HTML
2081 lines
No EOL
116 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>YAHOO.widget.Slider</title>
|
|
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
|
|
</head>
|
|
<body>
|
|
<div class="body-wrap">
|
|
<div class="top-tools"><img src="../resources/print.gif" width="16" height="16" align="absmiddle"> <a href="YAHOO.widget.Slider.html" target="_blank">Print Friendly</a></div>
|
|
<h1>Class YAHOO.widget.Slider</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>YAHOO.widget</td></tr>
|
|
<tr><td class="label">Class:</td><td>Slider</td></tr>
|
|
<tr><td class="label">Extends:</td><td><a href="YAHOO.util.DragDrop.html">DragDrop</a></td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="slider.js.html">slider.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
A DragDrop implementation that can be used as a background for a
|
|
slider. It takes a reference to the thumb instance
|
|
so it can delegate some of the events to it. The goal is to make the
|
|
thumb jump to the location on the background when the background is
|
|
clicked. </div>
|
|
<hr />
|
|
<a name="properties"></a>
|
|
<h2>Public Properties</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Property</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#ANIM_AVAIL<static>">ANIM_AVAIL<static></a> : boolean</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"><static> By default, animation is available if the animation library is detected.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#animate">animate</a> : boolean</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Flag that determines if the thumb will animate when moved</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#animationDuration">animationDuration</a> : int</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">If animation is configured, specifies the length of the animation
|
|
in seconds.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#available">available</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#available">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">The availabe property is false until the linked dom element is accessible.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#backgroundEnabled">backgroundEnabled</a> : boolean</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Set to false to disable a background click thumb move</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#baselinePos">baselinePos</a> : [int,</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">The basline position of the background element, used
|
|
to determine if the background has moved since the last
|
|
operation.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config">config</a> : object</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#config">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Configuration attributes passed into the constructor</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#enableKeys">enableKeys</a> : boolean</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Enables the arrow, home and end keys, defaults to true.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#groups">groups</a> : string:</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#groups">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The group defines a logical collection of DragDrop objects that are
|
|
related. Instances only get events when interact...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#hasOuterHandles">hasOuterHandles</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#hasOuterHandles">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">By default, drags can only be initiated if the mousedown occurs in the
|
|
region the linked element is. This is done in...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#id">id</a> : String</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#id">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The id of the element associated with this object. This is what we
|
|
refer to as the "linked element" because the size...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#invalidHandleClasses">invalidHandleClasses</a> : string[]</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#invalidHandleClasses">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An indexted array of css class names for elements that will be ignored
|
|
if clicked.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#invalidHandleIds">invalidHandleIds</a> : string:</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#invalidHandleIds">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An associative array of ids for elements that will be ignored if clicked</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#invalidHandleTypes">invalidHandleTypes</a> : string:</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#invalidHandleTypes">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An associative array of HTML tags that will be ignored if clicked.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#keyIncrement">keyIncrement</a> : int</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Specifies the number of pixels the arrow keys will move the slider.
|
|
Default is 25.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#maintainOffset">maintainOffset</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#maintainOffset">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Maintain offsets when we resetconstraints. Set to true when you want
|
|
the position of the element relative to its par...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#moveComplete">moveComplete</a> : Boolean</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">moveComplete is set to true when the slider has moved to its final
|
|
destination. For animated slider, this value can ...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#primaryButtonOnly">primaryButtonOnly</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#primaryButtonOnly">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">By default the drag and drop instance will only respond to the primary
|
|
button click (left button for a right-handed m...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#thumb">thumb</a> : YAHOO.widget.SliderThumb</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">A YAHOO.widget.SliderThumb instance that we will use to
|
|
reposition the thumb when the background is clicked</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#thumbCenterPoint">thumbCenterPoint</a> : "x":</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">The center of the slider element is stored so we can position
|
|
place it in the correct position when the background i...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#tickPause">tickPause</a> : int</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Adjustment factor for tick animation, the more ticks, the
|
|
faster the animation (by default)</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#type">type</a> : string</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">The type of the slider (horiz, vert, region)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#xTicks">xTicks</a> : int[]</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#xTicks">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Array of pixel locations the element will snap to if we specified a
|
|
horizontal graduation/interval. This array is ge...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#yTicks">yTicks</a> : int[]</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#yTicks">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Array of pixel locations the element will snap to if we specified a
|
|
vertical graduation/interval. This array is gene...</td>
|
|
</tr>
|
|
</table>
|
|
<a name="methods"></a>
|
|
<h2>Public Methods</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Method</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#Slider">Slider</a>(<code>String id</code>, <code>String sGroup</code>, <code>String sType</code>)</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addInvalidHandleClass">addInvalidHandleClass</a>(<code>string cssClass</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#addInvalidHandleClass">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Lets you specify a css class of elements that will not initiate a drag</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addInvalidHandleId">addInvalidHandleId</a>(<code>string id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#addInvalidHandleId">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Lets you to specify an element id for a child of a drag handle
|
|
that should not initiate a drag</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addInvalidHandleType">addInvalidHandleType</a>(<code>string tagName</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#addInvalidHandleType">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Allows you to specify a tag name that should not start a drag operation
|
|
when clicked. This is designed to facilitate...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addToGroup">addToGroup</a>(<code>sGroup {string}</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#addToGroup">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Add this instance to a group of related drag/drop objects. All
|
|
instances belong to at least one group, and can belon...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#applyConfig">applyConfig</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#applyConfig">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Applies the configuration parameters that were passed into the constructor.
|
|
This is supposed to happen at each level ...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#clearConstraints">clearConstraints</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#clearConstraints">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Clears any constraints applied to this instance. Also clears ticks
|
|
since they can't exist independent of a constrain...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#clearTicks">clearTicks</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#clearTicks">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Clears any tick interval defined for this instance</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#endDrag">endDrag</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#endDrag">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Fired when we are done dragging the object</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getDragEl">getDragEl</a>() : HTMLElement</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#getDragEl">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns a reference to the actual element to drag. By default this is
|
|
the same as the html element, but it can be as...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getEl">getEl</a>() : HTMLElement</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#getEl">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns a reference to the linked element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getHorizSlider<static>">getHorizSlider<static></a>(<code>String sBGElId</code>, <code>String sHandleElId</code>, <code>int iLeft</code>, <code>int iRight</code>, <code>int iTickSize</code>) : Slider</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc"><static> Factory method for creating a horizontal slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getSliderRegion<static>">getSliderRegion<static></a>(<code>String sBGElId</code>, <code>String sHandleElId</code>, <code>int iLeft</code>, <code>int iRight</code>, <code>int iUp</code>, <code>int iDown</code>, <code>int iTickSize</code>) : Slider</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"><static> Factory method for creating a slider region like the one in the color
|
|
picker example</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getThumb">getThumb</a>() : SliderThumb</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns a reference to this slider's thumb</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getValue">getValue</a>() : int</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns the slider's thumb offset from the start position</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getVertSlider<static>">getVertSlider<static></a>(<code>String sBGElId</code>, <code>String sHandleElId</code>, <code>int iUp</code>, <code>int iDown</code>, <code>int iTickSize</code>) : Slider</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc"><static> Factory method for creating a vertical slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getXValue">getXValue</a>() : int</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns the slider's thumb X offset from the start position</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getYValue">getYValue</a>() : int</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns the slider's thumb Y offset from the start position</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#init">init</a>(<code>id the</code>, <code>String sGroup</code>, <code>object config</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#init">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Sets up the DragDrop object. Must be called in the constructor of any
|
|
YAHOO.util.DragDrop subclass</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#initTarget">initTarget</a>(<code>id the</code>, <code>String sGroup</code>, <code>object config</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#initTarget">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Initializes Targeting functionality only... the object does not
|
|
get a mousedown handler.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#isLocked">isLocked</a>() : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#isLocked">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns true if this instance is locked, or the drag drop mgr is locked
|
|
(meaning that all drag/drop is disabled on th...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#isTarget">isTarget</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#isTarget">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">By default, all insances can be a drop target. This can be disabled by
|
|
setting isTarget to false.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#isValidHandleChild">isValidHandleChild</a>(<code>HTMLElement node</code>) : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#isValidHandleChild">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Checks the tag exclusion list to see if this click should be ignored</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#lock">lock</a>() : void</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Locks the slider, overrides YAHOO.util.DragDrop</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onAvailable">onAvailable</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onAvailable">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Override the onAvailable method to do what is needed after the initial
|
|
position was determined.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onChange">onChange</a>(<code>int firstOffset</code>, <code>int secondOffset</code>) : void</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc"><b>Deprecated.</b> Event that fires when the value of the slider has changed</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDrag">onDrag</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onDrag">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Abstract method called during the onMouseMove event while dragging an
|
|
object.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDragDrop">onDragDrop</a>(<code>Event e</code>, <code>String|DragDrop[] id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onDragDrop">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Abstract method called when this item is dropped on another DragDrop
|
|
obj</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDragEnter">onDragEnter</a>(<code>Event e</code>, <code>String|DragDrop[] id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onDragEnter">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Abstract method called when this element fist begins hovering over
|
|
another DragDrop obj</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDragOut">onDragOut</a>(<code>Event e</code>, <code>String|DragDrop[] id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onDragOut">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Abstract method called when we are no longer hovering over an element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDragOver">onDragOver</a>(<code>Event e</code>, <code>String|DragDrop[] id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onDragOver">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Abstract method called when this element is hovering over another
|
|
DragDrop obj</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onInvalidDrop">onInvalidDrop</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onInvalidDrop">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Abstract method called when this item is dropped on an area with no
|
|
drop target</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onMouseDown">onMouseDown</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onMouseDown">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Event handler that fires when a drag/drop obj gets a mousedown</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onMouseUp">onMouseUp</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#onMouseUp">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Event handler that fires when a drag/drop obj gets a mouseup</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onSlideStart">onSlideStart</a>() : void</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"><b>Deprecated.</b> Event that fires when the at the beginning of the slider thumb move</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onSliderEnd">onSliderEnd</a>() : void</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc"><b>Deprecated.</b> Event that fires at the end of a slider thumb move</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#padding">padding</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#padding">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The padding configured for this drag and drop object for calculating
|
|
the drop zone intersection with this object.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeFromGroup">removeFromGroup</a>(<code>string sGroup</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#removeFromGroup">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Remove's this instance from the supplied interaction group</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeInvalidHandleClass">removeInvalidHandleClass</a>(<code>string cssClass</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#removeInvalidHandleClass">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Unsets an invalid css class</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeInvalidHandleId">removeInvalidHandleId</a>(<code>string id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#removeInvalidHandleId">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Unsets an invalid handle id</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeInvalidHandleType">removeInvalidHandleType</a>(<code>string tagName</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#removeInvalidHandleType">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Unsets an excluded tag name set by addInvalidHandleType</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#resetConstraints">resetConstraints</a>(<code>boolean maintainOffset</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#resetConstraints">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">resetConstraints must be called if you manually reposition a dd element.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setDragElId">setDragElId</a>(<code>id {string}</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#setDragElId">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Allows you to specify that an element other than the linked element
|
|
will be moved with the cursor during a drag</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setHandleElId">setHandleElId</a>(<code>id {string}</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#setHandleElId">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Allows you to specify a child of the linked element that should be
|
|
used to initiate the drag operation. An example o...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setInitialPosition">setInitialPosition</a>(<code>int diffX</code>, <code>int diffY</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#setInitialPosition">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Stores the initial placement of the linked element.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setOuterHandleElId">setOuterHandleElId</a>(<code>id the</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#setOuterHandleElId">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Allows you to set an element outside of the linked element as a drag
|
|
handle</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setPadding">setPadding</a>(<code>int iTop</code>, <code>int iRight</code>, <code>int iBot</code>, <code>int iLeft</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#setPadding">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Configures the padding for the target zone in px. Effectively expands
|
|
(or reduces) the virtual object size for targe...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setRegionValue">setRegionValue</a>(<code>int newOffset</code>, <code>int newOffset2</code>, <code>boolean skipAnim</code>, <code>boolean force</code>) : boolean</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Provides a way to set the value of the region slider in code.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setSliderStartState">setSliderStartState</a>() : void</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Initialization that sets up the value offsets once the elements are ready</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setThumbCenterPoint">setThumbCenterPoint</a>() : void</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">When the thumb is available, we cache the centerpoint of the element so
|
|
we can position the element correctly when th...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setValue">setValue</a>(<code>int newOffset</code>, <code>boolean skipAnim</code>, <code>boolean force</code>) : boolean</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Provides a way to set the value of the slider in code.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setXConstraint">setXConstraint</a>(<code>int iLeft</code>, <code>int iRight</code>, <code>int iTickSize</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#setXConstraint">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">By default, the element can be dragged any place on the screen. Use
|
|
this method to limit the horizontal travel of th...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setYConstraint">setYConstraint</a>(<code>int iUp</code>, <code>int iDown</code>, <code>int iTickSize</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#setYConstraint">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">By default, the element can be dragged any place on the screen. Set
|
|
this to limit the vertical travel of the element...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#startDrag">startDrag</a>(<code>int X</code>, <code>int Y</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#startDrag">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Abstract method called after a drag/drop object is clicked
|
|
and the drag or mousedown time thresholds have beeen met.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#toString">toString</a>() : string</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Slider toString</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#unlock">unlock</a>() : void</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Unlocks the slider, overrides YAHOO.util.DragDrop</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#unreg">unreg</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="YAHOO.util.DragDrop.html#unreg">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Remove all drag and drop hooks for this element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#verifyOffset">verifyOffset</a>() : boolean</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Checks the background position element position. If it has moved from the
|
|
baseline position, the constraints for the...</td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Event</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-change">change</a> : (<code>int new</code>, <code>int firstOffset</code>, <code>int secondOffset</code>)</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Event the fires when the value of the control changes. If
|
|
the control is animated the event will fire every point
|
|
a...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-slideEnd
|
|
">slideEnd
|
|
</a> : ()</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Event that fires at the end of a slider thumb move</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-slideStart
|
|
">slideStart
|
|
</a> : ()</td>
|
|
<td class="msource" rowspan="2">Slider</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Event that fires at the end of a slider thumb move.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2 class="mdetail-head">Property Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="ANIM_AVAIL<static>"></a>
|
|
<div class="mdetail">
|
|
<h3>ANIM_AVAIL<static></i></h3>
|
|
<code>public boolean ANIM_AVAIL<static></code>
|
|
<div class="mdetail-desc">
|
|
<static> By default, animation is available if the animation library is detected. </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="animate"></a>
|
|
<div class="mdetail alt">
|
|
<h3>animate</i></h3>
|
|
<code>public boolean animate</code>
|
|
<div class="mdetail-desc">
|
|
Flag that determines if the thumb will animate when moved </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="animationDuration"></a>
|
|
<div class="mdetail">
|
|
<h3>animationDuration</i></h3>
|
|
<code>public int animationDuration</code>
|
|
<div class="mdetail-desc">
|
|
If animation is configured, specifies the length of the animation
|
|
in seconds. </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="available"></a>
|
|
<div class="mdetail alt">
|
|
<h3>available</i></h3>
|
|
<code>public boolean available</code>
|
|
<div class="mdetail-desc">
|
|
The availabe property is false until the linked dom element is accessible. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#available">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="backgroundEnabled"></a>
|
|
<div class="mdetail">
|
|
<h3>backgroundEnabled</i></h3>
|
|
<code>public boolean backgroundEnabled</code>
|
|
<div class="mdetail-desc">
|
|
Set to false to disable a background click thumb move </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="baselinePos"></a>
|
|
<div class="mdetail alt">
|
|
<h3>baselinePos</i></h3>
|
|
<code>public [int, baselinePos</code>
|
|
<div class="mdetail-desc">
|
|
The basline position of the background element, used
|
|
to determine if the background has moved since the last
|
|
operation. </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="config"></a>
|
|
<div class="mdetail">
|
|
<h3>config</i></h3>
|
|
<code>public object config</code>
|
|
<div class="mdetail-desc">
|
|
Configuration attributes passed into the constructor </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#config">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="enableKeys"></a>
|
|
<div class="mdetail alt">
|
|
<h3>enableKeys</i></h3>
|
|
<code>public boolean enableKeys</code>
|
|
<div class="mdetail-desc">
|
|
Enables the arrow, home and end keys, defaults to true. </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="groups"></a>
|
|
<div class="mdetail">
|
|
<h3>groups</i></h3>
|
|
<code>public string: groups</code>
|
|
<div class="mdetail-desc">
|
|
The group defines a logical collection of DragDrop objects that are
|
|
related. Instances only get events when interacting with other
|
|
DragDrop object in the same group. This lets us define multiple
|
|
groups using a single DragDrop subclass if we want. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#groups">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="hasOuterHandles"></a>
|
|
<div class="mdetail alt">
|
|
<h3>hasOuterHandles</i></h3>
|
|
<code>public boolean hasOuterHandles</code>
|
|
<div class="mdetail-desc">
|
|
By default, drags can only be initiated if the mousedown occurs in the
|
|
region the linked element is. This is done in part to work around a
|
|
bug in some browsers that mis-report the mousedown if the previous
|
|
mouseup happened outside of the window. This property is set to true
|
|
if outer handles are defined. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#hasOuterHandles">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="id"></a>
|
|
<div class="mdetail">
|
|
<h3>id</i></h3>
|
|
<code>public String id</code>
|
|
<div class="mdetail-desc">
|
|
The id of the element associated with this object. This is what we
|
|
refer to as the "linked element" because the size and position of
|
|
this element is used to determine when the drag and drop objects have
|
|
interacted. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#id">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="invalidHandleClasses"></a>
|
|
<div class="mdetail alt">
|
|
<h3>invalidHandleClasses</i></h3>
|
|
<code>public string[] invalidHandleClasses</code>
|
|
<div class="mdetail-desc">
|
|
An indexted array of css class names for elements that will be ignored
|
|
if clicked. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#invalidHandleClasses">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="invalidHandleIds"></a>
|
|
<div class="mdetail">
|
|
<h3>invalidHandleIds</i></h3>
|
|
<code>public string: invalidHandleIds</code>
|
|
<div class="mdetail-desc">
|
|
An associative array of ids for elements that will be ignored if clicked </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#invalidHandleIds">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="invalidHandleTypes"></a>
|
|
<div class="mdetail alt">
|
|
<h3>invalidHandleTypes</i></h3>
|
|
<code>public string: invalidHandleTypes</code>
|
|
<div class="mdetail-desc">
|
|
An associative array of HTML tags that will be ignored if clicked. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#invalidHandleTypes">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="keyIncrement"></a>
|
|
<div class="mdetail">
|
|
<h3>keyIncrement</i></h3>
|
|
<code>public int keyIncrement</code>
|
|
<div class="mdetail-desc">
|
|
Specifies the number of pixels the arrow keys will move the slider.
|
|
Default is 25. </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="maintainOffset"></a>
|
|
<div class="mdetail alt">
|
|
<h3>maintainOffset</i></h3>
|
|
<code>public boolean maintainOffset</code>
|
|
<div class="mdetail-desc">
|
|
Maintain offsets when we resetconstraints. Set to true when you want
|
|
the position of the element relative to its parent to stay the same
|
|
when the page changes </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#maintainOffset">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="moveComplete"></a>
|
|
<div class="mdetail">
|
|
<h3>moveComplete</i></h3>
|
|
<code>public Boolean moveComplete</code>
|
|
<div class="mdetail-desc">
|
|
moveComplete is set to true when the slider has moved to its final
|
|
destination. For animated slider, this value can be checked in
|
|
the onChange handler to make it possible to execute logic only
|
|
when the move is complete rather than at all points along the way. </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="primaryButtonOnly"></a>
|
|
<div class="mdetail alt">
|
|
<h3>primaryButtonOnly</i></h3>
|
|
<code>public boolean primaryButtonOnly</code>
|
|
<div class="mdetail-desc">
|
|
By default the drag and drop instance will only respond to the primary
|
|
button click (left button for a right-handed mouse). Set to true to
|
|
allow drag and drop to start with any mouse click that is propogated
|
|
by the browser </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#primaryButtonOnly">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="thumb"></a>
|
|
<div class="mdetail">
|
|
<h3>thumb</i></h3>
|
|
<code>public YAHOO.widget.SliderThumb thumb</code>
|
|
<div class="mdetail-desc">
|
|
A YAHOO.widget.SliderThumb instance that we will use to
|
|
reposition the thumb when the background is clicked </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="thumbCenterPoint"></a>
|
|
<div class="mdetail alt">
|
|
<h3>thumbCenterPoint</i></h3>
|
|
<code>public "x": thumbCenterPoint</code>
|
|
<div class="mdetail-desc">
|
|
The center of the slider element is stored so we can position
|
|
place it in the correct position when the background is clicked </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="tickPause"></a>
|
|
<div class="mdetail">
|
|
<h3>tickPause</i></h3>
|
|
<code>public int tickPause</code>
|
|
<div class="mdetail-desc">
|
|
Adjustment factor for tick animation, the more ticks, the
|
|
faster the animation (by default) </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="type"></a>
|
|
<div class="mdetail alt">
|
|
<h3>type</i></h3>
|
|
<code>public string type</code>
|
|
<div class="mdetail-desc">
|
|
The type of the slider (horiz, vert, region) </div>
|
|
<div class="mdetail-def">This property is defined by Slider.</div>
|
|
</div>
|
|
<a name="xTicks"></a>
|
|
<div class="mdetail">
|
|
<h3>xTicks</i></h3>
|
|
<code>public int[] xTicks</code>
|
|
<div class="mdetail-desc">
|
|
Array of pixel locations the element will snap to if we specified a
|
|
horizontal graduation/interval. This array is generated automatically
|
|
when you define a tick interval. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#xTicks">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="yTicks"></a>
|
|
<div class="mdetail alt">
|
|
<h3>yTicks</i></h3>
|
|
<code>public int[] yTicks</code>
|
|
<div class="mdetail-desc">
|
|
Array of pixel locations the element will snap to if we specified a
|
|
vertical graduation/interval. This array is generated automatically
|
|
when you define a tick interval. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="YAHOO.util.DragDrop.html#yTicks">DragDrop</a>.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<a name="Slider"></a>
|
|
<h2 class="mdetail-head">Constructor Details</h2>
|
|
<div class="detail-wrap">
|
|
<div class="mdetail">
|
|
<h3>Slider</i></h3>
|
|
<code>public function Slider(<code>String id</code>, <code>String sGroup</code>, <code>String sType</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>id</code> : String<div class="sub-desc">The id of the element linked to this instance</div></li><li><code>sGroup</code> : String<div class="sub-desc">The group of related DragDrop items</div></li><li><code>sType</code> : String<div class="sub-desc">The type of slider (horiz, vert, region)</div></li> </ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Method Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="addInvalidHandleClass"></a>
|
|
<div class="mdetail">
|
|
<h3>addInvalidHandleClass</i></h3>
|
|
<code>public function addInvalidHandleClass(<code>string cssClass</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Lets you specify a css class of elements that will not initiate a drag
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>cssClass</code> : string<div class="sub-desc">the class of the elements you wish to ignore</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#addInvalidHandleClass">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="addInvalidHandleId"></a>
|
|
<div class="mdetail alt">
|
|
<h3>addInvalidHandleId</i></h3>
|
|
<code>public function addInvalidHandleId(<code>string id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Lets you to specify an element id for a child of a drag handle
|
|
that should not initiate a drag
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>id</code> : string<div class="sub-desc">the element id of the element you wish to ignore</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#addInvalidHandleId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="addInvalidHandleType"></a>
|
|
<div class="mdetail">
|
|
<h3>addInvalidHandleType</i></h3>
|
|
<code>public function addInvalidHandleType(<code>string tagName</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Allows you to specify a tag name that should not start a drag operation
|
|
when clicked. This is designed to facilitate embedding links within a
|
|
drag handle that do something other than start the drag.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>tagName</code> : string<div class="sub-desc">the type of element to exclude</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#addInvalidHandleType">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="addToGroup"></a>
|
|
<div class="mdetail alt">
|
|
<h3>addToGroup</i></h3>
|
|
<code>public function addToGroup(<code>sGroup {string}</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Add this instance to a group of related drag/drop objects. All
|
|
instances belong to at least one group, and can belong to as many
|
|
groups as needed.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>{string}</code> : sGroup<div class="sub-desc">the name of the group</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#addToGroup">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="applyConfig"></a>
|
|
<div class="mdetail">
|
|
<h3>applyConfig</i></h3>
|
|
<code>public function applyConfig()</code>
|
|
<div class="mdetail-desc">
|
|
Applies the configuration parameters that were passed into the constructor.
|
|
This is supposed to happen at each level through the inheritance chain. So
|
|
a DDProxy implentation will execute apply config on DDProxy, DD, and
|
|
DragDrop in order to get all of the parameters that are available in
|
|
each object.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#applyConfig">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="clearConstraints"></a>
|
|
<div class="mdetail alt">
|
|
<h3>clearConstraints</i></h3>
|
|
<code>public function clearConstraints()</code>
|
|
<div class="mdetail-desc">
|
|
Clears any constraints applied to this instance. Also clears ticks
|
|
since they can't exist independent of a constraint at this time.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#clearConstraints">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="clearTicks"></a>
|
|
<div class="mdetail">
|
|
<h3>clearTicks</i></h3>
|
|
<code>public function clearTicks()</code>
|
|
<div class="mdetail-desc">
|
|
Clears any tick interval defined for this instance
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#clearTicks">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="endDrag"></a>
|
|
<div class="mdetail alt">
|
|
<h3>endDrag</i></h3>
|
|
<code>public function endDrag(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Fired when we are done dragging the object
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mouseup event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#endDrag">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="getDragEl"></a>
|
|
<div class="mdetail">
|
|
<h3>getDragEl</i></h3>
|
|
<code>public function getDragEl()</code>
|
|
<div class="mdetail-desc">
|
|
Returns a reference to the actual element to drag. By default this is
|
|
the same as the html element, but it can be assigned to another
|
|
element. An example of this can be found in YAHOO.util.DDProxy
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>HTMLElement</code><div class="sub-desc">the html element</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#getDragEl">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="getEl"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getEl</i></h3>
|
|
<code>public function getEl()</code>
|
|
<div class="mdetail-desc">
|
|
Returns a reference to the linked element
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>HTMLElement</code><div class="sub-desc">the html element</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#getEl">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="getHorizSlider<static>"></a>
|
|
<div class="mdetail">
|
|
<h3>getHorizSlider<static></i></h3>
|
|
<code>public function getHorizSlider<static>(<code>String sBGElId</code>, <code>String sHandleElId</code>, <code>int iLeft</code>, <code>int iRight</code>, <code>int iTickSize</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<static> Factory method for creating a horizontal slider
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>sBGElId</code> : String<div class="sub-desc">the id of the slider's background element</div></li><li><code>sHandleElId</code> : String<div class="sub-desc">the id of the thumb element</div></li><li><code>iLeft</code> : int<div class="sub-desc">the number of pixels the element can move left</div></li><li><code>iRight</code> : int<div class="sub-desc">the number of pixels the element can move right</div></li><li><code>iTickSize</code> : int<div class="sub-desc">optional parameter for specifying that the element should move a certain number pixels at a time.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Slider</code><div class="sub-desc">a horizontal slider control</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="getSliderRegion<static>"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getSliderRegion<static></i></h3>
|
|
<code>public function getSliderRegion<static>(<code>String sBGElId</code>, <code>String sHandleElId</code>, <code>int iLeft</code>, <code>int iRight</code>, <code>int iUp</code>, <code>int iDown</code>, <code>int iTickSize</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<static> Factory method for creating a slider region like the one in the color
|
|
picker example
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>sBGElId</code> : String<div class="sub-desc">the id of the slider's background element</div></li><li><code>sHandleElId</code> : String<div class="sub-desc">the id of the thumb element</div></li><li><code>iLeft</code> : int<div class="sub-desc">the number of pixels the element can move left</div></li><li><code>iRight</code> : int<div class="sub-desc">the number of pixels the element can move right</div></li><li><code>iUp</code> : int<div class="sub-desc">the number of pixels the element can move up</div></li><li><code>iDown</code> : int<div class="sub-desc">the number of pixels the element can move down</div></li><li><code>iTickSize</code> : int<div class="sub-desc">optional parameter for specifying that the element should move a certain number pixels at a time.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Slider</code><div class="sub-desc">a slider region control</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="getThumb"></a>
|
|
<div class="mdetail">
|
|
<h3>getThumb</i></h3>
|
|
<code>public function getThumb()</code>
|
|
<div class="mdetail-desc">
|
|
Returns a reference to this slider's thumb
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>SliderThumb</code><div class="sub-desc">this slider's thumb</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="getValue"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getValue</i></h3>
|
|
<code>public function getValue()</code>
|
|
<div class="mdetail-desc">
|
|
Returns the slider's thumb offset from the start position
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>int</code><div class="sub-desc">the current value</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="getVertSlider<static>"></a>
|
|
<div class="mdetail">
|
|
<h3>getVertSlider<static></i></h3>
|
|
<code>public function getVertSlider<static>(<code>String sBGElId</code>, <code>String sHandleElId</code>, <code>int iUp</code>, <code>int iDown</code>, <code>int iTickSize</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<static> Factory method for creating a vertical slider
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>sBGElId</code> : String<div class="sub-desc">the id of the slider's background element</div></li><li><code>sHandleElId</code> : String<div class="sub-desc">the id of the thumb element</div></li><li><code>iUp</code> : int<div class="sub-desc">the number of pixels the element can move up</div></li><li><code>iDown</code> : int<div class="sub-desc">the number of pixels the element can move down</div></li><li><code>iTickSize</code> : int<div class="sub-desc">optional parameter for specifying that the element should move a certain number pixels at a time.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Slider</code><div class="sub-desc">a vertical slider control</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="getXValue"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getXValue</i></h3>
|
|
<code>public function getXValue()</code>
|
|
<div class="mdetail-desc">
|
|
Returns the slider's thumb X offset from the start position
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>int</code><div class="sub-desc">the current horizontal offset</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="getYValue"></a>
|
|
<div class="mdetail">
|
|
<h3>getYValue</i></h3>
|
|
<code>public function getYValue()</code>
|
|
<div class="mdetail-desc">
|
|
Returns the slider's thumb Y offset from the start position
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>int</code><div class="sub-desc">the current vertical offset</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="init"></a>
|
|
<div class="mdetail alt">
|
|
<h3>init</i></h3>
|
|
<code>public function init(<code>id the</code>, <code>String sGroup</code>, <code>object config</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Sets up the DragDrop object. Must be called in the constructor of any
|
|
YAHOO.util.DragDrop subclass
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>the</code> : id<div class="sub-desc">id of the linked element</div></li><li><code>sGroup</code> : String<div class="sub-desc">the group of related items</div></li><li><code>config</code> : object<div class="sub-desc">configuration attributes</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#init">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="initTarget"></a>
|
|
<div class="mdetail">
|
|
<h3>initTarget</i></h3>
|
|
<code>public function initTarget(<code>id the</code>, <code>String sGroup</code>, <code>object config</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Initializes Targeting functionality only... the object does not
|
|
get a mousedown handler.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>the</code> : id<div class="sub-desc">id of the linked element</div></li><li><code>sGroup</code> : String<div class="sub-desc">the group of related items</div></li><li><code>config</code> : object<div class="sub-desc">configuration attributes</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#initTarget">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="isLocked"></a>
|
|
<div class="mdetail alt">
|
|
<h3>isLocked</i></h3>
|
|
<code>public function isLocked()</code>
|
|
<div class="mdetail-desc">
|
|
Returns true if this instance is locked, or the drag drop mgr is locked
|
|
(meaning that all drag/drop is disabled on the page.)
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>boolean</code><div class="sub-desc">true if this obj or all drag/drop is locked, else false</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#isLocked">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="isTarget"></a>
|
|
<div class="mdetail">
|
|
<h3>isTarget</i></h3>
|
|
<code>public function isTarget()</code>
|
|
<div class="mdetail-desc">
|
|
By default, all insances can be a drop target. This can be disabled by
|
|
setting isTarget to false.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#isTarget">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="isValidHandleChild"></a>
|
|
<div class="mdetail alt">
|
|
<h3>isValidHandleChild</i></h3>
|
|
<code>public function isValidHandleChild(<code>HTMLElement node</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Checks the tag exclusion list to see if this click should be ignored
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>node</code> : HTMLElement<div class="sub-desc">the HTMLElement to evaluate</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>boolean</code><div class="sub-desc">true if this is a valid tag type, false if not</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#isValidHandleChild">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="lock"></a>
|
|
<div class="mdetail">
|
|
<h3>lock</i></h3>
|
|
<code>public function lock()</code>
|
|
<div class="mdetail-desc">
|
|
Locks the slider, overrides YAHOO.util.DragDrop
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="onAvailable"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onAvailable</i></h3>
|
|
<code>public function onAvailable()</code>
|
|
<div class="mdetail-desc">
|
|
Override the onAvailable method to do what is needed after the initial
|
|
position was determined.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onAvailable">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onChange"></a>
|
|
<div class="mdetail">
|
|
<h3>onChange</i></h3>
|
|
<code>public function onChange(<code>int firstOffset</code>, <code>int secondOffset</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<b>Deprecated.</b> Event that fires when the value of the slider has changed
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>firstOffset</code> : int<div class="sub-desc">the number of pixels the thumb has moved from its start position. Normal horizontal and vertical sliders will only have the firstOffset. Regions will have both, the first is the horizontal offset, the second the vertical.</div></li><li><code>secondOffset</code> : int<div class="sub-desc">the y offset for region sliders</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="onDrag"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onDrag</i></h3>
|
|
<code>public function onDrag(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called during the onMouseMove event while dragging an
|
|
object.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousemove event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onDrag">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onDragDrop"></a>
|
|
<div class="mdetail">
|
|
<h3>onDragDrop</i></h3>
|
|
<code>public function onDragDrop(<code>Event e</code>, <code>String|DragDrop[] id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when this item is dropped on another DragDrop
|
|
obj
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mouseup event</div></li><li><code>id</code> : String|DragDrop[]<div class="sub-desc">In POINT mode, the element id this was dropped on. In INTERSECT mode, an array of dd items this was dropped on.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onDragDrop">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onDragEnter"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onDragEnter</i></h3>
|
|
<code>public function onDragEnter(<code>Event e</code>, <code>String|DragDrop[] id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when this element fist begins hovering over
|
|
another DragDrop obj
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousemove event</div></li><li><code>id</code> : String|DragDrop[]<div class="sub-desc">In POINT mode, the element id this is hovering over. In INTERSECT mode, an array of one or more dragdrop items being hovered over.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onDragEnter">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onDragOut"></a>
|
|
<div class="mdetail">
|
|
<h3>onDragOut</i></h3>
|
|
<code>public function onDragOut(<code>Event e</code>, <code>String|DragDrop[] id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when we are no longer hovering over an element
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousemove event</div></li><li><code>id</code> : String|DragDrop[]<div class="sub-desc">In POINT mode, the element id this was hovering over. In INTERSECT mode, an array of dd items that the mouse is no longer over.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onDragOut">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onDragOver"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onDragOver</i></h3>
|
|
<code>public function onDragOver(<code>Event e</code>, <code>String|DragDrop[] id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when this element is hovering over another
|
|
DragDrop obj
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousemove event</div></li><li><code>id</code> : String|DragDrop[]<div class="sub-desc">In POINT mode, the element id this is hovering over. In INTERSECT mode, an array of dd items being hovered over.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onDragOver">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onInvalidDrop"></a>
|
|
<div class="mdetail">
|
|
<h3>onInvalidDrop</i></h3>
|
|
<code>public function onInvalidDrop(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when this item is dropped on an area with no
|
|
drop target
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mouseup event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onInvalidDrop">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onMouseDown"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onMouseDown</i></h3>
|
|
<code>public function onMouseDown(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Event handler that fires when a drag/drop obj gets a mousedown
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousedown event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onMouseDown">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onMouseUp"></a>
|
|
<div class="mdetail">
|
|
<h3>onMouseUp</i></h3>
|
|
<code>public function onMouseUp(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Event handler that fires when a drag/drop obj gets a mouseup
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mouseup event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#onMouseUp">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onSlideStart"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onSlideStart</i></h3>
|
|
<code>public function onSlideStart()</code>
|
|
<div class="mdetail-desc">
|
|
<b>Deprecated.</b> Event that fires when the at the beginning of the slider thumb move
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="onSliderEnd"></a>
|
|
<div class="mdetail">
|
|
<h3>onSliderEnd</i></h3>
|
|
<code>public function onSliderEnd()</code>
|
|
<div class="mdetail-desc">
|
|
<b>Deprecated.</b> Event that fires at the end of a slider thumb move
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="padding"></a>
|
|
<div class="mdetail alt">
|
|
<h3>padding</i></h3>
|
|
<code>public function padding()</code>
|
|
<div class="mdetail-desc">
|
|
The padding configured for this drag and drop object for calculating
|
|
the drop zone intersection with this object.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#padding">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="removeFromGroup"></a>
|
|
<div class="mdetail">
|
|
<h3>removeFromGroup</i></h3>
|
|
<code>public function removeFromGroup(<code>string sGroup</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Remove's this instance from the supplied interaction group
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>sGroup</code> : string<div class="sub-desc">The group to drop</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#removeFromGroup">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="removeInvalidHandleClass"></a>
|
|
<div class="mdetail alt">
|
|
<h3>removeInvalidHandleClass</i></h3>
|
|
<code>public function removeInvalidHandleClass(<code>string cssClass</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Unsets an invalid css class
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>cssClass</code> : string<div class="sub-desc">the class of the element(s) you wish to re-enable</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#removeInvalidHandleClass">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="removeInvalidHandleId"></a>
|
|
<div class="mdetail">
|
|
<h3>removeInvalidHandleId</i></h3>
|
|
<code>public function removeInvalidHandleId(<code>string id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Unsets an invalid handle id
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>id</code> : string<div class="sub-desc">the id of the element to re-enable</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#removeInvalidHandleId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="removeInvalidHandleType"></a>
|
|
<div class="mdetail alt">
|
|
<h3>removeInvalidHandleType</i></h3>
|
|
<code>public function removeInvalidHandleType(<code>string tagName</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Unsets an excluded tag name set by addInvalidHandleType
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>tagName</code> : string<div class="sub-desc">the type of element to unexclude</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#removeInvalidHandleType">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="resetConstraints"></a>
|
|
<div class="mdetail">
|
|
<h3>resetConstraints</i></h3>
|
|
<code>public function resetConstraints(<code>boolean maintainOffset</code>)</code>
|
|
<div class="mdetail-desc">
|
|
resetConstraints must be called if you manually reposition a dd element.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>maintainOffset</code> : boolean<div class="sub-desc"></div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#resetConstraints">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setDragElId"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setDragElId</i></h3>
|
|
<code>public function setDragElId(<code>id {string}</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Allows you to specify that an element other than the linked element
|
|
will be moved with the cursor during a drag
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>{string}</code> : id<div class="sub-desc">the id of the element that will be used to initiate the drag</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#setDragElId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setHandleElId"></a>
|
|
<div class="mdetail">
|
|
<h3>setHandleElId</i></h3>
|
|
<code>public function setHandleElId(<code>id {string}</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Allows you to specify a child of the linked element that should be
|
|
used to initiate the drag operation. An example of this would be if
|
|
you have a content div with text and links. Clicking anywhere in the
|
|
content area would normally start the drag operation. Use this method
|
|
to specify that an element inside of the content div is the element
|
|
that starts the drag operation.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>{string}</code> : id<div class="sub-desc">the id of the element that will be used to initiate the drag.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#setHandleElId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setInitialPosition"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setInitialPosition</i></h3>
|
|
<code>public function setInitialPosition(<code>int diffX</code>, <code>int diffY</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Stores the initial placement of the linked element.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>diffX</code> : int<div class="sub-desc">the X offset, default 0</div></li><li><code>diffY</code> : int<div class="sub-desc">the Y offset, default 0</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#setInitialPosition">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setOuterHandleElId"></a>
|
|
<div class="mdetail">
|
|
<h3>setOuterHandleElId</i></h3>
|
|
<code>public function setOuterHandleElId(<code>id the</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Allows you to set an element outside of the linked element as a drag
|
|
handle
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>the</code> : id<div class="sub-desc">id of the element that will be used to initiate the drag</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#setOuterHandleElId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setPadding"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setPadding</i></h3>
|
|
<code>public function setPadding(<code>int iTop</code>, <code>int iRight</code>, <code>int iBot</code>, <code>int iLeft</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Configures the padding for the target zone in px. Effectively expands
|
|
(or reduces) the virtual object size for targeting calculations.
|
|
Supports css-style shorthand; if only one parameter is passed, all sides
|
|
will have that padding, and if only two are passed, the top and bottom
|
|
will have the first param, the left and right the second.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iTop</code> : int<div class="sub-desc">Top pad</div></li><li><code>iRight</code> : int<div class="sub-desc">Right pad</div></li><li><code>iBot</code> : int<div class="sub-desc">Bot pad</div></li><li><code>iLeft</code> : int<div class="sub-desc">Left pad</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#setPadding">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setRegionValue"></a>
|
|
<div class="mdetail">
|
|
<h3>setRegionValue</i></h3>
|
|
<code>public function setRegionValue(<code>int newOffset</code>, <code>int newOffset2</code>, <code>boolean skipAnim</code>, <code>boolean force</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Provides a way to set the value of the region slider in code.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>newOffset</code> : int<div class="sub-desc">the number of pixels the thumb should be positioned away from the initial start point (x axis for region)</div></li><li><code>newOffset2</code> : int<div class="sub-desc">the number of pixels the thumb should be positioned away from the initial start point (y axis for region)</div></li><li><code>skipAnim</code> : boolean<div class="sub-desc">set to true to disable the animation for this move action (but not others).</div></li><li><code>force</code> : boolean<div class="sub-desc">ignore the locked setting and set value anyway</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>boolean</code><div class="sub-desc">true if the move was performed, false if it failed</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="setSliderStartState"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setSliderStartState</i></h3>
|
|
<code>public function setSliderStartState()</code>
|
|
<div class="mdetail-desc">
|
|
Initialization that sets up the value offsets once the elements are ready
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="setThumbCenterPoint"></a>
|
|
<div class="mdetail">
|
|
<h3>setThumbCenterPoint</i></h3>
|
|
<code>public function setThumbCenterPoint()</code>
|
|
<div class="mdetail-desc">
|
|
When the thumb is available, we cache the centerpoint of the element so
|
|
we can position the element correctly when the background is clicked
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="setValue"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setValue</i></h3>
|
|
<code>public function setValue(<code>int newOffset</code>, <code>boolean skipAnim</code>, <code>boolean force</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Provides a way to set the value of the slider in code.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>newOffset</code> : int<div class="sub-desc">the number of pixels the thumb should be positioned away from the initial start point</div></li><li><code>skipAnim</code> : boolean<div class="sub-desc">set to true to disable the animation for this move action (but not others).</div></li><li><code>force</code> : boolean<div class="sub-desc">ignore the locked setting and set value anyway</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>boolean</code><div class="sub-desc">true if the move was performed, false if it failed</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="setXConstraint"></a>
|
|
<div class="mdetail">
|
|
<h3>setXConstraint</i></h3>
|
|
<code>public function setXConstraint(<code>int iLeft</code>, <code>int iRight</code>, <code>int iTickSize</code>)</code>
|
|
<div class="mdetail-desc">
|
|
By default, the element can be dragged any place on the screen. Use
|
|
this method to limit the horizontal travel of the element. Pass in
|
|
0,0 for the parameters if you want to lock the drag to the y axis.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iLeft</code> : int<div class="sub-desc">the number of pixels the element can move to the left</div></li><li><code>iRight</code> : int<div class="sub-desc">the number of pixels the element can move to the right</div></li><li><code>iTickSize</code> : int<div class="sub-desc">optional parameter for specifying that the element should move iTickSize pixels at a time.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#setXConstraint">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setYConstraint"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setYConstraint</i></h3>
|
|
<code>public function setYConstraint(<code>int iUp</code>, <code>int iDown</code>, <code>int iTickSize</code>)</code>
|
|
<div class="mdetail-desc">
|
|
By default, the element can be dragged any place on the screen. Set
|
|
this to limit the vertical travel of the element. Pass in 0,0 for the
|
|
parameters if you want to lock the drag to the x axis.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iUp</code> : int<div class="sub-desc">the number of pixels the element can move up</div></li><li><code>iDown</code> : int<div class="sub-desc">the number of pixels the element can move down</div></li><li><code>iTickSize</code> : int<div class="sub-desc">optional parameter for specifying that the element should move iTickSize pixels at a time.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#setYConstraint">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="startDrag"></a>
|
|
<div class="mdetail">
|
|
<h3>startDrag</i></h3>
|
|
<code>public function startDrag(<code>int X</code>, <code>int Y</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called after a drag/drop object is clicked
|
|
and the drag or mousedown time thresholds have beeen met.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>X</code> : int<div class="sub-desc">click location</div></li><li><code>Y</code> : int<div class="sub-desc">click location</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#startDrag">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="toString"></a>
|
|
<div class="mdetail alt">
|
|
<h3>toString</i></h3>
|
|
<code>public function toString()</code>
|
|
<div class="mdetail-desc">
|
|
Slider toString
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>string</code><div class="sub-desc">string representation of the instance</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="unlock"></a>
|
|
<div class="mdetail">
|
|
<h3>unlock</i></h3>
|
|
<code>public function unlock()</code>
|
|
<div class="mdetail-desc">
|
|
Unlocks the slider, overrides YAHOO.util.DragDrop
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
<a name="unreg"></a>
|
|
<div class="mdetail alt">
|
|
<h3>unreg</i></h3>
|
|
<code>public function unreg()</code>
|
|
<div class="mdetail-desc">
|
|
Remove all drag and drop hooks for this element
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="YAHOO.util.DragDrop.html#unreg">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="verifyOffset"></a>
|
|
<div class="mdetail">
|
|
<h3>verifyOffset</i></h3>
|
|
<code>public function verifyOffset()</code>
|
|
<div class="mdetail-desc">
|
|
Checks the background position element position. If it has moved from the
|
|
baseline position, the constraints for the thumb are reset
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>boolean</code><div class="sub-desc">True if the offset is the same as the baseline.</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Slider.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Event Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="event-change"></a>
|
|
<div class="mdetail">
|
|
<h3>change</i></h3>
|
|
<code>public event change</code>
|
|
<div class="mdetail-desc">
|
|
Event the fires when the value of the control changes. If
|
|
the control is animated the event will fire every point
|
|
along the way.
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li><code>new</code> : int<div class="sub-desc"></div></li><li><code>firstOffset</code> : int<div class="sub-desc">the number of pixels the thumb has moved from its start position. Normal horizontal and vertical sliders will only have the firstOffset. Regions will have both, the first is the horizontal offset, the second the vertical.</div></li><li><code>secondOffset</code> : int<div class="sub-desc">the y offset for region sliders</div></li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by Slider.</div>
|
|
</div>
|
|
<a name="event-slideEnd
|
|
"></a>
|
|
<div class="mdetail alt">
|
|
<h3>slideEnd
|
|
</i></h3>
|
|
<code>public event slideEnd
|
|
</code>
|
|
<div class="mdetail-desc">
|
|
Event that fires at the end of a slider thumb move
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by Slider.</div>
|
|
</div>
|
|
<a name="event-slideStart
|
|
"></a>
|
|
<div class="mdetail">
|
|
<h3>slideStart
|
|
</i></h3>
|
|
<code>public event slideStart
|
|
</code>
|
|
<div class="mdetail-desc">
|
|
Event that fires at the end of a slider thumb move.
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by Slider.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
Copyright © 2006 Jack Slocum. All rights reserved.
|
|
</body>
|
|
</html>
|
|
|