Annotation Type GlobalDragHandler


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface GlobalDragHandler
This annotation indicates the method that will be the global drag handler for the Gui. The annotation must be placed on a method declaration. The method must occur in a class which extends a subtype of Gui; this may not be an enclosing, enclosed, or parent class. The gui will automatically have its global drag handler set to this method. This handler may be overwritten at a later moment with Gui.setOnGlobalDrag(Consumer). If multiple methods within this class have this annotation, a MultipleAnnotationsException will be thrown.

The referenced method may either have no parameters declared, or one parameter declared which equals or is a supertype of InventoryDragEvent. If it has one parameter declared, the argument upon this method being called will be the event that was fired during the corresponding drag.

If this method does not have the correct parameters, InvalidParametersException will be thrown.

Since:
0.12.1