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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classProvides a default implementation of the FloatPolicy interface. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether floating should be allowed for the specifiedDockingEventat the end of a drag operation.booleanisFloatingAllowed(Dockable dockable) Returnstrueif floating should be allowed for the specifiedDockable.
-
Method Details
-
isFloatingAllowed
Returnstrueif floating should be allowed for the specifiedDockable. This method will be invoked by theFloatPolicyManagerat the beginning of a drag operation to determine whether or not floating support will be enabled for theDockableas a result of the drag. If this method returnsfalse, floating will not be allowed for the drag operation against the specifiedDockable.- Parameters:
dockable- theDockableto be checked for floating support- Returns:
trueif floating should be allowed for the specifiedDockable;falseotherwise.
-
isFloatDropAllowed
Indicates whether floating should be allowed for the specifiedDockingEventat the end of a drag operation. TheFloatPolicyManagerwill catch all attempts to float aDockableat the end of a drag operation and invoke this method on all installedFloatPolicies. If any of them returnsfalse, the docking operation will be canceled.- Parameters:
evt- theDockingEventto be checked for drop-to-float support- Returns:
trueif floating should be allowed for the specifiedDockingEvent;falseotherwise.
-