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, name
Fields 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 TypeMethodDescriptionvoid
The afterField event is invoked (in add/update/delete mode) after the field is current -- that is as some other field becomes current.void
backgroundColor(String color)
void
The beforeField event is invoked each time the field becomes current (in add/update/delete mode).void
clearAddExp(String exp)
void
clearFindExp(String exp)
void
displayAndRestart(String msg)
void
The initField event section is invoked on each field when the form is activated.void
The onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).void
The onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.void
void
requestFocus(boolean executeNextField)
void
searchRanges(String ranges)
void
setListener(FieldListener listener)
Atribui um listener para este controller estender ou sobrescrever seus eventos.void
Valida o campo atual, e, se não estiver válido, o apaga.void
setStippled(boolean stippled)
boolean
void
stopForInput(boolean canStop)
boolean
void
updateable(boolean updateable)
void
validar()
The validar event is invoked whenever input is accepted on the field (in add/update/delete mode).boolean
visible()
void
visible(boolean visible)
void
The 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:
validar
in 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:
afterField
in interfaceFieldListener
- Throws:
Exception
-
beforeField
The beforeField event is invoked each time the field becomes current (in add/update/delete mode).- Specified by:
beforeField
in interfaceFieldListener
- Throws:
Exception
-
initField
The initField event section is invoked on each field when the form is activated.- Specified by:
initField
in interfaceFieldListener
- Throws:
Exception
-
onDataAccept
The onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).- Specified by:
onDataAccept
in interfaceFieldListener
- Throws:
Exception
-
onSearchRangeAccept
The onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.- Specified by:
onSearchRangeAccept
in interfaceFieldListener
- Throws:
Exception
-
whenValueChanges
The whenValueChanges event is invoked whenever the field is set to a new, different value.- Specified by:
whenValueChanges
in 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)
-