Package systextil.nxj
Class FieldController<T extends Comparable<? super T>>
java.lang.Object
systextil.nxj.datatypes.Nullable<T>
systextil.nxj.FieldController<T>
- Type Parameters:
T- o tipo de dados do campo
- All Implemented Interfaces:
Comparable<Object>,FieldListener
- Direct Known Subclasses:
AmountField,BooleanField,ChainedFieldController,DateField,DoubleField,IntField,StringField,TimeField,TimestampField
public abstract class FieldController<T extends Comparable<? super T>>
extends Nullable<T>
implements FieldListener
FieldController é a classe base para todas as classes
que representem um Field do NXJ- Author:
- Tiago H. Engel
-
Field Summary
Fields inherited from class systextil.nxj.datatypes.Nullable
containingDataView, nameFields inherited from interface systextil.nxj.FieldListener
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionFieldController(DataViewController controller, DataViewValue<T> data)FieldController(DataViewController controller, DataViewValue<T> data, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidThe afterField event is invoked (in add/update/delete mode) after the field is current -- that is as some other field becomes current.voidbackgroundColor(String color)voidThe beforeField event is invoked each time the field becomes current (in add/update/delete mode).voidclearAddExp(String exp)voidclearFindExp(String exp)voiddisplayAndRestart(String msg)voidThe initField event section is invoked on each field when the form is activated.voidThe onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).voidThe onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.voidvoidrequestFocus(boolean executeNextField)voidsearchRanges(String ranges)voidsetListener(FieldListener listener)Atribui um listener para este controller estender ou sobrescrever seus eventos.voidValida o campo atual, e, se não estiver válido, o apaga.voidsetStippled(boolean stippled)booleanvoidstopForInput(boolean canStop)booleanvoidupdateable(boolean updateable)voidvalidar()The validar event is invoked whenever input is accepted on the field (in add/update/delete mode).booleanvisible()voidvisible(boolean visible)voidThe whenValueChanges event is invoked whenever the field is set to a new, different value.
-
Constructor Details
-
FieldController
-
FieldController
-
-
Method Details
-
setListener
Atribui um listener para este controller estender ou sobrescrever seus eventos. Se não for atribuído nenhum, é usadoFieldListener.EMPTY. -
setNullIfNotValid
public void setNullIfNotValid()Valida o campo atual, e, se não estiver válido, o apaga. Isto é especialmente útil para evitar atribuir a campos de formulários um valor que não seja válido. -
validar
The validar event is invoked whenever input is accepted on the field (in add/update/delete mode). Use this event to validate if the input is valid.- Specified by:
validarin interfaceFieldListener- Throws:
Exception- when the validation fails
-
afterField
The afterField event is invoked (in add/update/delete mode) after the field is current -- that is as some other field becomes current.- Specified by:
afterFieldin interfaceFieldListener- Throws:
Exception
-
beforeField
The beforeField event is invoked each time the field becomes current (in add/update/delete mode).- Specified by:
beforeFieldin interfaceFieldListener- Throws:
Exception
-
initField
The initField event section is invoked on each field when the form is activated.- Specified by:
initFieldin interfaceFieldListener- Throws:
Exception
-
onDataAccept
The onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).- Specified by:
onDataAcceptin interfaceFieldListener- Throws:
Exception
-
onSearchRangeAccept
The onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.- Specified by:
onSearchRangeAcceptin interfaceFieldListener- Throws:
Exception
-
whenValueChanges
The whenValueChanges event is invoked whenever the field is set to a new, different value.- Specified by:
whenValueChangesin interfaceFieldListener- Throws:
Exception
-
clearAddExp
-
clearFindExp
-
backgroundColor
-
backgroundColor
-
searchRanges
-
visible
public void visible(boolean visible) -
visible
public boolean visible() -
setStippled
public void setStippled(boolean stippled) -
stopForInput
public void stopForInput(boolean canStop) -
stopForInput
public boolean stopForInput() -
updateable
public void updateable(boolean updateable) -
updateable
public boolean updateable() -
displayAndRestart
-
requestFocus
public void requestFocus() -
requestFocus
public void requestFocus(boolean executeNextField)
-