Show TOC Start of Content Area

Object documentation Drag Source  Locate the document in its SAP Library structure

Definition

DragSource is a container that contains controls that can be dragged. This component works together with dropTarget component which defines the container where the dragged item can be dropped off.

·        columnKey

Defines the column of the dragSource when the dragSource is used in a custom defined cellRenderer of a TableView or inside a Tree. The column key can be recovered with the DropEvent object.

·        dropTargetDesign

Defines the design of the marker which is used to indicated the dropTarget where the 'flavours' attribut matches. The marker is displayed when a dragSource component has been clicked and dragging has started.

¡        BORDERED

Displays a frame around the matching dropTarget.

¡        UNDERLINED

Displays a base line under the matching dropTarget.

¡        NONE

No indication of the matching dropTarget.

·        flavours

Flavours are used to identify possible dropTargets. When this 'flavours' attribute matched with the 'flavours' attribute of a dropTarget it is identified as possible drop of target. Drag-and-Drop is only possible if the dragSource contains at least one flavour of the dropTarget. A dragSource can have more than one flavour assigned to it. Use the addFlavour method to add additional flavours.

·        id

Identification name of the dragSource.

·        scope

Defines if the drag-and-drop process can take place only inside the current form or in the whole browser.

¡        Browser

drag-and-drop process can take place in the whole browser.

¡        Form

drag-and-drop process can take place in the current form.

 

Note

For the Netscape browser only the scope FORM is supported.

·        sourceContainerName

Defines the source container of the dragSource when the dragSource is used in a custom defined cellRenderer of a TableView or inside a Tree. The sourceContainerName can be recovered with the DropEvent object.

·        value

Sets the value of the dragSource. The value is transferred from the dragSource to the dropTarget when dropping is complete. The value can be recovered with the DropEvent object.

·        width

Sets the width of the dragSource container.

 

Attributes

M

Values

Usage

columnKey

 

String (cs)

 

Taglib
No tag available

Classlib
setColumnKey("aKey")

dropTargetDesign

 

BORDERED
UNDERLINE
NONE

Taglib
dropTargetDesign="NONE"

Classlib
setDropTargetDesign(DropTargetDesign.NONE)

flavours

 

String (cs)

Taglib
flavours="F1"

Classlib
setFlavours("F1")

id

*

String (cs)

Taglib
id="drag"

Classlib
setId("drag")

scope

 

BROWSER
FORM

Taglib
scope="BROWSER"

Classlib
setScope(Scope.Browser)

sourceContainerName

 

String (cs)

Taglib
No tag available

Classlib
setSourceContainerName("s1")

value

 

String

Taglib
value="R2D2"

Classlib
setValue("R2D2")

width

 

Unit

Taglib
No tag available

Classlib
setWidth("100")

 

Example

using the taglib

    <hbj:dragSource
          id=
"dragid1"
          
flavours="F1"
          
value="R2D2"
    
/>

 

Result

This graphic is explained in the accompanying text

 

 

End of Content Area