public class ComboBoxBaseBehavior<T> extends BehaviorBase<ComboBoxBase<T>>
Modifier and Type | Field and Description |
---|---|
protected static java.util.List<KeyBinding> |
COMBO_BOX_BASE_BINDINGS |
private boolean |
keyDown
Indicates that a keyboard key has been pressed which represents the
event (this could be space bar for example).
|
private KeyEvent |
lastEvent
Used to keep track of the most recent key event.
|
private boolean |
mouseInsideButton |
private static java.lang.String |
PRESS_ACTION |
private static java.lang.String |
RELEASE_ACTION |
private boolean |
showPopupOnMouseRelease |
private TwoLevelFocusComboBehavior |
tlFocus
*
Constructors *
*
|
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS, TRAVERSE_DOWN, TRAVERSE_LEFT, TRAVERSE_NEXT, TRAVERSE_PREVIOUS, TRAVERSE_RIGHT, TRAVERSE_UP
Constructor and Description |
---|
ComboBoxBaseBehavior(ComboBoxBase<T> comboBox,
java.util.List<KeyBinding> bindings) |
Modifier and Type | Method and Description |
---|---|
void |
arm() |
private void |
arm(MouseEvent e) |
protected void |
callAction(java.lang.String name)
Called to invoke the action associated with the given name.
|
protected void |
callActionForEvent(KeyEvent e)
Invokes the appropriate action for this key event.
|
protected void |
cancelEdit(KeyEvent event) |
void |
disarm() |
void |
dispose()
Called by a Skin when the Skin is disposed.
|
protected void |
focusChanged()
*
Focus change handling *
*
|
protected void |
forwardToParent(KeyEvent event) |
private void |
getFocus() |
void |
hide() |
private void |
keyPressed()
This function is invoked when an appropriate keystroke occurs which
causes this button to be armed if it is not already armed by a mouse
press.
|
private void |
keyReleased()
Invoked when a valid keystroke release occurs which causes the button
to fire if it was armed by a keyPress.
|
void |
mouseEntered(MouseEvent e)
Invoked by a Skin when the body of the control has been entered by
the mouse.
|
void |
mouseExited(MouseEvent e)
Invoked by a Skin when the body of the control has been exited by
the mouse.
|
void |
mousePressed(MouseEvent e)
*
Mouse Events *
*
|
void |
mouseReleased(MouseEvent e)
Invoked by a Skin when the body of the control has been released by
the mouse.
|
void |
onAutoHide() |
void |
show() |
contextMenuRequested, getControl, matchActionForEvent, mouseDragged, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
private TwoLevelFocusComboBehavior tlFocus
private KeyEvent lastEvent
private boolean keyDown
private static final java.lang.String PRESS_ACTION
private static final java.lang.String RELEASE_ACTION
protected static final java.util.List<KeyBinding> COMBO_BOX_BASE_BINDINGS
private boolean showPopupOnMouseRelease
private boolean mouseInsideButton
public ComboBoxBaseBehavior(ComboBoxBase<T> comboBox, java.util.List<KeyBinding> bindings)
public void dispose()
BehaviorBase
dispose
in class BehaviorBase<ComboBoxBase<T>>
protected void focusChanged()
focusChanged
in class BehaviorBase<ComboBoxBase<T>>
protected void callActionForEvent(KeyEvent e)
BehaviorBase
callActionForEvent
in class BehaviorBase<ComboBoxBase<T>>
e
- The key event. Must not be null.protected void callAction(java.lang.String name)
BehaviorBase
When a KeyEvent is handled, it is first passed through callActionForEvent which resolves which "action" should be executed based on the key event. This action is indicated by name. This name is then passed to this function which is responsible for invoking the right function based on the name.
callAction
in class BehaviorBase<ComboBoxBase<T>>
private void keyPressed()
private void keyReleased()
protected void forwardToParent(KeyEvent event)
protected void cancelEdit(KeyEvent event)
public void mousePressed(MouseEvent e)
mousePressed
in class BehaviorBase<ComboBoxBase<T>>
e
- the mouse eventpublic void mouseReleased(MouseEvent e)
BehaviorBase
mouseReleased
in class BehaviorBase<ComboBoxBase<T>>
e
- the mouse eventpublic void mouseEntered(MouseEvent e)
BehaviorBase
mouseEntered
in class BehaviorBase<ComboBoxBase<T>>
e
- the mouse eventpublic void mouseExited(MouseEvent e)
BehaviorBase
mouseExited
in class BehaviorBase<ComboBoxBase<T>>
e
- the mouse eventprivate void getFocus()
private void arm(MouseEvent e)
public void show()
public void hide()
public void onAutoHide()
public void arm()
public void disarm()