Class DropTarget


  • @OpenApiAll
    public class DropTarget
    extends java.lang.Object
    Class is used as a wrapper for drag and drop handler data
    • Field Detail

      • valid

        private boolean valid
      • description

        @CheckForNull
        private java.lang.String description
      • cursor

        @CheckForNull
        private java.awt.Cursor cursor
    • Constructor Detail

      • DropTarget

        public DropTarget​(@CheckForNull
                          PresentationElement target,
                          boolean valid,
                          @CheckForNull
                          java.lang.String description,
                          @CheckForNull
                          java.awt.Cursor cursor)
        Parameters:
        target - presentation element which the drag is dropped on
        valid - check whether the drop target is valid
        description - to be shown on the drop
        cursor - to be shown on the drop
      • DropTarget

        public DropTarget​(@CheckForNull
                          PresentationElement target,
                          boolean valid,
                          @CheckForNull
                          java.lang.String description)
        Parameters:
        target - presentation element which the drag is dropped on
        valid - check whether the drop target is valid
        description - to be shown on the drop
      • DropTarget

        public DropTarget​(@CheckForNull
                          PresentationElement target,
                          boolean valid)
        Parameters:
        target - presentation element which the drag is dropped on
        valid - check whether the drop target is valid
      • DropTarget

        public DropTarget​(@CheckForNull
                          PresentationElement target)
        Parameters:
        target - presentation element which the drag is dropped on
      • DropTarget

        public DropTarget​(@CheckForNull
                          PresentationElement target,
                          @CheckForNull
                          java.lang.String description)
        Parameters:
        target - presentation element which the drag is dropped on
        description - to be shown on the drop
    • Method Detail

      • getTarget

        @CheckForNull
        public PresentationElement getTarget()
        Returns:
        target presentation element which the drag is dropped on
      • isValid

        public boolean isValid()
        Returns:
        whether dropped target is valid or not
      • getDescription

        @CheckForNull
        public java.lang.String getDescription()
        Returns:
        description of the dropped target
      • getCursor

        @CheckForNull
        public java.awt.Cursor getCursor()
        Returns:
        cursor that is shown on drop
      • setTarget

        public void setTarget​(@CheckForNull
                              PresentationElement target)
        Set presentation element for the drop target
        Parameters:
        target - presentation element
      • setValid

        public void setValid​(boolean valid)
        Set valid to true if drop is correct
        Parameters:
        valid - true if valid drop, otherwise false
      • setDescription

        public void setDescription​(@CheckForNull
                                   java.lang.String description)
        Set description of dropped target
        Parameters:
        description - string representation for dropped target
      • setCursor

        public void setCursor​(@CheckForNull
                              java.awt.Cursor cursor)
        Set cursor for the drop
        Parameters:
        cursor - of the drop