Interface Draggable<T extends Component<?>>

Type Parameters:
T - The component type
All Known Implementing Classes:
ActivityStream, ActivityStreamItem, Badge, BaseLoginPage, BasePage, Blockquote, Breadcrumb, Button, CheckboxItem, CodeViewer, ColorPicker, ComboboxItem, Container, DatePicker, DateRangePicker, DropDownButton, DualListBox, FileItem, FileMiniature, Form, Header, HorizontalSplitter, IBox, Image, IntegerItem, Link, ListBox, ListGrid, ListItem, LoadButton, MenuBar, NavBarItem, NumberItem, Paragraph, PasswordItem, ProgressBar, RadioButtonItem, Row, SelectorItem, Small, Span, Sparkline, StaticTextItem, SwitchItem, Tab, Table, TableCell, TableHeader, TableRow, TabPage, TextFilter, TextItem, Timeline, TimelineItem, Toolbar, Treeview, TreeviewNode, UI.RootLayout, VerticalSplitter, Wizard, WizardStep

public interface Draggable<T extends Component<?>>

Components that can be dragged across the screen.

Components that implement this interface can have drag & drop functionality. If the component is made draggable, then the user can grab and drag the component to another position on the screen. Moreover, this interface provides the addition of the dragStart and dragEnd event handlers to the component.

Since:
4.0
Author:
JBStrap
See Also:
  • Method Details

    • setDraggable

      default T setDraggable(boolean draggable)
      Sets the draggability of the component. By default, components are not draggable.
      Parameters:
      draggable - If true the component is draggable, if false they can't be dragged.
      Returns:
      The component
    • addDragStartEventHandler

      default T addDragStartEventHandler(DragStartEventHandler handler)
      Adds a drag start event handler to the component. The handler will run when the user starts dragging the component.
      Parameters:
      handler - The DragStartEventHandler implementation
      Returns:
      The component
      See Also:
    • addDragEndEventHandler

      default T addDragEndEventHandler(DragEndEventHandler handler)
      Adds a drag end event handler to the component. The handler will run when the user stops dragging the component.
      Parameters:
      handler - The DragEndEventHandler implementation
      Returns:
      The component
      See Also: