Roo.util.Observable Roo.dd.DragDrop Roo.dd.DDTarget Roo.dd.DropTarget Roo.dd.DropZone
Package: | Roo.dd |
Defined In: | Roo/dd/DropZone.js. |
Class: | DropZone |
Extends: | Roo.dd.DropTarget |
Options | Defined By | |
---|---|---|
ddGroup : String
The drag drop group to handle drop events for
The drag drop group to handle drop events for
|
Roo.dd.DropTarget | |
dropAllowed : String
The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
|
Roo.dd.DropTarget | |
dropNotAllowed : String
The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
|
Roo.dd.DropTarget | |
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable | |
overClass : String
The CSS class applied to the drop target element while the drag source is over it (defaults to "").
The CSS class applied to the drop target element while the drag source is over it (defaults to "").
|
Roo.dd.DropTarget | |
success : boolean
set this after drop listener.
set this after drop listener..
|
Roo.dd.DropTarget | |
valid : boolean|String
true/false or string (ok-add/ok-sub/ok/nodrop)
if the drop point is valid for over/enter.
true/false or string (ok-add/ok-sub/ok/nodrop)
if the drop point is valid for over/enter.. |
Roo.dd.DropTarget |
Method | Defined By | |
---|---|---|
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
addInvalidHandleClass
(string cssClass)
Lets you specify a css class of elements that will not initiate a drag
Lets you specify a css class of elements that will not initiate a drag
|
Roo.dd.DragDrop | |
addInvalidHandleId
(string id)
Lets you to specify an element id for a child of a drag handle
that should not initiate a drag
Lets you to specify an element id for a child of a drag handle
that should not initiate a drag
|
Roo.dd.DragDrop | |
addInvalidHandleType
(string tagName)
Allows you to specify a tag name that should not start a drag operation
when clicked.
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.
|
Roo.dd.DragDrop | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
addToGroup
(sGroup)
Add this instance to a group of related drag/drop objects.
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.
|
Roo.dd.DragDrop | |
applyConfig
()
Applies the configuration parameters that were passed into the constructor.
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. |
Roo.dd.DragDrop | |
clearConstraints
()
Clears any constraints applied to this instance.
Clears any constraints applied to this instance. Also clears ticks
since they can't exist independent of a constraint at this time. |
Roo.dd.DragDrop | |
clearTicks
()
Clears any tick interval defined for this instance
Clears any tick interval defined for this instance
|
Roo.dd.DragDrop | |
endDrag
(Event e)
Fired when we are done dragging the object
Fired when we are done dragging the object
|
Roo.dd.DragDrop | |
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
function toString() {
[native code]
}
()
:
string
toString method
toString method
|
Roo.dd.DragDrop | |
getDragEl
()
:
HTMLElement
Returns a reference to the actual element to drag.
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 Roo.dd.DDProxy
|
Roo.dd.DragDrop | |
getEl
()
:
HTMLElement
Returns a reference to the linked element
Returns a reference to the linked element
|
Roo.dd.DragDrop | |
getTargetFromEvent
(Event e)
:
Object
Returns a custom data object associated with the DOM node that is the target of the event.
Returns a custom data object associated with the DOM node that is the target of the event. By default
this looks up the event target in the {link Roo.dd.Registry}, although you can override this method to provide your own custom lookup.
|
Roo.dd.DropZone | |
Roo.util.Observable | ||
init
(id, String sGroup, object config)
Sets up the DragDrop object.
Sets up the DragDrop object. Must be called in the constructor of any
Roo.dd.DragDrop subclass
|
Roo.dd.DragDrop | |
initTarget
(id, String sGroup, object config)
Initializes Targeting functionality only.
Initializes Targeting functionality only... the object does not
get a mousedown handler.
|
Roo.dd.DragDrop | |
isLocked
()
:
boolean
Returns true if this instance is locked, or the drag drop mgr is locked
(meaning that all drag/drop is disabled on the page.
Returns true if this instance is locked, or the drag drop mgr is locked
(meaning that all drag/drop is disabled on the page.)
|
Roo.dd.DragDrop | |
isTarget
()
By default, all insances can be a drop target.
By default, all insances can be a drop target. This can be disabled by
setting isTarget to false. |
Roo.dd.DragDrop | |
isValidHandleChild
(HTMLElement node)
:
boolean
Checks the tag exclusion list to see if this click should be ignored
Checks the tag exclusion list to see if this click should be ignored
|
Roo.dd.DragDrop | |
lock
()
Lock this instance
Lock this instance
|
Roo.dd.DragDrop | |
The function a {link Roo.dd.DragSource} calls once to notify this drop zone that the dragged item has
been dropped on it.
The function a {link Roo.dd.DragSource} calls once to notify this drop zone that the dragged item has
been dropped on it. The drag zone will look up the target node based on the event passed in, and if there is a node registered for that event, it will delegate to {link onNodeDrop} for node-specific handling, otherwise it will call {link onContainerDrop}.
|
Roo.dd.DropZone | |
The function a {link Roo.dd.DragSource} calls once to notify this drop zone that the source is now over
the zone.
The function a {link Roo.dd.DragSource} calls once to notify this drop zone that the source is now over
the zone. The default implementation returns this.dropNotAllowed and expects that only registered drop nodes can process drag drop operations, so if you need the drop zone itself to be able to process drops you should override this method and provide a custom implementation.
|
Roo.dd.DropZone | |
notifyOut
(Roo.dd.DragSource source, Event e, Object data)
The function a {link Roo.dd.DragSource} calls once to notify this drop zone that the source has been dragged
out of the zone without dropping.
The function a {link Roo.dd.DragSource} calls once to notify this drop zone that the source has been dragged
out of the zone without dropping. If the drag source is currently over a registered node, the notification will be delegated to {link onNodeOut} for node-specific handling, otherwise it will be ignored.
|
Roo.dd.DropZone | |
The function a {link Roo.dd.DragSource} calls continuously while it is being dragged over the drop zone.
The function a {link Roo.dd.DragSource} calls continuously while it is being dragged over the drop zone.
This method will be called on every mouse movement while the drag source is over the drop zone. It will call {link onNodeOver} while the drag source is over a registered node, and will also automatically delegate to the appropriate node-specific methods as necessary when the drag source enters and exits registered nodes ({link onNodeEnter}, {link onNodeOut}). If the drag source is not currently over a registered node, it will call {link onContainerOver}.
|
Roo.dd.DropZone | |
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
onAvailable
()
Override the onAvailable method to do what is needed after the initial
position was determined.
Override the onAvailable method to do what is needed after the initial
position was determined. |
Roo.dd.DragDrop | |
Called internally when the DropZone determines that a {link Roo.dd.DragSource} has been dropped on it,
but not on any of its registered drop nodes.
Called internally when the DropZone determines that a {link Roo.dd.DragSource} has been dropped on it,
but not on any of its registered drop nodes. The default implementation returns false, so it should be overridden to provide the appropriate processing of the drop event if you need the drop zone itself to be able to accept drops. It should return true when valid so that the drag source's repair action does not run.
|
Roo.dd.DropZone | |
Called internally while the DropZone determines that a {link Roo.dd.DragSource} is being dragged over it,
but not over any of its registered drop nodes.
Called internally while the DropZone determines that a {link Roo.dd.DragSource} is being dragged over it,
but not over any of its registered drop nodes. The default implementation returns this.dropNotAllowed, so it should be overridden to provide the proper feedback if necessary.
|
Roo.dd.DropZone | |
onDrag
(Event e)
Abstract method called during the onMouseMove event while dragging an
object.
Abstract method called during the onMouseMove event while dragging an
object.
|
Roo.dd.DragDrop | |
onDragDrop
(Event e, String|DragDrop[] id)
Abstract method called when this item is dropped on another DragDrop
obj
Abstract method called when this item is dropped on another DragDrop
obj
|
Roo.dd.DragDrop | |
onDragEnter
(Event e, String|DragDrop[] id)
Abstract method called when this element fist begins hovering over
another DragDrop obj
Abstract method called when this element fist begins hovering over
another DragDrop obj
|
Roo.dd.DragDrop | |
onDragOut
(Event e, String|DragDrop[] id)
Abstract method called when we are no longer hovering over an element
Abstract method called when we are no longer hovering over an element
|
Roo.dd.DragDrop | |
onDragOver
(Event e, String|DragDrop[] id)
Abstract method called when this element is hovering over another
DragDrop obj
Abstract method called when this element is hovering over another
DragDrop obj
|
Roo.dd.DragDrop | |
onInvalidDrop
(Event e)
Abstract method called when this item is dropped on an area with no
drop target
Abstract method called when this item is dropped on an area with no
drop target
|
Roo.dd.DragDrop | |
onMouseDown
(Event e)
Event handler that fires when a drag/drop obj gets a mousedown
Event handler that fires when a drag/drop obj gets a mousedown
|
Roo.dd.DragDrop | |
onMouseUp
(Event e)
Event handler that fires when a drag/drop obj gets a mouseup
Event handler that fires when a drag/drop obj gets a mouseup
|
Roo.dd.DragDrop | |
Called internally when the DropZone determines that a {link Roo.dd.DragSource} has been dropped onto
the drop node.
Called internally when the DropZone determines that a {link Roo.dd.DragSource} has been dropped onto
the drop node. The default implementation returns false, so it should be overridden to provide the appropriate processing of the drop event and return true so that the drag source's repair action does not run.
|
Roo.dd.DropZone | |
Called internally when the DropZone determines that a {link Roo.dd.DragSource} has entered a drop node
that it has registered.
Called internally when the DropZone determines that a {link Roo.dd.DragSource} has entered a drop node
that it has registered. This method has no default implementation and should be overridden to provide node-specific processing if necessary.
|
Roo.dd.DropZone | |
Called internally when the DropZone determines that a {link Roo.dd.DragSource} has been dragged out of
the drop node without dropping.
Called internally when the DropZone determines that a {link Roo.dd.DragSource} has been dragged out of
the drop node without dropping. This method has no default implementation and should be overridden to provide node-specific processing if necessary.
|
Roo.dd.DropZone | |
Called internally while the DropZone determines that a {link Roo.dd.DragSource} is over a drop node
that it has registered.
Called internally while the DropZone determines that a {link Roo.dd.DragSource} is over a drop node
that it has registered. The default implementation returns this.dropNotAllowed, so it should be overridden to provide the proper feedback.
|
Roo.dd.DropZone | |
padding
()
The padding configured for this drag and drop object for calculating
the drop zone intersection with this object.
The padding configured for this drag and drop object for calculating
the drop zone intersection with this object. |
Roo.dd.DragDrop | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
removeFromGroup
(string sGroup)
Remove's this instance from the supplied interaction group
Remove's this instance from the supplied interaction group
|
Roo.dd.DragDrop | |
removeInvalidHandleClass
(string cssClass)
Unsets an invalid css class
Unsets an invalid css class
|
Roo.dd.DragDrop | |
removeInvalidHandleId
(string id)
Unsets an invalid handle id
Unsets an invalid handle id
|
Roo.dd.DragDrop | |
removeInvalidHandleType
(string tagName)
Unsets an excluded tag name set by addInvalidHandleType
Unsets an excluded tag name set by addInvalidHandleType
|
Roo.dd.DragDrop | |
Roo.util.Observable | ||
resetConstraints
(boolean maintainOffset)
resetConstraints must be called if you manually reposition a dd element.
resetConstraints must be called if you manually reposition a dd element.
|
Roo.dd.DragDrop | |
setDragElId
(id)
Allows you to specify that an element other than the linked element
will be moved with the cursor during a drag
Allows you to specify that an element other than the linked element
will be moved with the cursor during a drag
|
Roo.dd.DragDrop | |
setHandleElId
(id)
Allows you to specify a child of the linked element that should be
used to initiate the drag operation.
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.
|
Roo.dd.DragDrop | |
setInitPosition
(int diffX, int diffY)
Stores the initial placement of the linked element.
Stores the initial placement of the linked element.
|
Roo.dd.DragDrop | |
setOuterHandleElId
(id)
Allows you to set an element outside of the linked element as a drag
handle
Allows you to set an element outside of the linked element as a drag
handle
|
Roo.dd.DragDrop | |
setPadding
(int iTop, int iRight, int iBot, int iLeft)
Configures the padding for the target zone in px.
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.
|
Roo.dd.DragDrop | |
setXConstraint
(int iLeft, int iRight, int iTickSize)
By default, the element can be dragged any place on the screen.
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.
|
Roo.dd.DragDrop | |
setYConstraint
(int iUp, int iDown, int iTickSize)
By default, the element can be dragged any place on the screen.
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.
|
Roo.dd.DragDrop | |
startDrag
(int X, int Y)
Abstract method called after a drag/drop object is clicked
and the drag or mousedown time thresholds have beeen met.
Abstract method called after a drag/drop object is clicked
and the drag or mousedown time thresholds have beeen met.
|
Roo.dd.DragDrop | |
Roo.util.Observable | ||
unlock
()
Unlock this instace
Unlock this instace
|
Roo.dd.DragDrop | |
unreg
()
Remove all drag and drop hooks for this element
Remove all drag and drop hooks for this element
|
Roo.dd.DragDrop |
Event | Defined By | |
---|---|---|
drop (Roo.dd.DragSource source, Event e, Object data)
The function a {link Roo.dd.DragSource} calls once to notify this drop target that the dragged item has
been dropped on it.
The function a {link Roo.dd.DragSource} calls once to notify this drop target that the dragged item has
been dropped on it. This method has no default implementation and returns false, so you must provide an implementation that does something to process the drop event and returns true so that the drag source's repair action does not run. IMPORTANT : it should set this.success
|
Roo.dd.DropTarget | |
enter (Roo.dd.DragSource source, Event e, Object data)
The function a {link Roo.dd.DragSource} calls once to notify this drop target that the source is now over the
target.
The function a {link Roo.dd.DragSource} calls once to notify this drop target that the source is now over the
target. This default implementation adds the CSS class specified by overClass (if any) to the drop element and returns the dropAllowed config value. This method should be overridden if drop validation is required. IMPORTANT : it should set this.overClass and this.dropAllowed
|
Roo.dd.DropTarget | |
out (Roo.dd.DragSource source, Event e, Object data)
The function a {link Roo.dd.DragSource} calls once to notify this drop target that the source has been dragged
out of the target without dropping.
The function a {link Roo.dd.DragSource} calls once to notify this drop target that the source has been dragged
out of the target without dropping. This default implementation simply removes the CSS class specified by overClass (if any) from the drop element.
|
Roo.dd.DropTarget | |
over (Roo.dd.DragSource source, Event e, Object data)
The function a {link Roo.dd.DragSource} calls continuously while it is being dragged over the target.
The function a {link Roo.dd.DragSource} calls continuously while it is being dragged over the target.
This method will be called on every mouse movement while the drag source is over the drop target. This default implementation simply returns the dropAllowed config value. IMPORTANT : it should set this.dropAllowed
|
Roo.dd.DropTarget |