Package com.formdev.flatlaf
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 class
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private static SubMenuUsabilityHelper
private Rectangle
private static final String
private static final String
private int
private int
private int
private int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Polygon
private int
findSubMenu
(MenuElement[] path) (package private) static boolean
install()
private void
void
(package private) static void
private void
-
Field Details
-
KEY_USE_SAFE_TRIANGLE
- See Also:
-
KEY_SHOW_SAFE_TRIANGLE
- See Also:
-
instance
-
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:
stateChanged
in interfaceChangeListener
-
uninstallEventQueue
private void uninstallEventQueue() -
findSubMenu
-
createSafeTriangle
-