|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.ajax.AjaxComponent
er.ajax.AjaxDraggable
public class AjaxDraggable
AjaxDraggable makes HTML elements draggable. Use in conjunction with
AjaxDroppable
.
When omitContainer is false (default), the contents nested inside of the
AjaxDraggable will be made draggable. Otherwise an existing DOM element with
the id specified via the id binding will be made draggable.
For the scriptaculous options see
http://wiki.github.com/madrobby/scriptaculous/draggable
Bindings | |
id | the id of the element to drag. When omitContainer is false, this
is the id of the container surrounding the component content. When
unspecified, a unique id will be generated. |
omitContainer | if set to true, the container element will be omitted.
The DOM id of the object to be made draggable must be specified with
the id binding. Defaults to false. |
elementName | the element to use for the container. defaults to "div". |
class | the css class of the container |
style | the css styles of the container |
draggableObject | a java object which is passed to the AjaxDroppable
when this draggable is dropped onto it. |
draggableID | draggableID |
starteffect | Effect, defaults to Effect.Opacity. Defines the effect
to use when the draggable starts being dragged |
reverteffect | Effect, default to Effect.Move. Defines the effect to
use when the draggable reverts back to its starting position |
endeffect | Effect, defaults to Effect.Opacity. Defines the effect to
use when the draggable stops being dragged |
zindex | integer value, defaults to 1000. The css z-index of the
draggable item |
revert | boolean or function reference, defaults to false. If set to
true, the element returns to its original position when the drags
ends. Revert can also be an arbitrary function reference, called
when the drag ends. Specifying 'failure' will instruct the draggable
not to revert if successfully dropped in a droppable. |
snap | set to false no snapping occurs. Otherwise takes one of the
following forms – Δi: one delta value for both horizontal and
vertical snap, [Δx, Δy]: delta values for horizontal and vertical
snap, function(x, y, draggable_object) { return [x, y]; }: a
function that receives the proposed new top left coordinate pair and
returns the coordinate pair to actually be used. |
ghosting | boolean, defaults to false. Clones the element and drags
the clone, leaving the original in place until the clone is dropped |
handle | string or DOM reference, not set by default. Sets whether the
element should only be draggable by an embedded handle. The value
must be an element reference or element id. The value may also be a
string referencing a CSS class value. The first
child/grandchild/etc. element found within the element that has this
CSS class value will be used as the handle. |
change | Called just as onDrag (which is the preferred callback). Gets
the Draggable instance as its parameter. |
keyPress | keyPress |
scroll | can be either a dom ID or a dom reference. In case of a dom
reference the value must not be quoted. Set binding to "window" to
scroll the window when the draggable reaches the window boundary.
Set binding to "'someID'" to scroll the element with ID "someID" |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent |
---|
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
---|
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException |
Field Summary |
---|
Fields inherited from class com.webobjects.appserver.WOComponent |
---|
_Extension, _IsEventLoggingEnabled, _keyAssociations |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling |
---|
_CLASS |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
NullValue |
Fields inherited from interface com.webobjects.foundation.NSValidation |
---|
_CLASS |
Constructor Summary | |
---|---|
AjaxDraggable(com.webobjects.appserver.WOContext context)
|
Method Summary | |
---|---|
protected void |
addRequiredWebResources(com.webobjects.appserver.WOResponse res)
Override this method to append the needed scripts for this component. |
void |
appendToResponse(com.webobjects.appserver.WOResponse res,
com.webobjects.appserver.WOContext ctx)
Overridden to call AjaxComponent.addRequiredWebResources(WOResponse) . |
void |
awake()
|
com.webobjects.foundation.NSDictionary |
createAjaxOptions()
|
java.lang.String |
draggableID()
|
static java.lang.Object |
draggableObjectForPage(com.webobjects.appserver.WOComponent page,
java.lang.String draggableID)
|
java.lang.String |
elementName()
|
com.webobjects.appserver.WOActionResults |
handleRequest(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Override this method to return the response for an Ajax request. |
java.lang.String |
id()
|
boolean |
isStateless()
|
void |
reset()
|
boolean |
synchronizesVariablesWithBindings()
|
Methods inherited from class com.webobjects.appserver.WOComponent |
---|
_associationWithName, _awakeInContext, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AjaxDraggable(com.webobjects.appserver.WOContext context)
Method Detail |
---|
public void awake()
awake
in class com.webobjects.appserver.WOComponent
public void reset()
reset
in class com.webobjects.appserver.WOComponent
public boolean isStateless()
isStateless
in class com.webobjects.appserver.WOComponent
public boolean synchronizesVariablesWithBindings()
synchronizesVariablesWithBindings
in class com.webobjects.appserver.WOComponent
public static java.lang.Object draggableObjectForPage(com.webobjects.appserver.WOComponent page, java.lang.String draggableID)
public void appendToResponse(com.webobjects.appserver.WOResponse res, com.webobjects.appserver.WOContext ctx)
AjaxComponent
AjaxComponent.addRequiredWebResources(WOResponse)
.
appendToResponse
in class AjaxComponent
public com.webobjects.foundation.NSDictionary createAjaxOptions()
public java.lang.String id()
public java.lang.String elementName()
public java.lang.String draggableID()
protected void addRequiredWebResources(com.webobjects.appserver.WOResponse res)
AjaxComponent
addRequiredWebResources
in class AjaxComponent
public com.webobjects.appserver.WOActionResults handleRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
AjaxComponent
handleRequest
in interface IAjaxElement
handleRequest
in class AjaxComponent
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |