Processing focus
When you scroll the pulley, override the nextfocus () method to specify how the field gets the focus. Direction Parameter
Describes the direction of Focus movement (in general, when the pulley scroll down, the focus is down and the right direction. When the pulley is up
Scroll, focus up and left ).
Protected int nextfocus (INT direction, Boolean alt ){
Int Index = This. getfieldwithfocusindex ();
If (ALT ){
If (direction> 0 ){
// Action to perform if trackwheel is rolled up
}
Else
{
// Action to perform if trackwheel is rolled down
}
} I
If
(Index = This. getfieldwithfocusindex ())
Return super. nextfocus (Direction, alt );
Else
Return Index;
}
In order to move the focus to the next field, but in the Manager order, this field is not the next field, so overwrite it.
Nextfocus (). For example, if you want to implement the page-up and page-down functions for your manager, then nextfocus ()
This is useful.
This is written in the development document, but the framework is not called after I re-write nextfocus () In practice, and no one knows about this.