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
  • Constructor Details

  • Method Details

    • setListener

      public void setListener(FieldListener listener)
      Atribui um listener para este controller estender ou sobrescrever seus eventos. Se não for atribuído nenhum, é usado FieldListener.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

      public void validar() throws Exception
      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 interface FieldListener
      Throws:
      Exception - when the validation fails
    • afterField

      public void afterField() throws Exception
      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 interface FieldListener
      Throws:
      Exception
    • beforeField

      public void beforeField() throws Exception
      The beforeField event is invoked each time the field becomes current (in add/update/delete mode).
      Specified by:
      beforeField in interface FieldListener
      Throws:
      Exception
    • initField

      public void initField() throws Exception
      The initField event section is invoked on each field when the form is activated.
      Specified by:
      initField in interface FieldListener
      Throws:
      Exception
    • onDataAccept

      public void onDataAccept() throws Exception
      The onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).
      Specified by:
      onDataAccept in interface FieldListener
      Throws:
      Exception
    • onSearchRangeAccept

      public void onSearchRangeAccept() throws Exception
      The onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.
      Specified by:
      onSearchRangeAccept in interface FieldListener
      Throws:
      Exception
    • whenValueChanges

      public void whenValueChanges() throws Exception
      The whenValueChanges event is invoked whenever the field is set to a new, different value.
      Specified by:
      whenValueChanges in interface FieldListener
      Throws:
      Exception
    • clearAddExp

      public void clearAddExp(String exp)
    • clearFindExp

      public void clearFindExp(String exp)
    • backgroundColor

      public void backgroundColor(String color)
    • backgroundColor

      public String backgroundColor()
    • searchRanges

      public void searchRanges(String ranges)
    • 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

      public void displayAndRestart(String msg)
    • requestFocus

      public void requestFocus()
    • requestFocus

      public void requestFocus(boolean executeNextField)