public class FXFocusAndSelectOnClickPolicy extends AbstractFXInteractionPolicy implements IFXOnClickPolicy
FXFocusAndSelectOnClickPolicy
is an IFXOnClickPolicy
that
focuses and selects its host
by altering the
FocusModel
and the SelectionModel
when the host
is clicked by the mouse.adaptable
adaptable
IAdaptable.Bound.Impl<T extends IAdaptable>
Constructor and Description |
---|
FXFocusAndSelectOnClickPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
click(javafx.scene.input.MouseEvent e)
This callback method is invoked when the user performs a mouse click on
the host.
|
protected boolean |
isFocusAndSelect(javafx.scene.input.MouseEvent event)
Returns
true if the given MouseEvent should trigger
focus and select. |
isRegistered, isRegisteredForHost
commit, init, restoreRefreshVisuals, rollback, storeAndDisableRefreshVisuals
adaptableProperty, getAdaptable, getHost, setAdaptable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adaptableProperty, getAdaptable, setAdaptable
public void click(javafx.scene.input.MouseEvent e)
IFXOnClickPolicy
click
in interface IFXOnClickPolicy
e
- The original MouseEvent
.protected boolean isFocusAndSelect(javafx.scene.input.MouseEvent event)
true
if the given MouseEvent
should trigger
focus and select. Otherwise returns false
. Per default
returns true
if a single mouse click is performed.event
- The MouseEvent
in question.true
if the given MouseEvent
should trigger
focus and select, otherwise false
.Copyright (c) 2014 itemis AG and others. All rights reserved.