Package com.nomagic.magicdraw.ui.dnd
Class DropTarget
- java.lang.Object
-
- com.nomagic.magicdraw.ui.dnd.DropTarget
-
@OpenApiAll public class DropTarget extends java.lang.ObjectClass is used as a wrapper for drag and drop handler data
-
-
Constructor Summary
Constructors Constructor Description DropTarget(PresentationElement target)DropTarget(PresentationElement target, boolean valid)DropTarget(PresentationElement target, boolean valid, java.lang.String description)DropTarget(PresentationElement target, boolean valid, java.lang.String description, java.awt.Cursor cursor)DropTarget(PresentationElement target, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.CursorgetCursor()java.lang.StringgetDescription()PresentationElementgetTarget()booleanisValid()voidsetCursor(java.awt.Cursor cursor)Set cursor for the dropvoidsetDescription(java.lang.String description)Set description of dropped targetvoidsetTarget(PresentationElement target)Set presentation element for the drop targetvoidsetValid(boolean valid)Set valid to true if drop is correct
-
-
-
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 onvalid- check whether the drop target is validdescription- to be shown on the dropcursor- 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 onvalid- check whether the drop target is validdescription- to be shown on the drop
-
DropTarget
public DropTarget(@CheckForNull PresentationElement target, boolean valid)- Parameters:
target- presentation element which the drag is dropped onvalid- 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 ondescription- 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
-
-