16.3. <rich:dragIndicator>
The
<rich:dragIndicator> component defines a graphical element to display under the mouse cursor during a drag-and-drop operation.
16.3.1. Basic usage
To use a drag indicator, define the inner content that appears during a drag event. No additional attributes are required. If a drag indicator is not used, a clone of the drag source is used instead.
16.3.2. Styling the indicator
The drag indicator can be styled depending on the current state of the dragged element. There are three attributes for different states. The attributes reference the CSS class to use for styling the drag indicator when the dragged element is in the relevant state.
acceptClass- The
acceptClassattribute specifies the style when the dragged element is over an acceptable drop target. It indicates that thetypeattribute of the element's<rich:dragSource>component matchesacceptedTypesattribute of the drop target's<rich:dropTarget>component. rejectClass- The
rejectClassattribute specifies the style when the dragged element is over a drop target that is not acceptable. It indicates that thetypeattribute of the element's<rich:dragSource>component is not found in theacceptedTypesattribute of the drop target's<rich:dropTarget>component. draggingClass- The
draggingClassattribute specifies the style when the dragged element is being dragged. It indicates that the dragged element is not over a drop target.
16.3.3. Reference data
component-type:org.richfaces.DragIndicatorcomponent-class:org.richfaces.component.UIDragIndicatorcomponent-family:org.richfaces.DragIndicatorrenderer-type:org.richfaces.DragIndicatorRenderer
16.3.4. Style classes
Style classes (selectors)
- .rf-ind
- This class defines styles for the drag indicator.
- .rf-ind-drag.accept
- This class defines styles for the indicator when it is over an acceptable drop target.
- .rf-ind-drag.reject
- This class defines styles for the indicator when it is over an unacceptable drop target.
- .rf-ind-drag.default
- This class defines styles for the indicator when it is being dragged, and is not over any drop targets.