## org.flexdock.docking.floating.policy
Interface FloatPolicy

All Known Implementing Classes:
  DefaultFloatPolicy, FloatPolicy.NullFloatPolicy

    public interface FloatPolicy

This interface describes a set of method used to determine how floating events should be handled. Classes implementing this interface should be plugged into to the `FloatPolicyManager` to affect floating behavior of the framework at runtime.

Author:
  Christopher Butler

Nested Class Summary
`static class` `FloatPolicy.NullFloatPolicy` Provides a default implementation of the FloatPolicy interface.

Method Summary
`boolean` `isFloatDropAllowed(DockingEvent evt)` Indicates whether floating should be allowed for the specified `DockingEvent` at the end of a drag operation.
`boolean` `isFloatingAllowed(Dockable dockable)` Returns `true` if floating should be allowed for the specified `Dockable`.

Method Detail

### isFloatingAllowed

    boolean isFloatingAllowed(Dockable dockable)

  Returns `true` if floating should be allowed for the specified `Dockable`. This method will be invoked by the `FloatPolicyManager` at the beginning of a drag operation to determine whether or not floating support will be enabled for the `Dockable` as a result of the drag. If this method returns `false`, floating will not be allowed for the drag operation against the specified `Dockable`.

  Parameters:
    `dockable` - the `Dockable` to be checked for floating support
  Returns:
    `true` if floating should be allowed for the specified `Dockable`; `false` otherwise.

### isFloatDropAllowed

    boolean isFloatDropAllowed(DockingEvent evt)

  Indicates whether floating should be allowed for the specified `DockingEvent` at the end of a drag operation. The `FloatPolicyManager` will catch all attempts to float a `Dockable` at the end of a drag operation and invoke this method on all installed `FloatPolicies`. If any of them returns `false`, the docking operation will be canceled.

  Parameters:
    `evt` - the `DockingEvent` to be checked for drop-to-float support
  Returns:
    `true` if floating should be allowed for the specified `DockingEvent`; `false` otherwise.