Game Control Plus  1.2.2
 All Classes Namespaces Functions Variables Pages
org.gamecontrolplus.gui.MTabManager Class Reference

Public Member Functions

boolean addControls (MEditableTextControl...controls)
 
boolean addControl (MEditableTextControl control)
 
boolean removeControl (MEditableTextControl control)
 

Package Functions

boolean nextControl (MEditableTextControl control)
 
boolean prevControl (MEditableTextControl control)
 

Private Attributes

LinkedList< MEditableTextControltextControls
 

Detailed Description

Allows TABBING between text controls. A tab manager allows the user to use the TAB key to move from one text control (GTextField or GTextArea) to the another. This is useful when creating a 'form' made from several text controls.
The tab order is decided by the order the text controls are added to the tab manager. The TAB key move the focus forwards and SHIFT+TAB moves it backwards. Note that tabbing is not cyclic so pressing TAB on the last control does not set the focus on the first control, in fact it will be ignored. Similar logic applies to SHIFT_TAB on the first control
At least 2 controls must be added to the tab manager.

Author
Peter Lager

Member Function Documentation

boolean org.gamecontrolplus.gui.MTabManager.addControl ( MEditableTextControl  control)

Add the next text control to this tab manager.

Parameters
controlto add
Returns
true if added successfully
boolean org.gamecontrolplus.gui.MTabManager.addControls ( MEditableTextControl...  controls)

Attempt to add multiple controls to the tab manager. The tab order is determined by their order as parameters to this method.

Parameters
controlsa comma separated list of text field or text area controls.
Returns
true if any or all of the controls were added and false if none were added.
boolean org.gamecontrolplus.gui.MTabManager.nextControl ( MEditableTextControl  control)
package

Used when the tab key is pressed to move to the next control

Parameters
control
Returns
true if it found a next control else false
boolean org.gamecontrolplus.gui.MTabManager.prevControl ( MEditableTextControl  control)
package

Used when the shift+tab key is pressed to move to the previous control

Parameters
control
Returns
true if it found a previous control else false
boolean org.gamecontrolplus.gui.MTabManager.removeControl ( MEditableTextControl  control)

Remove a control from the tab manager. This does not affect the tab order of the remaining controls.

Parameters
control
Returns
true if remove successfully