Class FieldActors

java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.prop.vs.actor.FieldActors
All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable
Direct Known Subclasses:
EditorFieldActors

public class FieldActors extends PropCnr
Class container for associated value actors of a VSField or VSColumnHeader.
Author:
Christopher Mindus
  • Constructor Details

    • FieldActors

      public FieldActors()
      Creates a VSField Actors container property with no name and with a null value.
    • FieldActors

      public FieldActors(Atom propertyAtom)
      Creates a VSField Actors container with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
  • Method Details

    • usesPropIndex

      public final boolean usesPropIndex()
      Use of index for the property container is enabled.
      Specified by:
      usesPropIndex in interface IPropCnr
      Overrides:
      usesPropIndex in class PropCnr
      Returns:
      true for this container.
    • isPropPrivateAtCreation

      protected boolean isPropPrivateAtCreation()
      This property container is private and not transported to remote party.
      Overrides:
      isPropPrivateAtCreation in class GProp<GProp<?>[]>
      Returns:
      true if the property should be set to private at creation, false for default.
    • shouldSerializeToXML

      protected boolean shouldSerializeToXML(int programType)
      Method used to check for serialization to XML. Overridden to avoid writing the container if empty.
      Overrides:
      shouldSerializeToXML in class GProp<GProp<?>[]>
      Parameters:
      programType - From PropFactory.getProgramType(): 0=PropFactory.CLIENT, 1=PropFactory.SERVER or 2=PropFactory.EDITOR.
      Returns:
      true (default if not VOLATILE) to save to XML, false to avoid writing the property to XML.
    • convert

      public Object convert(VSFieldEvent.Op op, Object value, Value.Type sourceType, Value.Type targetType, boolean doTranslate, GProp<?> trigger) throws ValueConversionException
      Convert a value of a certain type to another.
      Parameters:
      op - The operation.
      value - The value to convert.
      sourceType - The source value type.
      targetType - The target value type.
      doTranslate - Translate the value using the field actors.
      trigger - The trigger property, i.e. the "requestor of this method", can be null for none. This value gives extra information for the VSFieldEvent and is not processed in the framework.
      Returns:
      The converted value, null if not converted (or input value is null).
      Throws:
      ValueConversionException - If an actor throws the exception, or the value cannot be converted.
    • validate

      public VSFieldEvent validate(Value value, GProp<?> trigger)
      Validate a value.
      Parameters:
      value - The value.
      trigger - The trigger property, i.e. the "requestor of this method", can be null for none. This value gives extra information for the VSFieldEvent and is not processed in the framework.
      Returns:
      The field event, perhaps null meaning OK (due to no validation required).