org.efaps.ui.wicket.behaviors.dojo
Class DnDBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by org.efaps.ui.wicket.behaviors.dojo.AbstractDojoBehavior
          extended by org.efaps.ui.wicket.behaviors.dojo.DnDBehavior
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.behavior.IBehavior, org.apache.wicket.IClusterable, org.apache.wicket.markup.html.IHeaderContributor

public class DnDBehavior
extends AbstractDojoBehavior

This class renders the drag and drop ability from the DojoToolKit to a component.
It is used for all tags which can be part of the Dojo-dnd. The handles, items and the Source.

Version:
$Id: DnDBehavior.java 3447 2009-11-29 22:46:39Z tim.moxter $
Author:
The eFaps Team
See Also:
Serialized Form

Nested Class Summary
static class DnDBehavior.BehaviorType
          Enum used to set the Type of Drag and Drop this Behavior should render.
 
Constructor Summary
DnDBehavior(DnDBehavior.BehaviorType _type)
          Constructor setting the Type of the DnDBehavior.
DnDBehavior(DnDBehavior.BehaviorType _type, java.lang.String _dndType)
          Constructor setting the type and dendtype.
 
Method Summary
 java.lang.String getAppendJavaScript()
          This is the getter method for the instance variable appendJavaScript.
 java.lang.CharSequence getDndType()
          This is the getter method for the instance variable dndType.
static DnDBehavior getHandleBehavior()
          Static Method to get DnDBehavior with handle behavior.
static DnDBehavior getItemBehavior()
          Static Method to get DnDBehavior with item behavior.
static DnDBehavior getItemBehavior(java.lang.String _dndType)
          Static Method to get DnDBehavior with item behavior.
static DnDBehavior getSourceBehavior()
          Static Method to get DnDBehavior with Source behavior.
static DnDBehavior getSourceBehavior(java.lang.String _dndType)
          Static Method to get DnDBehavior with Source behavior.
 boolean isAllowCopy()
          This is the getter method for the instance variable allowCopy.
 boolean isHandles()
          This is the getter method for the instance variable handles.
 boolean isHorizontal()
          This is the getter method for the instance variable horizontal.
 void onComponentTag(org.apache.wicket.Component _component, org.apache.wicket.markup.ComponentTag _tag)
          The tag of the component must be altered, so that the dojo dnd will be rendered.
 void renderHead(org.apache.wicket.markup.html.IHeaderResponse _response)
          Add the javascriupt to the head of the webpage.
 void setAllowCopy(boolean _allowCopy)
          This is the setter method for the instance variable allowCopy.
 void setAppendJavaScript(java.lang.String _appendJavaScript)
          This is the setter method for the instance variable appendJavaScript.
 void setDndType(java.lang.CharSequence _dndType)
          This is the setter method for the instance variable dndType.
 void setHandles(boolean _handles)
          This is the setter method for the instance variable handles.
 void setHorizontal(boolean _horizontal)
          This is the setter method for the instance variable horizontal.
 
Methods inherited from class org.efaps.ui.wicket.behaviors.dojo.AbstractDojoBehavior
beforeRender
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, bind, cleanup, detach, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onException, onRendered, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DnDBehavior

public DnDBehavior(DnDBehavior.BehaviorType _type)
Constructor setting the Type of the DnDBehavior. Instead of using this constructor it can be used on e of the static methods.
  • getHandleBehavior()
  • getItemBehavior()
  • getSourceBehavior()
  • Parameters:
    _type - BehaviorType of this DnDBehavior

    DnDBehavior

    public DnDBehavior(DnDBehavior.BehaviorType _type,
                       java.lang.String _dndType)
    Constructor setting the type and dendtype.

    Parameters:
    _type - BehaviorType of this DnDBehavior
    _dndType - dndType
    Method Detail

    onComponentTag

    public void onComponentTag(org.apache.wicket.Component _component,
                               org.apache.wicket.markup.ComponentTag _tag)
    The tag of the component must be altered, so that the dojo dnd will be rendered.

    Specified by:
    onComponentTag in interface org.apache.wicket.behavior.IBehavior
    Overrides:
    onComponentTag in class org.apache.wicket.behavior.AbstractBehavior
    Parameters:
    _component - Component
    _tag - tag to edit
    See Also:
    AbstractBehavior.onComponentTag(org.apache.wicket.Component, org.apache.wicket.markup.ComponentTag)

    isHorizontal

    public boolean isHorizontal()
    This is the getter method for the instance variable horizontal.

    Returns:
    value of instance variable horizontal

    setHorizontal

    public void setHorizontal(boolean _horizontal)
    This is the setter method for the instance variable horizontal.

    Parameters:
    _horizontal - the horizontal to set

    isHandles

    public boolean isHandles()
    This is the getter method for the instance variable handles.

    Returns:
    value of instance variable handles

    setHandles

    public void setHandles(boolean _handles)
    This is the setter method for the instance variable handles.

    Parameters:
    _handles - the widthHandles to set

    isAllowCopy

    public boolean isAllowCopy()
    This is the getter method for the instance variable allowCopy.

    Returns:
    value of instance variable allowCopy

    setAllowCopy

    public void setAllowCopy(boolean _allowCopy)
    This is the setter method for the instance variable allowCopy.

    Parameters:
    _allowCopy - the allowCopy to set

    renderHead

    public void renderHead(org.apache.wicket.markup.html.IHeaderResponse _response)
    Add the javascriupt to the head of the webpage.

    Specified by:
    renderHead in interface org.apache.wicket.markup.html.IHeaderContributor
    Overrides:
    renderHead in class AbstractDojoBehavior
    Parameters:
    _response - rseponse
    See Also:
    AbstractDojoBehavior.renderHead(org.apache.wicket.markup.html.IHeaderResponse)

    getAppendJavaScript

    public java.lang.String getAppendJavaScript()
    This is the getter method for the instance variable appendJavaScript.

    Returns:
    value of instance variable appendJavaScript

    setAppendJavaScript

    public void setAppendJavaScript(java.lang.String _appendJavaScript)
    This is the setter method for the instance variable appendJavaScript.

    Parameters:
    _appendJavaScript - the appendJavaScript to set

    getDndType

    public java.lang.CharSequence getDndType()
    This is the getter method for the instance variable dndType.

    Returns:
    value of instance variable dndType

    setDndType

    public void setDndType(java.lang.CharSequence _dndType)
    This is the setter method for the instance variable dndType.

    Parameters:
    _dndType - the dndType to set

    getSourceBehavior

    public static DnDBehavior getSourceBehavior()
    Static Method to get DnDBehavior with Source behavior.

    Returns:
    DnDBehavior with Source behavior.

    getSourceBehavior

    public static DnDBehavior getSourceBehavior(java.lang.String _dndType)
    Static Method to get DnDBehavior with Source behavior.

    Parameters:
    _dndType - dndtype to set
    Returns:
    DnDBehavior with Source behavior.

    getItemBehavior

    public static DnDBehavior getItemBehavior(java.lang.String _dndType)
    Static Method to get DnDBehavior with item behavior.

    Parameters:
    _dndType - dndtype to set
    Returns:
    DnDBehavior with item behavior.

    getItemBehavior

    public static DnDBehavior getItemBehavior()
    Static Method to get DnDBehavior with item behavior.

    Returns:
    DnDBehavior with item behavior.

    getHandleBehavior

    public static DnDBehavior getHandleBehavior()
    Static Method to get DnDBehavior with handle behavior.

    Returns:
    DnDBehavior with handle behavior.


    Copyright © 2003-2010 The eFaps Team. All Rights Reserved.