Interface Focusable

Description

In BBj 6.0 and higher, a BBjControl implements the Focusable interface if the user can focus the control via either the mouse or keyboard.

Note: A focused control is the control to which keyboard interaction is directed. Typically, the focused control is indicated visually, often via a dotted grey border. A control which is not focusable, therefore, cannot be manipulated via the keyboard. It is still possible to interact with a non-focusable control via the mouse. To disable all interaction, including the mouse, see setEnabled() and setEditable().

Implementing Classes

BBjBarChart, BBjButton, BBjCEdit, BBjChart, BBjCheckBox, BBjColorChooser, BBjCommonChart, BBjDataAwareGrid, BBjDataBoundGrid, BBjEditBox, BBjEditBoxSpinner, BBjFileChooser, BBjFontChooser, BBjGenericChart, BBjGrid, BBjHtmlView, BBjInputD, BBjInputDSpinner, BBjInputE, BBjInputESpinner, BBjInputN, BBjInputNSpinner, BBjLineChart, BBjListBox, BBjListButton, BBjListEdit, BBjMenuButton, BBjNavigator, BBjPieChart, BBjRadioButton, BBjScrollBar, BBjSlider, BBjStandardGrid, BBjTabCtrl, BBjToolButton, BBjTree, BBjWrappedJComponent

Methods of Focusable

Return Value

Method

boolean

isFocusable()

void

setFocusable(boolean focus)

Example

REM EXAMPLE FOR Focusable
LET myAPI!=BBjAPI()

SYSGUI=UNT
OPEN (SYSGUI) "X0"

LET mySysGui!=myAPI!.getSysGui()

myWindow! = mySysGui!.addWindow(10,10,100,300,"Mouse Focusable  Demo",$00010003$)
both1! = myWindow!.addEditBox(101,10,10,90,30,"Both Tab and Mouse",$0008$)
both2! = myWindow!.addEditBox(102,10,50,90,30,"Both Tab and Mouse",$0008$)

justMouse! = myWindow!.addEditBox(104,10,150,90,30,"Just Mouse",$0008$)
justMouse!.setTabTraversable(0)

justMouse! = myWindow!.addEditBox(105,10,200,90,30,"Neither",$$)
justMouse!.setFocusable(0)

neither! =  myWindow!.addButton(106,10,250,90,30,"Neither",$0000$)
neither!.setFocusable(0)

See Also

BBjAPI

BBjSysGui

TabTraversable

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.