Class SubMenuUsabilityHelper
java.lang.Object
com.formdev.flatlaf.SubMenuUsabilityHelper
- All Implemented Interfaces:
EventListener, ChangeListener
Improves usability of submenus by using a
safe triangle
to avoid that the submenu closes while the user moves the mouse to it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate static SubMenuUsabilityHelperprivate Rectangleprivate static final Stringprivate static final Stringprivate intprivate intprivate intprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Polygonprivate intfindSubMenu(MenuElement[] path) (package private) static booleaninstall()private voidvoid(package private) static voidprivate void
-
Field Details
-
KEY_USE_SAFE_TRIANGLE
- See Also:
-
KEY_SHOW_SAFE_TRIANGLE
- See Also:
-
instance
-
eventQueuePushNotSupported
private boolean eventQueuePushNotSupported -
subMenuEventQueue
-
safeTrianglePainter
-
changePending
private boolean changePending -
mouseX
private int mouseX -
mouseY
private int mouseY -
targetX
private int targetX -
targetTopY
private int targetTopY -
targetBottomY
private int targetBottomY -
invokerBounds
-
-
Constructor Details
-
SubMenuUsabilityHelper
SubMenuUsabilityHelper()
-
-
Method Details
-
install
static boolean install() -
uninstall
static void uninstall() -
stateChanged
- Specified by:
stateChangedin interfaceChangeListener
-
uninstallEventQueue
private void uninstallEventQueue() -
findSubMenu
-
createSafeTriangle
-