Class DefaultCollectionEditorModel

    • Constructor Detail

      • DefaultCollectionEditorModel

        public DefaultCollectionEditorModel​(ObjectType rootType)
    • Method Detail

      • setParameters

        public void setParameters​(java.util.Map<java.lang.String,​? extends java.lang.Object> parameters)
      • getCollectionItems

        public java.util.List<java.lang.Object> getCollectionItems()
      • setCollectionItems

        public void setCollectionItems​(java.util.Collection<java.lang.Object> collectionItems)
      • addCollectionItem

        public void addCollectionItem​(java.lang.Object item)
      • addCollectionItems

        public void addCollectionItems​(java.util.Collection<? extends java.lang.Object> collection)
      • removeCollectionItem

        public boolean removeCollectionItem​(int index)
      • removeCollectionItem

        public boolean removeCollectionItem​(java.lang.Object item)
      • moveCollectionItem

        public boolean moveCollectionItem​(int fromIndex,
                                          int toIndex)
      • clearCollectionItems

        public void clearCollectionItems()
      • getItemLabel

        public java.lang.String getItemLabel​(java.lang.Object item)
      • getRootType

        public ObjectType getRootType()
        Description copied from interface: CollectionEditorModel
        Returns the root type of this reference collection editor i.e. the type of the items which this editor should hold references to.

        Note: If the root search type differs from the root type, this editor will actually hold items of the type returned by CollectionEditorModel.getRootSearchType(). In this case information about the root type is generally needed for value handling.

        Returns:
        the root type of this editor
        See Also:
        CollectionEditorModel.getRootSearchType()
      • getRootSearchType

        public ObjectType getRootSearchType()
        Description copied from interface: CollectionEditorModel
        Returns the type for which this reference collection editor should search for.

        Generally, if no root search type has been explicitly set, this method returns the same type as CollectionEditorModel.getRootType().

        Note: The root search type is actually the type of the items held by this editor, whereas root type is the type which should be used for persisting values.
        Returns:
        the type for which this reference collection editor should search for
        See Also:
        CollectionEditorModel.getRootType()
      • initializeReferenceSelectorModel

        protected void initializeReferenceSelectorModel​(ObjectType rootType)