Package com.jbstrap.ui
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 Summary
Modifier and TypeMethodDescriptiondefault TAdds a drag end event handler to the component.default TAdds a drag start event handler to the component.default TsetDraggable(boolean draggable) Sets the draggability of the component.
-
Method Details
-
setDraggable
Sets the draggability of the component. By default, components are not draggable.- Parameters:
draggable- Iftruethe component is draggable, iffalsethey can't be dragged.- Returns:
- The component
-
addDragStartEventHandler
Adds a drag start event handler to the component. The handler will run when the user starts dragging the component.- Parameters:
handler- TheDragStartEventHandlerimplementation- Returns:
- The component
- See Also:
-
addDragEndEventHandler
Adds a drag end event handler to the component. The handler will run when the user stops dragging the component.- Parameters:
handler- TheDragEndEventHandlerimplementation- Returns:
- The component
- See Also:
-