public class LanguageCodeComposite
extends Composite
Constructor and Description |
---|
LanguageCodeComposite(Composite parent,
int style,
int marginWidth,
int marginHeight,
boolean addNoLanguageEntry)
Creates the language composite with a callback when text changes.
|
Modifier and Type | Method and Description |
---|---|
void |
addDoubleClickListener(Runnable doubleClick)
Adds a double-click listener.
|
void |
addValidator(ValidatorManager validatorManager,
boolean mustValidate)
Adds a validator to the language code.
|
String |
getLanguageCode()
Gets the current language code.
|
Table |
getTable()
Gets the table.
|
boolean |
isLanguageValid(String languageCode)
Checks if a language code is valid.
|
boolean |
isValid()
Returns if the language code is valid.
|
void |
modifyText(ModifyEvent e)
Changes in new name.
|
void |
setLanguageCode(String languageCode,
Runnable callback)
Sets the current language and defines the callback that will be called whenever
the language changes.
|
public LanguageCodeComposite(Composite parent, int style, int marginWidth, int marginHeight, boolean addNoLanguageEntry)
parent
- The parent.style
- Style for this composite (e.g. SWT.NONE or SWT.BORDER).marginWidth
- Margin width in the composite.marginHeight
- Margin height in the composite.addNoLanguageEntry
- Flag indicating the "none" language (empty string) is allowed and should be added.public void setLanguageCode(String languageCode, Runnable callback)
public void addDoubleClickListener(Runnable doubleClick)
public String getLanguageCode()
public void modifyText(ModifyEvent e)
e
- The modify event.public void addValidator(ValidatorManager validatorManager, boolean mustValidate)
public Table getTable()
public boolean isValid()
public boolean isLanguageValid(String languageCode)
languageCode
- Language code to verify.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.