Interface FloatPolicy
-
- All Known Implementing Classes:
DefaultFloatPolicy,FloatPolicy.NullFloatPolicy
public interface FloatPolicyThis interface describes a set of method used to determine how floating events should be handled. Classes implementing this interface should be plugged into to theFloatPolicyManagerto affect floating behavior of the framework at runtime.- Author:
- Christopher Butler
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classFloatPolicy.NullFloatPolicyProvides a default implementation of the FloatPolicy interface.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisFloatDropAllowed(DockingEvent evt)Indicates 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 Detail
-
isFloatingAllowed
boolean isFloatingAllowed(Dockable dockable)
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
boolean isFloatDropAllowed(DockingEvent evt)
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.
-
-