The
invocationEditKey
event handler is a special user-defined
Function
that can be added to a
JTable
when it is created
and that will be called automatically with a single
InvocationEvent
argument whenever a key is pressed, released or typed in a
JTable
cell that is in edit mode.
An
invocationEditKey
event handler can only be added via
addEventHandler
after a component is created,
but an existing
invocationEditKey
event handler can be assigned new values.
Assigning
NULL
to
invocationEditKey
disables its functionality until a
non-NULL
value is assigned to it.
The
InvocationEvent
received by this handler will have the following fields:
| etc |
A field that is not currently used and may not be defined,
but it should be considered reserved for releases.
| | id |
An
Object
that must be an
int
or
String,
that identifies the type of this event.
A value that is a
String
must be the name of an event handler that can process this event.
A value that is an
int
must be a number that the
yoix.event.HandlerID
dictionary associates with an event handler that can process this event.
In practice,
id
is only used when you build an event that gets handed to
postEvent,
and in that case the value assigned to
id
is almost always a
String.
| | keychar |
An
int
that is the Unicode character represented by this event, or
-1
if there is no corresponding Unicode character.
| | keycode |
An
int
that represents the virtual key code for the key that was pressed or released.
Virtual key codes are defined in the
KeyCode
dictionary that can be found in
yoix.awt
or
yoix.swing.
| | keyevent |
An
int
that indicates what sort of key event in the edit cell resulted in this event.
The value can be
KEYPRESSED,
KEYRELEASED
or
KEYTYPED,
which are constants defined in
yoix.event.
| | keystring |
A
String
representation of the Unicode character stored in
keychar
or the empty string (i.e.,
"")
if
keychar
is
-1,
which means it does not represent a Unicode character.
| | modifiers |
An
int
that is a bitmask that always records the state of the keyboard modifiers
when the event occurred.
modifiers
also tries to record the state of the mouse buttons at the time of the event.
Unfortunately, mouse button and keyboard modifier flags overlap
(e.g.,
BUTTON2_MASK
and
ALT_MASK
match), so
modifiers
can not record the state of all mouse buttons, however reliable information about
them is available in
modifiersdown.
modifiers
and
modifiersdown
use disjoint sets of bits as flags, so make sure you test
modifiers
using some combination of
BUTTON1_MASK,
BUTTON2_MASK,
BUTTON3_MASK,
SHIFT_MASK,
CTRL_MASK,
ALT_MASK,
META_MASK,
and
ALT_GRAPH_MASK,
which are defined in
yoix.awt
and
yoix.swing.
Also available are
BUTTON_MASK
and
KEY_MASK,
which are convenient combinations that can be used to test for
any mouse button or any keyboard modifier.
| | modifiersdown |
An
int
that is a bitmask that represents the state of all keyboard modifiers
and mouse buttons when the event occurred.
modifiersdown
and
modifiers
use disjoint sets of bits as flags, so make sure you test
modifiersdown
using some combination of
BUTTON1_DOWN_MASK,
BUTTON2_DOWN_MASK,
BUTTON3_DOWN_MASK,
SHIFT_DOWN_MASK,
CTRL_DOWN_MASK,
ALT_DOWN_MASK,
META_DOWN_MASK,
and
ALT_GRAPH_DOWN_MASK,
which are defined in
yoix.awt
and
yoix.swing.
Also available are
BUTTON_DOWN_MASK
and
KEY_DOWN_MASK,
which are convenient combinations that can be used to test for
any mouse button or any keyboard modifier.
| | valuesColumn |
An
int
that is the column location where the cell editing occurred in terms
of the column's position in the values matrix.
| | valuesRow |
An
int
that is the row location where the cell editing occurred in terms
of the row's position in the values matrix.
| | view |
The text view of the cell after to the editing change.
The text view is the
String
representation of the data underlying the cell as it is displayed in
the cell (see below).
| | viewColumn |
An
int
that is the column location where the cell editing occurred in terms
of the column's position in the view matrix.
| | viewRow |
An
int
that is the row location where the cell editing occurred in terms
of the row's position in the view matrix.
| | when |
A
double
that is a time value indicating when the event occurred.
|
| |
| Return: |
none
| | |
| See Also: |
actionPerformed,
addEventHandler,
adjustmentValueChanged,
caretUpdate,
componentHidden,
componentMoved,
componentResized,
componentShown,
dragDropEnd,
dragEnter,
dragExit,
dragGestureRecognized,
dragMouseMoved,
dragOver,
drop,
dropActionChanged,
Event,
focusGained,
focusLost,
hyperlinkActivated,
hyperlinkEntered,
hyperlinkExited,
invocationAction,
invocationBrowse,
invocationChange,
InvocationEdit,
InvocationEvent,
invocationRun,
invocationSelection,
itemStateChanged,
keyPressed,
keyReleased,
keyTyped,
mouseClicked,
mouseDragged,
mouseEntered,
mouseExited,
mouseMoved,
mousePressed,
mouseReleased,
mouseWheelMoved,
removeEventHandler,
stateChanged,
textValueChanged,
valueChanged,
windowActivated,
windowClosed,
windowClosing,
windowDeactivated,
windowDeiconified,
windowIconified,
windowOpened
|
|