Class NameField


public class NameField extends FieldDefinition
Represents a name field.
  • Constructor Details

  • Method Details

    • getFieldType

      public int getFieldType()
      Specified by:
      getFieldType in class FieldDefinition
      Returns:
      an int that identifies this fieldType
    • getFieldName

      public String getFieldName()
      Description copied from class: FieldDefinition
      Returns the name of this field definition.
      Specified by:
      getFieldName in class FieldDefinition
    • getLocator

      public LocatorIF getLocator()
      Specified by:
      getLocator in class FieldDefinition
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class FieldDefinition
    • getNameType

      public NameType getNameType()
      Gets the name type.
      Returns:
      the name type.
    • getValues

      public List<TopicNameIF> getValues(Topic topic)
      Returns the names, which have this NameType object as type, associated with the topic.
      Specified by:
      getValues in class FieldDefinition
      Parameters:
      topic - the topic from which the values is retrieved.
      Returns:
      a collection of TopicNameIFs.
    • addValue

      public void addValue(Topic topic, Object _value, LifeCycleListener listener)
      Adds a name to a topic. The name has this NameType object as type. If no identical names are associated with the topic, a new one is added, but if some names already exist, all except the first one is deleted.
      Specified by:
      addValue in class FieldDefinition
      Parameters:
      _value - value which is going to be added to the topic.
    • removeValue

      public void removeValue(Topic topic, Object _value, LifeCycleListener listener)
      Removes a name from a topic. The name has this NameType object as type. If names with the value, _value, are associated with the topic, topic, they will be deleted.
      Specified by:
      removeValue in class FieldDefinition
      Parameters:
      _value - value which is going to be removed from the topic.
    • getHeight

      public int getHeight()
      Returns the assigned height of the name text field.
    • getWidth

      public int getWidth()
      Returns the assigned width of the name text field.