net.sf.tacos.components.scriptaculous
Class Droppable

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by net.sf.tacos.components.scriptaculous.Droppable
All Implemented Interfaces:
Locatable, LocationHolder, org.apache.tapestry.IComponent, org.apache.tapestry.IDirect, org.apache.tapestry.IDirectEvent, org.apache.tapestry.IDynamicInvoker, org.apache.tapestry.internal.Component, org.apache.tapestry.IRender

public abstract class Droppable
extends org.apache.tapestry.AbstractComponent
implements org.apache.tapestry.IDirect

Implementation of the Droppables.

This component makes a html element droppable. Droppables are elements which allow Draggables to be dropped on. When a draggable is released over a droppable, a listener method may be triggered to inform your application about the dropped element.

Example:

<div jwcid="@tacos:Droppable" listener="listener:onDrop" hoverClass="literal:hoverCss" />

Since:
4.1
Author:
Igor Drobiazko
See Also:
Draggable

Field Summary
static String DRAGGABLE_PARAMETER
          Name of the IRequestCycle parameter whose value is the identifier of the dropped draggable
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
Droppable()
           
 
Method Summary
abstract  Collection getAccept()
          Returns String[] or Collection of strings describing CSS classes.
abstract  org.apache.tapestry.engine.IEngineService getEngine()
          Injected engine service .
abstract  String getHoverClass()
          Returns the CSS class this Droppable will have when an accepted Draggable is hovered over it.
abstract  org.apache.tapestry.IActionListener getListener()
          Injected listener parameter, may be null.
abstract  org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
          Injected listener invoker.
abstract  org.apache.tapestry.IScript getScript()
          Injected script.
protected  void renderComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
          
 void trigger(org.apache.tapestry.IRequestCycle cycle)
          
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainedRenderers, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getInnerRenderers, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, peekClientId, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IDirect
isStateful
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 
Methods inherited from interface org.apache.tapestry.IDynamicInvoker
getUpdateComponents, isAsync, isJson
 

Field Detail

DRAGGABLE_PARAMETER

public static final String DRAGGABLE_PARAMETER
Name of the IRequestCycle parameter whose value is the identifier of the dropped draggable

See Also:
IRequestCycle#getParameter(String)}, Constant Field Values
Constructor Detail

Droppable

public Droppable()
Method Detail

renderComponent

protected void renderComponent(org.apache.tapestry.IMarkupWriter writer,
                               org.apache.tapestry.IRequestCycle cycle)

Specified by:
renderComponent in class org.apache.tapestry.AbstractComponent

trigger

public void trigger(org.apache.tapestry.IRequestCycle cycle)

Specified by:
trigger in interface org.apache.tapestry.IDirect

getListener

public abstract org.apache.tapestry.IActionListener getListener()
Injected listener parameter, may be null.


getScript

public abstract org.apache.tapestry.IScript getScript()
Injected script.


getListenerInvoker

public abstract org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
Injected listener invoker.


getEngine

public abstract org.apache.tapestry.engine.IEngineService getEngine()
Injected engine service .


getAccept

public abstract Collection getAccept()
Returns String[] or Collection of strings describing CSS classes. The Droppable will only accept Draggable that have one or more of these CSS classes.


getHoverClass

public abstract String getHoverClass()
Returns the CSS class this Droppable will have when an accepted Draggable is hovered over it.



Copyright © 2005-2008 SourceForge.net. All Rights Reserved.